-
Notifications
You must be signed in to change notification settings - Fork 99
[xpu][fix] fix errors related to maxnreg on xpu #1347
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
Conversation
oulgen
left a comment
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.
Please refactor to a common helper function under compat.py
helion/autotuner/config_spec.py
Outdated
|
|
||
| # 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: |
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.
can you create supports_maxnreg() function under compat.py?
also update the comment here and all the following places
helion/_compiler/device_function.py
Outdated
| "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) |
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 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) |
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.
AMD ci failed here. I don't have AMD machine to debug. I suppose this can pass ci
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 problem is functools.cache is ignoring the patch here, you need to do similar to _supports_tensor_descriptor
maxnreg is not supported on xpu