-
Notifications
You must be signed in to change notification settings - Fork 85
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
unordered_map creation crashing with cuda 12.x #338
Comments
This looks like an issue related to some low-level concepts according to https://nvidia.github.io/thrust/api/classes/classthrust_1_1system_1_1system__error.html Could you try this code
and report what exact error is thrown by |
Mark I do other thrust and cuda stuff with no problems. GPU is rtx3060 |
There are some warnings in output:
|
Thanks for the pointers. The warnings you observe are related to a different issue where NVCC reports that The |
I built 'stdgpu' by running cmake first to generate a Visual Studio solution (I did not use the sh scripts, since I am on windows). Used all default flags. Opened the solution file, picked release and built the solution. Then I run the cmake install command, to extract .lib and necessary includes. Then I added all of these to my cuda project, linked the lib and added additional includes. I am not good with cmake, so I won't be able to do elaborate much without precise instructions. This is the log from cmake configuration https://pastebin.com/x78Kf67J |
Thanks. The CMake configuration of stdgpu looks reasonable and I do not see an immediate issue here. Just to double-check: Since the tests are also built, could you run the respective executable In case that the unit tests work as expected, I guess that the issue is more likely related to the configuration of your Visual Studio project. As I am primarly working with CMake and Ubuntu, this could be hard for me to reproduce, especially without further knowledge about your configuration on Windows. Could you check what compiler flags in Visual Studio are used to compile the |
I will run the tests once I get back to my work PC. My compute flags are compute_72,sm_72? Is 86 a requirement? Edit However compute_86,code=sm_86 did not make a difference. Looking up for the tests, |
All tests very successful. This is starting to look very strange :) |
Thanks, this sort of confirms that most likely something is wrong with the configuration in Visual Studio. However, I wonder why applying the flags for CC 8.6 did not results in any improvements. The previous flags were for building on Tegra and Jetson devices, see https://en.wikipedia.org/wiki/CUDA#GPUs_supported for a complete list of how compute capabilities (CC) map to GPUs. So replacing or adding the flags for the RTX 3060 should have made a difference. Without them, the generated executable will only work on the Tegra and Jetson devices and not on the RTX 3060. |
I built stdgpu on compute_86,code=sm_86 and changed also my project on compute_86,code=sm_86. Copied again over lib and includes, but same. I have no more idea right now. |
Tests work, but Update: Example works in debug mode. But not in release |
@stotko can u make a fresh clone & built and test |
I was able to reproduce the issue on Windows. Ubuntu seems to be unaffected and works normally in all cases. The issue is that Visual Studio is a multi-config generator, i.e. that can have both Debug and Release builds next to each other, which becomes problematic here when the build type is inconsistent. You can see in the CMake log (which you provided) that the Could you try configuring CMake (within the build directory) with
and then build the generated Visual Studio solution in Release x64 mode? The error should then disappear and you should see the message |
Yes seems like this did it. Feel free to close this if it feels appropriate. |
Thanks for checking. Making this more robust on our side is not that trivial. One potential way would be to make the library header-only, like thrust, which however would require several major changes, see #97. Closing this issue as besides future improvements to the robustness the issue has been resolved. |
Describe the bug
unordered_map creation crashes with cuda 12.x (testing with release build)
Steps to reproduce
In cu main()
Expected behavior
Abvious
Actual behavior
System (please complete the following information):
The text was updated successfully, but these errors were encountered: