Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvidia/jitify
A single-header C++ library for simplifying the use of CUDA Runtime Compilation (NVRTC).
https://github.com/nvidia/jitify
cpp cuda jit-compilation nvrtc runtime-compilation single-header
Last synced: about 22 hours ago
JSON representation
A single-header C++ library for simplifying the use of CUDA Runtime Compilation (NVRTC).
- Host: GitHub
- URL: https://github.com/nvidia/jitify
- Owner: NVIDIA
- License: bsd-3-clause
- Created: 2017-05-08T05:19:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T09:48:53.000Z (7 months ago)
- Last Synced: 2024-12-21T09:07:15.717Z (8 days ago)
- Topics: cpp, cuda, jit-compilation, nvrtc, runtime-compilation, single-header
- Language: C++
- Homepage:
- Size: 1.08 MB
- Stars: 520
- Watchers: 25
- Forks: 64
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jitify
A single-header C++ library for simplifying the use of CUDA Runtime Compilation (NVRTC).
## Rationale
Integrating NVRTC into existing and/or templated CUDA code can be
tricky. Jitify aims to simplify this process by hiding the
complexities behind a simple, high-level interface.## Quick example
```c++
const char* program_source = "my_program\n"
"template\n"
"__global__\n"
"void my_kernel(T* data) {\n"
" T data0 = data[0];\n"
" for( int i=0; i
```Compile with: `-pthread` (not needed if JITIFY_THREAD_SAFE is defined to 0)
Link with: `-lcuda -lcudart -lnvrtc`
A small utility called stringify is included for converting text files into
C string literals, which provides a convenient way to integrate JIT-compiled
sources into a build.### Running tests
Tests can be run with the following command:
```shell
$ make test
```This will automatically download and build the
[GoogleTest](https://github.com/google/googletest) library, which
requires [CMake](https://cmake.org) to be available on the system.## Documentation
### Examples
See [jitify_example.cpp](jitify_example.cpp) for some examples of how to use the library.
The [Makefile](Makefile) also demonstrates how to use the provided stringify utility.[GTC 2017 Talk by Ben Barsdell and Kate Clark](https://on-demand.gputechconf.com/gtc/2017/videos/s7716-barsdell-ben-jitify.mp4)
### API documentation
Doxygen documentation can be generated by running:
```shell
$ make doc
```The HTML and LaTeX results are placed into the doc/ subdirectory.
## License
BSD-3-Clause
## Authors
Ben Barsdell (NVIDIA, bbarsdell at nvidia dot com)
Kate Clark (NVIDIA, mclark at nvidia dot com)