File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 9
9
import shutil
10
10
import tempfile
11
11
import unittest
12
+ from importlib .metadata import version
12
13
13
14
import torch
14
15
from executorch .backends .arm .test import common
@@ -192,15 +193,16 @@ def test_collate_tosa_BI_tests(self):
192
193
.to_edge_transform_and_lower ()
193
194
.to_executorch ()
194
195
)
196
+ et_version = version ("executorch" )
195
197
# test that the output directory is created and contains the expected files
196
198
assert os .path .exists (
197
199
"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests"
198
200
)
199
201
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"
201
203
)
202
204
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"
204
206
)
205
207
206
208
os .environ .pop ("TOSA_TESTCASES_BASE_PATH" )
Original file line number Diff line number Diff line change 12
12
#
13
13
import logging
14
14
import os
15
+ from importlib .metadata import version
15
16
from typing import cast , final , List
16
17
17
18
import serializer .tosa_serializer as ts # type: ignore
@@ -122,10 +123,12 @@ def preprocess( # noqa: C901
122
123
123
124
if artifact_path :
124
125
tag = _get_first_delegation_tag (graph_module )
126
+ et_version = version ("executorch" )
125
127
dbg_tosa_dump (
126
128
tosa_graph ,
127
129
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 } " )),
129
132
)
130
133
131
134
# Serialize and return the TOSA flatbuffer.
You can’t perform that action at this time.
0 commit comments