NVIDIA / jitify

A single-header C++ library for simplifying the use of CUDA Runtime Compilation (NVRTC).
BSD 3-Clause "New" or "Revised" License
518 stars 64 forks source link

Does jitify supports CUDA 11.x??? #91

Closed FdyCN closed 2 years ago

FdyCN commented 2 years ago

i really appreciate for y'all to provide this nice header. it's really helpful. but it seems to stop updating for a long time ? so does it support latest CUDA version?? thanks!

Robadob commented 2 years ago

We actively use it as part of FLAMEGPU2 (https://github.com/FLAMEGPU/FLAMEGPU2).

We've been using it with CUDA versions from 10.2-11.4, without any problems related to changes within CUDA.

FdyCN commented 2 years ago

@Robadob Thank you for ur reply. I still have one more question.
is it possible to overload operator "+-*/" in the ".cuh" header like those in example_headers, and using these overloading in the headers who are included in the kernel string?? seems hard to approach, cause kernel string has specified extern "C", i try to remove extern "C", but nvrtc will return error. is there any possibility to overloader operators?? thanks a lot!

Robadob commented 2 years ago

I'm not sure what example you're referring to, but operator overloading works.

We've used operator overloads in some of our own code (e.g.) and it's also heavily use by GLM a header library we sometime use within NVRTC compiled kernels.

The main challenge with NVRTC compilation is that host code and system headers are not supported. So you have to be very careful in what the compiler sees. Jitify only helps in this manner by providing an incomplete set of drop-in system header replacements that might be wanted in device code. There can still be some effort required to get existing headers to be supported by NVRTC/Jitify.

FdyCN commented 2 years ago

@Robadob thanks for ur reply. i tried to overload operator in the a header which will be included in my kernel source. And it works, that's nice. i will keep following this header and your job ,it's really helpful. thank you again.