Skip to content

Commit 51e6626

Browse files
authored
[Backend Tester] Add index_put and index_select tests (#12852)
Add tests for index_put and index_select.
1 parent 70ca29e commit 51e6626

File tree

3 files changed

+587
-1
lines changed

3 files changed

+587
-1
lines changed

backends/test/harness/tester.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ def run_method_and_compare_outputs(
311311
print(f"Comparing Stage {stage} with Stage {reference_stage}")
312312
for run_iteration in range(number_of_runs):
313313
inputs_to_run = inputs if inputs else next(self.generate_random_inputs())
314-
input_shapes = [generated_input.shape for generated_input in inputs_to_run]
314+
input_shapes = [
315+
generated_input.shape if hasattr(generated_input, "shape") else None
316+
for generated_input in inputs_to_run
317+
]
315318
print(f"Run {run_iteration} with input shapes: {input_shapes}")
316319

317320
# Reference output (and quantization scale)

0 commit comments

Comments
 (0)