-
Notifications
You must be signed in to change notification settings - Fork 74
Enable TensorIndexer with all python_direct tests #5781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
562d1f1
f0c8bbe
af1b4b7
e4b6f22
6fb3cc6
0578f53
1d7b328
ae0dfac
e13ad84
32362d3
2b91a06
b1965c2
be3515d
5c9050d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -366,10 +366,15 @@ def execute( | |
| # A copy of fusion is created after construction FusionExecutorCache | ||
| # Delete the _fusion and reference the fusion inside FusionExecutorCache | ||
| del self._fusion | ||
|
|
||
| # Add "id_model" as a default enable option | ||
| default_enable_options = ["id_model"] | ||
| merged_enable_options = default_enable_options + _enable_options | ||
|
Comment on lines
+371
to
+372
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Potential duplicate options if user passes "id_model" in Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Comment on lines
+370
to
+372
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] No opt-out mechanism provided. Users cannot disable id_model when using Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Comment on lines
+370
to
+372
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding "id_model" as a default enable option means users cannot opt-out of this behavior through the Python API. Consider whether this is intentional or if there should be a mechanism to allow users to disable id_model for testing/debugging purposes. Potential implications:
If this is intentional (to force id_model adoption), consider documenting this breaking change clearly. If not, consider checking if "id_model" is already in Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
|
|
||
| return self.fec.execute( | ||
| inputs, | ||
| device=self._get_device_index(device), | ||
| _enable_options=_enable_options, | ||
| _enable_options=merged_enable_options, | ||
| _disable_options=_disable_options, | ||
| ) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical Logic Issue: Adding "id_model" to enable options without arguments has no effect.
The IdModel system requires explicit sub-options to be passed as arguments (e.g., "all", "index", "consumer_index", "producer_index", etc.). These are checked via
hasEnableOptionArgument(EnableOption::IdModel, "arg")incsrc/id_model/utils.h:30-80.When you add "id_model" here without arguments, the Python bindings call
EnableOptionsGuard::getCurOptions().set(opt.value())with an empty vector (seepython/python_direct/runtime.cpp:284). This means no IdModel features are actually enabled.Evidence from codebase:
EnableOption::IdModel, {"all"}(tests/cpp/utils.cpp)set_env(NVFUSER_ENABLE="id_model(all)")(tests/python/direct/test_with_id_model_indexer.py:183)Proposed solution:
The Python
_enable_optionsAPI doesn't support passing arguments. You need to either:["id_model:all"]or similarNVFUSER_ENABLE="id_model(all)"in test setupWithout this fix, TensorIndexer will NOT be enabled with python_direct tests as the PR title claims.