Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Yuxingwang-intel
Copy link

@Yuxingwang-intel Yuxingwang-intel commented Aug 2, 2025

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

Copy link

pytorch-bot bot commented Aug 2, 2025

🔗 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 SEVs

There 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.

Copy link

linux-foundation-easycla bot commented Aug 2, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@Yuxingwang-intel
Copy link
Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Aug 2, 2025
@CaoE CaoE added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 4, 2025
@janeyx99
Copy link
Contributor

janeyx99 commented Aug 4, 2025

This PR doesn't seem to address the linked issue...adding other reviewers to confirm

@janeyx99 janeyx99 requested review from desertfire and eellison August 4, 2025 23:05
@janeyx99 janeyx99 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 4, 2025
@@ -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
Copy link
Contributor

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.

@@ -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():
Copy link
Contributor

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?


def test_to_dtype_use_compute_types():
config.emulate_precision_casts=True
torch.manual_seed(0)
Copy link
Contributor

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.

@iremyux
Copy link
Collaborator

iremyux commented Aug 5, 2025

Adding ciflow/win-arm64 label to trigger Windows Arm64 CI.
(This is for testing purposes only and isn’t related to any changes in this PR.)

@iremyux iremyux added the ciflow/win-arm64 Trigger Windows Arm64 CI Workflows label Aug 5, 2025
Copy link

pytorch-bot bot commented Aug 5, 2025

To add the ciflow label ciflow/win-arm64 please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

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.

@pytorch-bot pytorch-bot bot removed ciflow/win-arm64 Trigger Windows Arm64 CI Workflows ciflow/trunk Trigger trunk jobs on your pull request labels Aug 5, 2025
@Yuxingwang-intel
Copy link
Author

@desertfire Updated as per feedback, please take another look. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: inductor open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Inductor] Inconsistent results between eager execution and torch.compile
7 participants