Skip to content

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Jun 24, 2024

Summary:

Triton pin updated recently:
pytorch/pytorch#126098

In the new triton version, functions can only access global variables of type tl.constexpr. Due to the current structure of the code and the fact that these constants are also used by non-triton programs, I think the best thing to do is to just stop using globals in the MX triton kernel. The PR lifts all of these constants to kernel function arguments.

Test Plan:

pytest test/prototype/mx_formats/test_custom_cast.py

Reviewers:

Subscribers:

Tasks:

Tags:

Copy link

pytorch-bot bot commented Jun 24, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/431

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:

✅ No Failures

As of commit 24dd661 with merge base 37c348e (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 24, 2024
@vkuzo vkuzo mentioned this pull request Jun 24, 2024
@msaroufim
Copy link
Member

That was fast, for a test in CI you'd need to revert the changes from here as well #428

@vkuzo vkuzo force-pushed the 20240624_mx_bugfix branch from bc234a8 to 3330c07 Compare June 24, 2024 16:32
Summary:

Triton pin updated recently:
pytorch/pytorch#126098

In the new triton version, functions can only access global variables of
type `tl.constexpr`. Due to the current structure of the code and the
fact that these constants are also used by non-triton programs, I think
the best thing to do is to just stop using globals in the MX triton
kernel. The PR lifts all of these constants to kernel function
arguments.

Test Plan:

```
pytest test/prototype/mx_formats/test_custom_cast.py
```

Reviewers:

Subscribers:

Tasks:

Tags:
@vkuzo vkuzo force-pushed the 20240624_mx_bugfix branch from 3330c07 to 24dd661 Compare June 24, 2024 16:36
@vkuzo vkuzo requested a review from msaroufim June 24, 2024 16:36
@msaroufim msaroufim merged commit c2cf973 into main Jun 24, 2024
@msaroufim msaroufim deleted the 20240624_mx_bugfix branch June 24, 2024 17:09
yanbing-j pushed a commit to yanbing-j/ao that referenced this pull request Dec 9, 2024
Unless user specifies device, default it to CUDA if it's available on the platform.

As for all models, other than TinyLlama inference on GPU will be faster than on CPU
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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants