only check accuracy of mutated args#1961
Open
shunting314 wants to merge 1 commit intoshunting314/stack/29from
Open
only check accuracy of mutated args#1961shunting314 wants to merge 1 commit intoshunting314/stack/29from
shunting314 wants to merge 1 commit intoshunting314/stack/29from
Conversation
ee9724e to
9df8e0d
Compare
This was referenced Apr 6, 2026
stack-info: PR: #1961, branch: shunting314/stack/32
9df8e0d to
d739251
Compare
This was referenced Apr 7, 2026
jansel
requested changes
Apr 8, 2026
| check_fn(args, self._baseline_post_args) | ||
| args_flat, _ = tree_flatten(args) | ||
| baseline_flat, _ = tree_flatten(self._baseline_post_args) | ||
| mutated_idx_set = set(self._mutated_arg_indices) |
Contributor
There was a problem hiding this comment.
Are the indices still correct after you flatten things? If you have f([a,b], c) is arg 2 b or c? It seems like this is changing that from c to b.
Contributor
Author
There was a problem hiding this comment.
arg 2 (count starts from 1) would be b here.
The self._mutated_arg_indices is constructed like this:
- flat the args
- filter away non-tensor args
- track the index of mutated tensors in the tensor list
I was thinking about simplifying things by letting self._mutated_arg_indices track the index in the non-filtered flattened args, but the following comment makes me hesitate:
helion/helion/autotuner/base_search.py
Line 462 in 8c6f87c
Contributor
There was a problem hiding this comment.
Let's try to clean this up. I think we need:
- A better name that reflects the filtered+flattened nature.
- Some helpers methods or data structures to make working this easier. I don't want to see the same flattening and filtering code duplicated in multiple places.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PRs:
only check accuracy of mutated args
Previously if there are mutated args, we'll check every argument no matter if it's actually mutated. It would cause issue for SymmMemTensor signal_pad ptr. When we clone a symm memory tensor, we replace the signal_pad ptr as well. It does not make sense to compare the value of signal_pad ptr. Sometimes they pass the check since pointer addresses can be close. But it's also common that they fail the check.