Compatibility with Visual Studio optimization

I am developing a cuda application using Visual Studio 2017 for a company project.

I call the host function HostFuncA in from main.cpp, and from HostFuncA I call the host function HostFuncB in another Then from HostFuncB, it calls a global function GlobalFuncB in the same file.

When I build this with optimization/O2, from a certain line in main.cpp, it calls GlobalFuncB, skipping HostFuncA and so on, and GlobalFuncB outputs an error with unexpected arguments.

I thought there might be a problem between the Visual Studio compiler and nvcc, but can you think of any other causes? Please give me your wisdom.

I apologize for not being able to attach the detailed code.

Translated with DeepL Translate: The world's most accurate translator (free version)

I didn’t see your codes example and can’t shed any idea on this . You could try reporting us a ticket Getting Help with CUDA NVCC Compiler

1 Like

Thank you. I’ll try that.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.