Instructions to use kernels-community/triton_kernels with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/triton_kernels with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("kernels-community/triton_kernels") - Notebooks
- Google Colab
- Kaggle
Update build/torch-universal/triton_kernels/target_info.py
If num_sms is called on a system running HIP, it currently returns None. But, the expression in the is_cuda() branch of this function (torch.cuda.get_device_properties(0).multi_processor_count) can also be used on a HIP system. This can be verified by evaluating this expression in a docker container running rocm/pytorch:rocm7.2_ubuntu24.04_py3.12_pytorch_release_2.9.1 on a system with a supported AMD GPU or APU. Thus, I propose this branch should be taken if is_cuda() or is_hip().
cc @danieldk @marcsun13 , see also https://huggingface.co/kernels-community/triton_kernels/discussions/7 (previous PR)
It's been a few months since this was opened. Has a decision been reached on whether or not to merge this or https://huggingface.co/kernels-community/triton_kernels/discussions/6?