HIP icon indicating copy to clipboard operation
HIP copied to clipboard

HIP support for NVRTC?

Open markehammons opened this issue 6 years ago • 7 comments

As far as I've seen so far, HIP does not support runtime compilation like opencl does or NVRTC allows cuda to do. Will this be added soon? I'm using java and looking into writing a jnr-ffi binding to HIP, but I wouldn't be able to test it much on my work system since nvcc requires a lower GCC version than I have, and I rely on nvrtc for compiling .cu kernels.

markehammons avatar Nov 19 '17 01:11 markehammons

Apparently, HIP is just a shim over nvcc/opencl libs, and not an actual library. Unfortunately that means I can't make a jnr-ffi binding to it, but if there's a hiprtc library released, i could possibly create a java lib that mimics hip and uses the hip kernel language.

markehammons avatar Nov 19 '17 01:11 markehammons

HIP uses NVCC on the CUDA path and HCC/ROCR runtime for the ROCm side. ROCR is an implementation of the HSA runtime APIs, plus some extensions.
To answer your original question : HIP does not provide a fully integrated runtime compilation. Depending on use case, you might be able to approximate this with a process-level call to hipcc?

bensander avatar Nov 20 '17 12:11 bensander

In the meantime, hiprtc has been added to HIP, thus making it possible to compile kernels at runtime on AMD GPUs 🎉

Unfortunately however, it isn't possible to compile any of the NVRTC functionalities with HIP targeting NVIDIA GPUs at the moment because of a missing header: hip/nvcc_detail/nvrtc.h.

Are you planning on adding this feature anytime soon?

shoshijak avatar Sep 16 '19 09:09 shoshijak

Hey Guys, Is there any update on the missing header file : hip/nvcc_detail/nvrtc.h ?

yashkgp avatar Feb 25 '21 06:02 yashkgp

Hi @gargrahul , could HIP add that missing header? Thanks..

sunway513 avatar Apr 18 '21 03:04 sunway513

@sunway513 Thanks for following. We are working on fixing it.

gargrahul avatar Apr 20 '21 04:04 gargrahul

This issue was fixed by AMD in ROCm 4.3. The missing header file is available and we believe this github issue can be closed.

nicholasmalaya avatar Oct 12 '21 19:10 nicholasmalaya

Closing the ticket as the issue has been fixed in ROCm 4.3. @markehammons, please re-open if your issue is still not addressed with latest ROCm 6.0.2. Thanks.

nartmada avatar Feb 24 '24 04:02 nartmada