The current install situation is a mess, but I'm working on fixing
it. Search for the target layout instead of one of the N options that
exist today.
Details
Diff Detail
Event Timeline
If we really want to do this, device lib change and hipcc change need to be ready. Since once this is committed without corresponding device lib and hipcc change, HIP will break.
On ROCM, device lib is currently installed at /opt/rocm/lib with extension .amdgcn.bc. This change requires device libs to be installed to /opt/rocm/amdgcn/bitcode and with extension .bc (drop amdgcn in extension). Also in hipcc -device-lib-path option needs to point to /opt/rocm/amdgcn/bitcode or dropped.
On Windows, device lib Makefiles need to be changed to drop amdgcn in extension.
Another issue: is /opt/rocm/amdgcn/bitcode the right installation path for device lib? Shouldn't it be /opt/rocm/lib/amdgcn/bitcode or /opt/rocm/lib/amdgcn ?
The library change is also waiting for review
On ROCM, device lib is currently installed at /opt/rocm/lib with extension .amdgcn.bc. This change requires device libs to be installed to /opt/rocm/amdgcn/bitcode and with extension .bc (drop amdgcn in extension). Also in hipcc -device-lib-path option needs to point to /opt/rocm/amdgcn/bitcode or dropped.
HIP is fixed/merged with the CL handling in D76957
On Windows, device lib Makefiles need to be changed to drop amdgcn in extension.
Another issue: is /opt/rocm/amdgcn/bitcode the right installation path for device lib? Shouldn't it be /opt/rocm/lib/amdgcn/bitcode or /opt/rocm/lib/amdgcn ?
These aren't host libraries, so I don't think these belong under /lib. CUDA installs the functionally equivalent in /usr/local/cuda/nvvm/libdevice/*.bc
clang/lib/Driver/ToolChains/AMDGPU.cpp | ||
---|---|---|
75 | with your change, the structure becomes ${ROCM_ROOT}/amdgcn/bitcode/*.bc Does the toolchain support ${OPENCL_ROOT} ? |
clang/lib/Driver/ToolChains/AMDGPU.cpp | ||
---|---|---|
75 | This is just pseudocode and no environment variable is read. This corresponds to --rocm-path |
with your change, the structure becomes
${ROCM_ROOT}/amdgcn/bitcode/*.bc
Does the toolchain support ${OPENCL_ROOT} ?