Skip to content

Conversation

@jianyizh
Copy link
Contributor

@jianyizh jianyizh commented Jan 23, 2026

maxnreg is not supported on xpu

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 23, 2026
Copy link
Contributor

@oulgen oulgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor to a common helper function under compat.py


# Only validate maxnreg on non-AMD devices (not supported on AMD)
if torch.version.hip is None:
if torch.version.hip is None and torch.version.xpu is None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you create supports_maxnreg() function under compat.py?

also update the comment here and all the following places

"maxnreg" in self.config
and self.config["maxnreg"] is not None
and torch.version.hip is None
and (torch.version.hip is None and torch.version.xpu is None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one too

@patch.object(_compat, "_supports_tensor_descriptor", lambda: True)
@patch.object(loops, "_supports_warp_specialize", lambda: True)
@patch("torch.version.hip", None)
@patch("torch.version.xpu", None)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD ci failed here. I don't have AMD machine to debug. I suppose this can pass ci

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is functools.cache is ignoring the patch here, you need to do similar to _supports_tensor_descriptor

@oulgen oulgen merged commit a7e94e6 into pytorch:main Jan 26, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants