Skip to content

Commit 4126ba5

Browse files
larryliu0820oscarandersson8218
authored andcommitted
Revert "Arm backend: add tosa_spec and et-version info to .tosa files" (pytorch#9375)
Reverts pytorch#9308
1 parent 4dfd33b commit 4126ba5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

backends/arm/test/misc/test_debug_feats.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import shutil
1010
import tempfile
1111
import unittest
12-
from importlib.metadata import version
1312

1413
import torch
1514
from executorch.backends.arm.test import common
@@ -193,16 +192,15 @@ def test_collate_tosa_BI_tests(self):
193192
.to_edge_transform_and_lower()
194193
.to_executorch()
195194
)
196-
et_version = version("executorch")
197195
# test that the output directory is created and contains the expected files
198196
assert os.path.exists(
199197
"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests"
200198
)
201199
assert os.path.exists(
202-
f"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/output_tag6_TOSA-0.80+BI_{et_version}.tosa"
200+
"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/output_tag6.tosa"
203201
)
204202
assert os.path.exists(
205-
f"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/desc_tag6_TOSA-0.80+BI_{et_version}.json"
203+
"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/desc_tag6.json"
206204
)
207205

208206
os.environ.pop("TOSA_TESTCASES_BASE_PATH")

backends/arm/tosa_backend.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#
1313
import logging
1414
import os
15-
from importlib.metadata import version
1615
from typing import cast, final, List
1716

1817
import serializer.tosa_serializer as ts # type: ignore
@@ -123,12 +122,10 @@ def preprocess( # noqa: C901
123122

124123
if artifact_path:
125124
tag = _get_first_delegation_tag(graph_module)
126-
et_version = version("executorch")
127125
dbg_tosa_dump(
128126
tosa_graph,
129127
artifact_path,
130-
suffix="{}".format(f"_{tag}" if tag else "")
131-
+ (f"_{tosa_spec}" + (f"_{et_version}")),
128+
suffix="{}".format(f"_{tag}" if tag else ""),
132129
)
133130

134131
# Serialize and return the TOSA flatbuffer.

0 commit comments

Comments
 (0)