Skip to content

Arm Backend: Fixes related to pytorch updates #9834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backends/arm/operators/op_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def define_node(

if inputs[0].dtype not in (ts.DType.INT8, ts.DType.INT16):
raise ValueError(
f"TOSA.TABLE only supports int8 or int16 inputs, got {ts.DTypeNames[inputs[0]]}"
f"TOSA.TABLE only supports int8 or int16 inputs, got {ts.DTypeNames[inputs[0].dtype]}"
)

table = self._exported_program.state_dict[node.name] # type: ignore[union-attr]
Expand Down
15 changes: 6 additions & 9 deletions backends/arm/test/misc/test_debug_feats.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,13 @@ def test_collate_tosa_BI_tests(self):
.to_edge_transform_and_lower()
.to_executorch()
)

test_collate_dir = "test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests"
# test that the output directory is created and contains the expected files
assert os.path.exists(
"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests"
)
assert os.path.exists(
"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/output_tag6_TOSA-0.80+BI.tosa"
)
assert os.path.exists(
"test_collate_tosa_tests/tosa-bi/TestCollateTosaTests/test_collate_tosa_BI_tests/desc_tag6_TOSA-0.80+BI.json"
)
assert os.path.exists(test_collate_dir)

for file in os.listdir(test_collate_dir):
assert file.endswith(("TOSA-0.80+BI.json", "TOSA-0.80+BI.tosa"))

os.environ.pop("TOSA_TESTCASES_BASE_PATH")
shutil.rmtree("test_collate_tosa_tests", ignore_errors=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ def test_linear_residaul_tosa_MI(test_data: input_t1):
pipeline.run()


@common.parametrize("test_data", test_data)
@common.parametrize(
"test_data",
test_data,
{"3d_rand": "MLETORCH-855: Issue with Quantization folding."},
strict=False,
)
def test_linear_residual_tosa_BI(test_data: input_t1):
pipeline = TosaPipelineBI[input_t1](
LinearResidualModule(),
Expand Down
10 changes: 9 additions & 1 deletion backends/arm/test/models/test_nn_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,15 @@ def test_nn_functional_MI(test_data):
raise e


@parametrize("test_data", module_tests)
x_fails = {
"normalize": "MLETORCH-852: Support aten.index_put.default",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MLETORCH-* - are these issues tracking ET work? if yes, would it be possible to put them under ET GH? Just for visibility. If I can access these from outside Arm that would be OK too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thanks for the review.
We had some discussions yesterday on the best way to do this and we will start looking into this as soon as possible.

Thanks,
Saoirse

"cosine_similarity": "MLETORCH-854: Support aten.linalg_vector_norm.default",
"unfold": "Int64 input && MLETORCH-827: Support aten.index.Tensor",
"fold": "Int64 input && MLETORCH-827: Support aten.index_put.default",
}


@parametrize("test_data", module_tests, x_fails, strict=False)
def test_nn_functional_BI(test_data):
module, inputs = test_data
pipeline = TosaPipelineBI[input_t](
Expand Down
Loading