Skip to content

Commit 9b93b21

Browse files
committed
[Backend Tester] Add index_put and index_select tests
ghstack-source-id: d32713a ghstack-comment-id: 3116316749 Pull-Request: #12852
1 parent 9deb51b commit 9b93b21

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)