Skip to content

Commit 2aa02bf

Browse files
authored
Add TOSA reference model dependency for Arm backend tests (#18478)
Differential Revision: D98027152 Pull Request resolved: #18478
1 parent d25119f commit 2aa02bf

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

backends/arm/test/runner_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def numpy_to_torch_tensor(array: np.ndarray, output_node: Node) -> torch.Tensor:
202202
tensor = torch.from_numpy(array).reshape(shape_with_dim_order)
203203
return tensor.permute(NNHWC_INVERSE_ORDER).to(memory_format=torch.channels_last)
204204
else:
205-
if type(array.dtype) is np.dtypes.VoidDType:
205+
if array.dtype.type is np.void:
206206
# If dtype is void, "cheat" and use the output_tensor dtype.
207207
tensor = torch.frombuffer(array, dtype=output_tensor.dtype)
208208
else:

backends/arm/test/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@ def define_arm_tests():
7777
"//executorch/exir:lib",
7878
"fbsource//third-party/pypi/pytest:pytest",
7979
"fbsource//third-party/pypi/parameterized:parameterized",
80+
"fbsource//third-party/tosa_tools:tosa_reference_model",
8081
],
8182
)

0 commit comments

Comments
 (0)