jitify | A single-header C++ library for simplifying the use of CUDA Runtime Compilation (NVRTC) | GPU library
kandi X-RAY | jitify Summary
kandi X-RAY | jitify Summary
A single-header C++ library for simplifying the use of CUDA Runtime Compilation (NVRTC).
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 jitify
jitify Key Features
jitify Examples and Code Snippets
Community Discussions
Trending Discussions on jitify
QUESTION
When trying out the new jitify
support planned for CuPy v9.x, I found that the name_expressions
named argument to cupy.RawModule
needs to be iterable for the NVRTC to not fail when later calling get_function
. Question stemming out of cupy.RawModule using name_expressions and nvcc and/or path.
ANSWER
Answered 2020-Dec-02 at 16:28Well, first of all, we did say it's a sequence (ex: list/tuple) of strings and gave an example in the doc page you quoted:
name_expressions
(sequence of str) – A sequence (e.g. list) of strings referring to the names of C++ global/template kernels. For example,name_expressions=['func1', 'func1', 'func2']
for the template kernelfunc1
and non-template kernelfunc2
. Strings in this tuple must then be passed, one at a time, toget_function()
to retrieve the corresponding kernel.
So I don't see any ambiguity. There is no doubt that it's such a common pitfall in Python to write ('abc')
and thinking it's a 1-element tuple containing the string 'abc'
, for which it should been written as ('abc',)
with comma. But checking for such pitfall everywhere in the codebase would be a pain in the ass IMHO.
Second, even if we add a check to ensure the input is iterable, it still doesn't solve your issue as strings are also iterable/sequence:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jitify
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