All Projects → NVIDIA → Jitify

NVIDIA / Jitify

Licence: bsd-3-clause
A single-header C++ library for simplifying the use of CUDA Runtime Compilation (NVRTC).

Programming Languages

cpp
1120 projects

Labels

Projects that are alternatives of or similar to Jitify

Hemi
Simple utilities to enable code reuse and portability between CUDA C/C++ and standard C/C++.
Stars: ✭ 275 (-12.42%)
Mutual labels:  cuda
Open quadtree mapping
This is a monocular dense mapping system corresponding to IROS 2018 "Quadtree-accelerated Real-time Monocular Dense Mapping"
Stars: ✭ 292 (-7.01%)
Mutual labels:  cuda
Unsupervised Videos
Unsupervised Learning of Video Representations using LSTMs
Stars: ✭ 309 (-1.59%)
Mutual labels:  cuda
Awesome Cuda
This is a list of useful libraries and resources for CUDA development.
Stars: ✭ 274 (-12.74%)
Mutual labels:  cuda
Deep Diamond
A fast Clojure Tensor & Deep Learning library
Stars: ✭ 288 (-8.28%)
Mutual labels:  cuda
Komputation
Komputation is a neural network framework for the Java Virtual Machine written in Kotlin and CUDA C.
Stars: ✭ 295 (-6.05%)
Mutual labels:  cuda
Go Cyber
Your 🔵 Superintelligence
Stars: ✭ 270 (-14.01%)
Mutual labels:  cuda
Thrust
The C++ parallel algorithms library.
Stars: ✭ 3,595 (+1044.9%)
Mutual labels:  cuda
Fast Human Pose Estimation.pytorch
Official pytorch Code for CVPR2019 paper "Fast Human Pose Estimation" https://arxiv.org/abs/1811.05419
Stars: ✭ 290 (-7.64%)
Mutual labels:  cuda
Person Reid gan
ICCV2017 Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro
Stars: ✭ 301 (-4.14%)
Mutual labels:  cuda
Tensor Stream
A library for real-time video stream decoding to CUDA memory
Stars: ✭ 277 (-11.78%)
Mutual labels:  cuda
Cuarrays.jl
A Curious Cumulation of CUDA Cuisine
Stars: ✭ 283 (-9.87%)
Mutual labels:  cuda
Deep High Resolution Net.pytorch
The project is an official implementation of our CVPR2019 paper "Deep High-Resolution Representation Learning for Human Pose Estimation"
Stars: ✭ 3,521 (+1021.34%)
Mutual labels:  cuda
Fbcuda
Facebook's CUDA extensions.
Stars: ✭ 275 (-12.42%)
Mutual labels:  cuda
Knn Cuda
Fast k nearest neighbor search using GPU
Stars: ✭ 310 (-1.27%)
Mutual labels:  cuda
Learn Cuda Programming
Learn CUDA Programming, published by Packt
Stars: ✭ 271 (-13.69%)
Mutual labels:  cuda
Ffmpeg Build Script
The FFmpeg build script provides an easy way to build a static FFmpeg on OSX and Linux with non-free codecs included.
Stars: ✭ 290 (-7.64%)
Mutual labels:  cuda
Cuda Programming
Sample codes for my CUDA programming book
Stars: ✭ 313 (-0.32%)
Mutual labels:  cuda
Fast gicp
A collection of GICP-based fast point cloud registration algorithms
Stars: ✭ 307 (-2.23%)
Mutual labels:  cuda
Cuda voxelizer
CUDA Voxelizer to convert polygon meshes into annotated voxel grids
Stars: ✭ 299 (-4.78%)
Mutual labels:  cuda

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

const char* program_source = "my_program\n"
    "template<int N, typename T>\n"
    "__global__\n"
    "void my_kernel(T* data) {\n"
    "    T data0 = data[0];\n"
    "    for( int i=0; i<N-1; ++i ) {\n"
    "        data[0] *= data0;\n"
    "    }\n"
    "}\n";
static jitify::JitCache kernel_cache;
jitify::Program program = kernel_cache.program(program_source);
// ...set up data etc.
dim3 grid(1);
dim3 block(1);
using jitify::reflection::type_of;
program.kernel("my_kernel")
       .instantiate(3, type_of(*data))
       .configure(grid, block)
       .launch(data);

Features

Jitify provides/takes care of the following things:

  • All NVRTC and CUDA Driver API calls
  • Simple kernel instantiation and launch syntax
  • Caching compiled kernels
  • Loading source code from strings, files, or embedded in an executable
  • Ignoring host code in runtime-compiled sources
  • Skipping unneeded headers
  • Support for JIT-safe standard library headers (e.g., float.h, stdint.h etc.)
  • Dealing with kernel name mangling
  • Reflecting kernel template parameters into strings
  • Compiling specifically for the current device's compute capability
  • Linking to pre-compiled PTX/CUBIN/FATBIN/object/library files
  • Support for CUDA versions 7.0, 7.5, 8.0, 9.x, 10.x, on both Linux and Windows
  • Convenient parallel_for function and lambda support
  • *New* jitify::experimental API provides serialization capabilities to enable user-managed hashing and caching

Things you can do with Jitify and NVRTC:

  • Rapidly port existing code to use CUDA Runtime Compilation
  • Dramatically reduce code volume and offline-compilation times
  • Increase kernel performance by baking in runtime constants and autotuning

How to build

Jitify is just a single header file:

#include <jitify.hpp>

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:

$ make test

This will automatically download and build the GoogleTest library, which requires CMake to be available on the system.

Documentation

Examples

See jitify_example.cpp for some examples of how to use the library. The Makefile also demonstrates how to use the provided stringify utility.

GTC 2017 Talk by Ben Barsdell and Kate Clark

API documentation

Doxygen documentation can be generated by running:

$ 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)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].