The documentation on NVRTC (1. Introduction — NVRTC 12.8 documentation) mentions:
--device-as-default-execution-space
(-default-device
)
Treat entities with no execution space annotation as__device__
entities.
Could the same switch be used with NVCC? Can’t get it working there so far.
I want to port a large piece of code as a first draft without GPU-specific optimization and would like to avoid putting __device__
keyword to each and every function. It would be handy if I could just default all not marked functions __device__
, this would save a lot of time and keep code cleaner.