Skip to content

Commit 85d3ff6

Browse files
pytorchbotSS-JIA
andauthored
[ET-VK] Fix op benchmarks code generation (#6528)
## Context As title. There was a small error in the operator benchmark code generation which impacted operators which return a collection of tensors (e.g. layer norm). The issue was that the generated code would store the output `ValueRefs` in variables that shadowed class variables of the benchmark. Differential Revision: [D65071024](https://our.internmc.facebook.com/intern/diff/D65071024/) ghstack-source-id: 250448840 Pull Request resolved: #6527 Co-authored-by: Stephen Jia <[email protected]>
1 parent 3366edf commit 85d3ff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/vulkan/test/op_tests/utils/gen_computegraph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def set_output(self, ref: ValueRefList, include_declarations: bool = True) -> st
448448
if isinstance(ref, list):
449449
ret_str = ""
450450
for r in ref[:-1]:
451-
ret_str += self.set_output(r)
451+
ret_str += self.set_output(r, include_declarations)
452452
return ret_str
453453
elif ref.src_cpp_type == TENSOR_VECTOR:
454454
assert ref.is_out

0 commit comments

Comments
 (0)