I am developing a cuda application using Visual Studio 2017 for a company project.
I call the host function HostFuncA in A.cu from main.cpp, and from HostFuncA I call the host function HostFuncB in another B.cu. 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)