File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 99import shutil
1010import tempfile
1111import unittest
12+ from importlib .metadata import version
1213
1314import torch
1415from executorch .backends .arm .test import common
@@ -192,15 +193,16 @@ def test_collate_tosa_BI_tests(self):
192193 .to_edge_transform_and_lower ()
193194 .to_executorch ()
194195 )
196+ et_version = version ("executorch" )
195197 # test that the output directory is created and contains the expected files
196198 assert os .path .exists (
197199 "test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests"
198200 )
199201 assert os .path .exists (
200- "test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/output_tag6 .tosa"
202+ f "test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/output_tag6_TOSA-0.80+BI_ { et_version } .tosa"
201203 )
202204 assert os .path .exists (
203- "test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/desc_tag6 .json"
205+ f "test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/desc_tag6_TOSA-0.80+BI_ { et_version } .json"
204206 )
205207
206208 os .environ .pop ("TOSA_TESTCASES_BASE_PATH" )
Original file line number Diff line number Diff line change 1212#
1313import logging
1414import os
15+ from importlib .metadata import version
1516from typing import cast , final , List
1617
1718import serializer .tosa_serializer as ts # type: ignore
@@ -122,10 +123,12 @@ def preprocess( # noqa: C901
122123
123124 if artifact_path :
124125 tag = _get_first_delegation_tag (graph_module )
126+ et_version = version ("executorch" )
125127 dbg_tosa_dump (
126128 tosa_graph ,
127129 artifact_path ,
128- suffix = "{}" .format (f"_{ tag } " if tag else "" ),
130+ suffix = "{}" .format (f"_{ tag } " if tag else "" )
131+ + (f"_{ tosa_spec } " + (f"_{ et_version } " )),
129132 )
130133
131134 # Serialize and return the TOSA flatbuffer.
You can’t perform that action at this time.
0 commit comments