-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Fix typo in parameter name in cpp.py #159716
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/159716
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
This PR doesn't seem to address the linked issue...adding other reviewers to confirm |
test/inductor/test_torchinductor.py
Outdated
@@ -15456,7 +15456,14 @@ def fn(pytype, dtype): | |||
ret_opt = fn_opt(pytype, dtype) | |||
|
|||
self.assertEqual(ret_opt, fn(pytype, dtype)) | |||
|
|||
def test_to_dtype_use_compute_types(): | |||
config.emulate_precision_casts=True |
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.
Don't set this flag globally. Use @config.patch
instead.
test/inductor/test_torchinductor.py
Outdated
@@ -15456,7 +15456,14 @@ def fn(pytype, dtype): | |||
ret_opt = fn_opt(pytype, dtype) | |||
|
|||
self.assertEqual(ret_opt, fn(pytype, dtype)) | |||
|
|||
def test_to_dtype_use_compute_types(): |
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.
The indent looks weird. Is this a CPU-only test or not? Is it a part of TestFull
?
test/inductor/test_torchinductor.py
Outdated
|
||
def test_to_dtype_use_compute_types(): | ||
config.emulate_precision_casts=True | ||
torch.manual_seed(0) |
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.
This shouldn't be needed if you move this test to CommonTemplate
and use self.common
.
Adding |
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
@desertfire Updated as per feedback, please take another look. Thanks. |
Fixes #159239
This PR fixes a typographical error in "torch/inductor/cpp.py", changing the parameter name from "use_compute_dtypes" to "use_compute_types".
The typo previously caused a runtime error when setting the TORCHINDUCTOR_EMULATE_PRECISION_CASTS=1. This fix ensures the parameter name is correct
This PR includes a unit test to ensure the corrected parameter works properly and prevents regression.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben