Skip to content

Commit

Permalink
[ET-VK] Fix op benchmarks code generation (#6528)
Browse files Browse the repository at this point in the history
## 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]>
  • Loading branch information
pytorchbot and SS-JIA authored Oct 28, 2024
1 parent 3366edf commit 85d3ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backends/vulkan/test/op_tests/utils/gen_computegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def set_output(self, ref: ValueRefList, include_declarations: bool = True) -> st
if isinstance(ref, list):
ret_str = ""
for r in ref[:-1]:
ret_str += self.set_output(r)
ret_str += self.set_output(r, include_declarations)
return ret_str
elif ref.src_cpp_type == TENSOR_VECTOR:
assert ref.is_out
Expand Down

0 comments on commit 85d3ff6

Please sign in to comment.