moderngpu | Patterns and behaviors for GPU | GPU library
kandi X-RAY | moderngpu Summary
kandi X-RAY | moderngpu Summary
Full documentation with github wiki under heavy construction. moderngpu is a productivity library for general-purpose computing on GPUs. It is a header-only C++ library written for CUDA. The unique value of the library is in its accelerated primitives for solving irregularly parallel problems.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of moderngpu
moderngpu Key Features
moderngpu Examples and Code Snippets
Community Discussions
Trending Discussions on moderngpu
QUESTION
I keep getting an "invalid device function" on my kernel launch. Google turns up a plethora of instances for this, however all of them seem to be related to a mismatch of the embedded SASS/PTX code embedded in the binary.
The way I understand how it works is:
- SASS code can only be interpreted by an GPU with the exact same SM version 2
- PTX code is forward-compatible, i.e. any newer GPU will be able to run the code (however, driver needs to JIT) 2
- I need to specify what I want to target by passing suitable -arch commands to
nvcc
:-gencode arch=compute_30,code=sm_30
will create a SASS targeting SM 3.0,-gencode arch=compute_60,code=compute_60
will create PTX code 1 - To use cuda with static and shared libraries, I need to compile for position-independent code and enable separable compilation
What I did now is:
ANSWER
Answered 2019-Sep-16 at 08:19Ultimately, as expected, this was due to a build system setup problem.
TLDR version:
I managed to fix it by changing the library with my CUDA code from STATIC
to SHARED
.
To fix it, I first used the automatic architecture detection from FindCuda CMake (which seems to have create SM 6.1, so I was at lest right there)
QUESTION
I'm trying to build a project with a static library using CUDA along with C++ code. It needs to link with an external library (moderngpu). The CUDA and C++ code each independently work fine, and have been previously compiled with make. However, when trying to build the code with CMake (through CLion, if it matters), I get the following error:
...ANSWER
Answered 2018-May-02 at 16:51I wrote the plugin CLion CUDA Run Patcher to provide a temporary fix for this bug in CLion until JetBrains provides a proper fix as tracked in CPP-10292.
The plugin was necessary because CLion ignored any target names from CMake including those specified by target property OUTPUT_NAME
.
It's likely this problem won't be fixed until CLion has full CUDA support as tracked in CPP-866.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install moderngpu
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page