Skip to content

Commit

Permalink
fix hip 6 and add comgr
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jan 25, 2024
1 parent 88eaa5f commit 3b39fa0
Show file tree
Hide file tree
Showing 2 changed files with 932 additions and 216 deletions.
4 changes: 3 additions & 1 deletion generate_hip.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash -e
clang2py /opt/rocm/include/hip/hiprtc.h /opt/rocm/include/hip/hip_runtime_api.h /opt/rocm/include/hip/driver_types.h /opt/rocm/include/hip/hip_ext.h --clang-args="-D__HIP_PLATFORM_AMD__ -I/opt/rocm/include -x c++" -o gpuctypes/hip.py -l /opt/rocm/lib/libhiprtc.so -l /opt/rocm/lib/libamdhip64.so
clang2py -k acdefstu /opt/rocm/include/amd_comgr/amd_comgr.h /opt/rocm/include/hip/hip_ext.h /opt/rocm/include/hip/hiprtc.h /opt/rocm/include/hip/hip_runtime_api.h /opt/rocm/include/hip/driver_types.h --clang-args="-D__HIP_PLATFORM_AMD__ -I/opt/rocm/include -x c++" -o gpuctypes/hip.py -l /opt/rocm/lib/libhiprtc.so -l /opt/rocm/lib/libamdhip64.so -l /opt/rocm/lib/libamd_comgr.so
echo "hipDeviceProp_t = hipDeviceProp_tR0600" >> gpuctypes/hip.py
echo "hipGetDeviceProperties = hipGetDevicePropertiesR0600" >> gpuctypes/hip.py
grep FIXME_STUB gpuctypes/hip.py || true
# we can trust HIP is always at /opt/rocm/lib
#sed -i "s\import ctypes\import ctypes, ctypes.util\g" gpuctypes/hip.py
Expand Down
Loading

0 comments on commit 3b39fa0

Please sign in to comment.