jitify icon indicating copy to clipboard operation
jitify copied to clipboard

sizeof(CUdeviceptr)==4 on the device side code

Open devshgraphicsprogramming opened this issue 5 years ago • 2 comments

I ran into a problem when compiling some optix programs

More info here as well as a reproducible example https://devtalk.nvidia.com/default/topic/1072808/optix/-bugreport-amp-fix-optix-7-corrupts-cudeviceptr-in-the-sbt-due-to-truncation-hardcore-/?offset=2#5434966

I'm using your "stddef.h" no idea what is the proper way to fix it and have my kernels compiled by nvrtc have 8 byte pointers.

I only had a quick look at this so far but can you try compiling with _M_AMD64 or __x86_64 defined.

benbarsdell avatar Mar 06 '20 12:03 benbarsdell

Sorry actually for Windows it requires defining _WIN64 or __LP64__ as noted here. E.g., pass -D_WIN64 and/or -D__LP64__ as compiler options to Jitify (NVRTC).

If this works I'll look into whether we could/should define these automatically.

benbarsdell avatar Mar 06 '20 22:03 benbarsdell