Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
devshgraphicsprogramming opened this issue Mar 6, 2020 · 2 comments
Open

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

devshgraphicsprogramming opened this issue Mar 6, 2020 · 2 comments

Comments

@devshgraphicsprogramming

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.

@benbarsdell
Copy link
Member

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

@benbarsdell
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants