Repository navigation
[docs] AITER kernels - #46871
[docs] AITER kernels#46871
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
vasqu
left a comment
There was a problem hiding this comment.
A bit unsure because I expect more versatility per device type in the future
Would wait a bit on @Abdennacer-Badaoui first on his thoughts
| model = AutoModelForCausalLM.from_pretrained( | ||
| "Qwen/Qwen3-0.6B", | ||
| use_kernels=True, | ||
| device_map="cuda" |
There was a problem hiding this comment.
Imo maybe we should change this instead and have a small comment that for each platform a different set of default kernels are applied
There was a problem hiding this comment.
I'm thinking of a table with columns for NVIDIA / ROCm / XPU, and for each operation the name of the hub kernel used. We can update it whenever we change the defaults.
|
|
||
| ## AMD GPUs | ||
|
|
||
| AMD GPUs report their device type as `cuda` in PyTorch. Transformers detects ROCm at runtime and routes supported operations to [AITER](https://github.com/ROCm/aiter) Triton kernels built for AMD hardware. You don't need to set the device type yourself. |
There was a problem hiding this comment.
I expect more than just aiter kernels in the future? so unsure if we need a whole section if we should a more general section / comment on different kernels for each device type
but would let @Abdennacer-Badaoui decide on the approach
There was a problem hiding this comment.
Exactly. We started with aiter kernels as a PoC for the amd team, to encourage them to start adding kernels to the hub. We'd swap the defaults anytime we come up with a more performant triton/hip kernel, not necessarily from aiter. So it'd be nice to frame it as: use_kernels=True loads the most performant triton/hip kernels available on the Hub to replace key operations in your model for amd. And we can still link aiter as an example of those kernels atm.
|
CI Dashboard: View test results in Grafana |
* docs * feedback * table
add docs for #46268