triton-lang / triton

Development repository for the Triton language and compiler
https://triton-lang.org/
MIT License
13.47k stars 1.66k forks source link

[AMD] remove driver C compilation steps #5228

Open makslevental opened 11 hours ago

makslevental commented 11 hours ago

Python can directly call C APIs via ctypes. Since the HIP APIs we use are indeed C APIs, the AMD driver does not need to compile anything (neither the kernel launch trampoline nor the utils).

The added file hip.py is generated from HIP headers using clang2py (and then trimmed down to include only our used APIs).

Note, I've tested this on our mi3002x.