克隆必须加 --recursive 拉取子模块,否则编译失败;全融合 MLP 对共享内存要求极高,低端显卡需调小 n_neurons 或换 CutlassMLP;PyTorch 扩展在小 batch size 下开销明显,可能比原生 CUDA 慢约 2 倍。
git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
cd tiny-cuda-nn
cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --config RelWithDebInfo -j需要 NVIDIA GPU,有 Tensor Core 更快;全融合 MLP 默认配置需要极大共享内存,基本只适合 RTX 3090、2080 Ti 或更高端卡,低端卡需减小 n_neurons 或改用 CutlassMLP。README 未说明能否纯 CPU 运行。
NVIDIA 出品的轻量 C++/CUDA 神经网络框架,用全融合 MLP 和多分辨率哈希编码把训练和推理做到极快
极快的 C++/CUDA 神经网络框架,专为 MLP 等小网络在 GPU 上训练和推理加速,常用于 NeRF 等实时渲染场景。
核心能力
- 提供全融合 MLP,把整层网络融进单个 CUDA kernel
- 内置多分辨率哈希编码,加速高维输入特征表示
- 支持多种输入编码、损失函数和优化器,用 JSON 配置模型
- 可选 JIT 融合,自动把模型编译进 kernel 提速
- 附带 PyTorch 扩展,可在 Python 中直接调用快速 MLP 与编码
容易踩的坑
- v2.0Version 2.0最新正式版2025-07-08 · 2025-07-08 11:27 UTC
tiny-cuda-nn now comes with a just-in-time (JIT) compilation mode that fuses encodings, neural networks, loss functions, and even backpropagation into single CUDA kernels. This leads to 1.5x-2.5x faster inference and training out of the box and can be enabled with a single line of code, see the "Automatic JIT" section below.
Even larger speed-ups are possible when applications integrate tightly with tiny-cuda-nn's new JIT compiler. For example, Instant NGP achieves a 5x speedup by fusing the entire NeRF ray marcher into a single kernel. See the "Direct JIT integration" section for details on how to accomplish this.
Automatic JIT
To enable JIT compilation mode, set the
jit_fusionproperty of your model totrue. All future uses of the model, whether inference or training, will then use JIT mode. Note that if there is an error during JIT compilation, a warning will be emitted and JIT compilation mode automatically turned off. Your code will still run using the tiny-cuda-nn 1.X code path.auto model = tcnn::create_from_config(...); model->set_jit_fusion(tcnn::supports_jit_fusion()); // Enable JIT if the system supports itNote: If your model has very large hash grids (~20 million+ parameters) or MLPs (layer sizes larger than 128 neurons), or when your GPU is an RTX 3000 series or earlier, JIT fusion can slow down training. Rarely inference, too. It this case, it is recommended to try enabling JIT fusion separately for training and inference to measure whether it is faster.
JIT fusion can also be enabled via the PyTorch bindings, but the speed-up will be lower, particularly during training. This is because, in PyTorch, the JIT compiler does not have access to the whole compute graph and can therefore fuse and optimize less.
import tinycudann as tcnn model = tcnn.NetworkWithInputEncoding(...) # Or any other tcnn model model.jit_fusion = tcnn.supports_jit_fusion() # Enable JIT if the system supports itDirect JIT integration
tiny-cuda-nn 2.0's JIT compiler works by converting a given tiny-cuda-nn model to a CUDA device function and then compiling it into a kernel using CUDA's runtime compilation (RTC) feature.
To integrate a tiny-cuda-nn model with a larger kernel in your app, you need to
- turn your kernel into a string,
- prepend the tiny-cuda-nn model's device function,
- pass the result to tiny-cuda-nn's runtime compilation API.
Here is an example that implements a minimal kernel using a tiny-cuda-nn model with 32 input dimensions and 16 output dimensions:
#include <tiny-cuda-nn/rtc_kernel.h> auto model = tcnn::create_from_config(32 /* input dims */, 16 /* output dims */, ...); auto fused_kernel = tcnn::CudaRtcKernel( "your_kernel", fmt::format(R" {MODEL_DEVICE_FUNCTION} __global__ void your_kernel(...) { // Get input to model from either registers or memory. tcnn::hvec<32> input = ...; // Call tiny-cuda-nn model. All 32 threads of the warp must be active here. tcnn::hvec<16> output = model_fun(nerf_in, params); // Do something with the model output. }", fmt::arg("MODEL_DEVICE_FUNCTION", model->generate_device_function("model_fun")), ) ); uint32_t blocks = 1; uint32_t threads = 128; // Must be multiple of 32 for neural networks to work. uint32_t shmem_size = 0; // Can be any size that your_kernel needs. cudaStream_t stream = nullptr; // Can be any stream. fused_kernel.launch(blocks, threads, shmem_size, stream, ... /* params of your_kernel */);And here is Instant NGP's NeRF integration with the JIT compiler for reference:
- src/testbed_nerf.cu
- [include/neural-graphics-primitives/fused_kernels/render_nerf.cuh](https://github.com/NVlabs/instan
- v1.6Version 1.62022-12-15 · 2022-12-15 14:59 UTC
查看更新说明
With as many improvements as have happened since April, as well as the duration for which tiny-cuda-nn's current state has been stable, I think it's about time for another release.
Changes Since Last Release
- Multi-GPU support: tiny-cuda-nn can now run on multiple GPUs simultaneously. It is the user's responsibility to ensure that parameters, inputs, outputs, and streams reside on the currently active CUDA device.
- PyTorch multi-GPU operation works out-of-the-box.
- CMake improvements: When using tiny-cuda-nn as a CMake submodule, its include folders and libraries are now tracked as part of its
PUBLICinterface. This means the following two lines of CMake are sufficient for a parent project to be able to use tiny-cuda-nn in its CUDA code:add_subdirectory(dependencies/tiny-cuda-nn) target_link_libraries(<parent project> PUBLIC tiny-cuda-nn) - Assorted functionality upgrades:
AdamOptimizercan now perform weight clipping.- A new
CompositeOptimizergot added (courtesy of @Solonets). It can optimize different parts of the model (such as encoding and neural net) using different optimizers, e.g. to use different learning rates. CompositeEncodingcan now perform sum or product reduction over its nested encodings.- Alignment of
Encoding's input and output matrices has been simplified and should work automatically in all cases now. - Many situations that used to cause undefined behavior are now checked and throw descriptive exceptions.
- Parameter initialization
model->initialize_params(...)and settingmodel->set_params(...)has been decoupled. Callingset_paramsis required before being able to use a model. Callinginitialize_paramsno longer influences the parameters of the model and instead merely returns a set of parameters that serves as a good initial state for training. - Snapshots are now compatible across
CutlassMLPandFullyFusedMLP, as well as acrossfloatand__halfprecision. This means snapshots generated from any GPU can be loaded by any other GPU. - The hash function of
GridEncodingcan now be configured.
- Countless bug fixes and performance improvements.
- Multi-GPU support: tiny-cuda-nn can now run on multiple GPUs simultaneously. It is the user's responsibility to ensure that parameters, inputs, outputs, and streams reside on the currently active CUDA device.
- v1.5Version 1.52022-04-22 · 2022-04-22 07:20 UTC
查看更新说明
Changes Since Last Release
- Encodings and neural networks in tiny-cuda-nn now share the same generic API for differentiable objects. This simplifies implementations significantly.
- As part of this generalization, encodings and neural networks can now take and produce row- and column-major matrices (i.e. both AoS and SoA data). Additionally, input data may be strided arbitrarily, which permits slicing of input matrices without copying.
- Added
GridEncodingsupport for double-backward, which is useful for e.g. eikonal supervision (courtesy of @ventusff). - Dropped the dependency on PyEXR / tinyexr in the sample applications (using
imageio/stb_imageinstead). - Fixed many bug, added several performance improvements, and improved compatibility with older GPUs.
- Encodings and neural networks in tiny-cuda-nn now share the same generic API for differentiable objects. This simplifies implementations significantly.
- v1.4Version 1.42022-02-14 · 2022-02-14 14:53 UTC
查看更新说明
Changes Since Last Release
Major Changes
- Added a PyTorch extension for using tiny-cuda-nn from within Python.
- This functionality is considered to be in a "beta" state. Please do report any issues you come across!
- See the this section of the README for installation/usage instructions.
- Caveat: the overheads of Python/PyTorch can be extensive. For example, the bundled mlp_learning_an_image example is ~2x slower through PyTorch than native CUDA. (This is still faster than implementing everything from scratch in Python, but something to be aware of.)
- Significantly reduced memory usage (sometimes 3x lower)
- Added a GPU memory arena that permits efficient, stream-ordered allocation and de-allocation of temporary buffers. This circumvents the need for pre-allocation, resulting in often 3x lower memory consumption.
- The memory arena uses the GPU's virtual memory mapper to get its performance without invalidating pointers or shuffling memory around.
- All neural networks in tiny-cuda-nn now additionally support row-major input memory layout. This affords higher performance and lower memory usage when transposition was otherwise required.
GridEncodingnaturally outputs row-major data and is thus sped-up by ~20% when followed by a neural network.
- tiny-cuda-nn now runs on older GPUs down to compute capability 37.
Minor Changes
- Sped up the input gradient computation of
GridEncodingby ~3x. - Sped up
SyncedMultiStream. - Fixed incorrect gradients of
SphericalHarmonicsEncoding. - Fixed incorrect gradients of
GridEncodingwhenmax_levelarguments were provided orInterpolation::Nearestwas used.
- Added a PyTorch extension for using tiny-cuda-nn from within Python.
- v1.3Version 1.32022-01-14 · 2022-01-14 09:47 UTC
查看更新说明
Changes Since Last Release
Major Changes
- Adds a new encoding:
GridEncoding- This encoding can be used to train and render neural graphics primitives instantly (see real-time NeRF flythroughs above)
- It is based on the concept of trainable multiresolution grids which can be backed by hashtables, dense storage, or tiled storage.
- More details in this technical paper.
- tiny-cuda-nn now runs on CUDA 10.2 (previously required CUDA 11 and higher)
- tiny-cuda-nn now only requires C++14 (previously C++17)
Minor Changes
- This repository now supports continuous integration builds through GitHub Actions.
- Added support for 16 neurons wide
FullyFusedMLP - Added support for nesting of
SyncedMultiStream
- Adds a new encoding:
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Tiny CUDA Neural Networks 
This is a small, self-contained framework for training and querying neural networks. Most notably, it contains a lightning fast "fully fused" multi-layer perceptron (technical paper), a versatile multiresolution hash encoding (technical paper), as well as support for various other input encodings, losses, and optimizers.
Performance
Fully fused networks vs. TensorFlow v2.5.0 w/ XLA. Measured on 64 (solid line) and 128 (dashed line) neurons wide multi-layer perceptrons on an RTX 3090. Generated by benchmarks/bench_ours.cu and benchmarks/bench_tensorflow.py using data/config_oneblob.json.
Usage
Tiny CUDA neural networks have a simple C++/CUDA API:
#include <tiny-cuda-nn/common.h>
// Configure the model
nlohmann::json config = {
{"loss", {
{"otype", "L2"}
}},
{"optimizer", {
{"otype", "Adam"},
{"learning_rate", 1e-3},
}},
{"encoding", {
{"otype", "HashGrid"},
{"n_levels", 16},
{"n_features_per_level", 2},
{"log2_hashmap_size", 19},
{"base_resolution", 16},
{"per_level_scale", 2.0},
}},
{"network", {
{"otype", "FullyFusedMLP"},
{"activation", "ReLU"},
{"output_activation", "None"},
{"n_neurons", 64},
{"n_hidden_layers", 2},
}},
};
using namespace tcnn;
auto model = create_from_config(n_input_dims, n_output_dims, config);
model->set_jit_fusion(supports_jit_fusion()); // Optional: accelerate with JIT fusion
// Train the model (batch_size must be a multiple of tcnn::BATCH_SIZE_GRANULARITY)
GPUMatrix<float> training_batch_inputs(n_input_dims, batch_size);
GPUMatrix<float> training_batch_targets(n_output_dims, batch_size);
for (int i = 0; i < n_training_steps; ++i) {
generate_training_batch(&training_batch_inputs, &training_batch_targets); // <-- your code
float loss;
model.trainer->training_step(training_batch_inputs, training_batch_targets, &loss);
std::cout << "iteration=" << i << " loss=" << loss << std::endl;
}
// Use the model
GPUMatrix<float> inference_inputs(n_input_dims, batch_size);
generate_inputs(&inference_inputs); // <-- your code
GPUMatrix<float> inference_outputs(n_output_dims, batch_size);
model.network->inference(inference_inputs, inference_outputs);
JIT fusion
JIT fusion is a new, optional feature with tiny-cuda-nn v2.0 and later. It is almost always recommended to enable automatic JIT fusion for a performance boost of 1.5x to 2.5x, depending on the model and GPU. Newer GPUs exhibit larger speedups.
If your model has very large hash grids (~20 million+ parameters) or MLPs (layer sizes larger than 128 neurons), or when your GPU is an RTX 3000 series or earlier, JIT fusion can slow down training. Rarely inference, too. It this case, it is recommended to try enabling JIT fusion separately for training and inference to measure whether it is faster.
Please open an issue if you encounter a slowdown in a different situation or other problems with JIT fusion enabled.
Automatic JIT fusion
To enable JIT fusion, set the jit_fusion property of your model to true.
All future uses of the model, whether inference or training, will then use JIT mode.
Note that if there is an error during JIT compilation, a warning will be emitted and JIT compilation mode automatically turned off.
Your code will still run using the tiny-cuda-nn 1.X code path.
auto model = tcnn::create_from_config(...);
model->set_jit_fusion(tcnn::supports_jit_fusion()); // Enable JIT if the system supports it
JIT fusion can also be enabled via the PyTorch bindings but the speed-up will be lower, particularly during training. This is because the JIT compiler does not have access to the whole compute graph and can therefore fuse and optimize less.
import tinycudann as tcnn
model = tcnn.NetworkWithInputEncoding(...) # Or any other tcnn model
model.jit_fusion = tcnn.supports_jit_fusion() # Enable JIT if the system supports it
Manual JIT fusion
Even larger speed-ups are possible when applications integrate more tightly with JIT fusion. For example, Instant NGP achieves a 5x speedup by fusing the entire NeRF ray marcher into a single kernel.
JIT fusion works by converting a given tiny-cuda-nn model to a CUDA device function and then compiling it into a kernel using CUDA's runtime compilation (RTC) feature.
To integrate a tiny-cuda-nn model with a larger kernel in your app, you need to
- turn your kernel into a string,
- prepend the tiny-cuda-nn model's device function,
- pass the result to tiny-cuda-nn's runtime compilation API.
Here is an example that implements a minimal kernel using a tiny-cuda-nn model with 32 input dimensions and 16 output dimensions:
#include <tiny-cuda-nn/rtc_kernel.h>
auto model = tcnn::create_from_config(32 /* input dims */, 16 /* output dims */, ...);
auto fused_kernel = tcnn::CudaRtcKernel(
"your_kernel",
fmt::format(R"
{MODEL_DEVICE_FUNCTION}
__global__ void your_kernel(...) {
// Get input to model from either registers or memory.
tcnn::hvec<32> input = ...;
// Call tiny-cuda-nn model. All 32 threads of the warp must be active here.
tcnn::hvec<16> output = model_fun(nerf_in, params);
// Do something with the model output.
}",
fmt::arg("MODEL_DEVICE_FUNCTION", model->generate_device_function("model_fun")),
)
);
uint32_t blocks = 1;
uint32_t threads = 128; // Must be multiple of 32 for neural networks to work.
uint32_t shmem_size = 0; // Can be any size that your_kernel needs.
cudaStream_t stream = nullptr; // Can be any stream.
fused_kernel.launch(blocks, threads, shmem_size, stream, ... /* params of your_kernel */);
And here is Instant NGP's NeRF integration with the JIT compiler for reference:
Example: learning a 2D image
We provide a sample application where an image function (x,y) -> (R,G,B) is learned. It can be run via
tiny-cuda-nn$ ./build/mlp_learning_an_image data/images/albert.jpg data/config_hash.json
producing an image every couple of training steps. Each 1000 steps should take a bit over 1 second with the default configuration on an RTX 4090.
| 10 steps | 100 steps | 1000 steps | Reference image |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
Requirements
- An NVIDIA GPU; tensor cores increase performance when available. All shown results come from an RTX 3090.
- A C++17 capable compiler. The following choices are recommended and have been tested:
- Windows: Visual Studio 2019 or 2022
- Linux: GCC/G++ 8 or higher
- A recent version of CUDA. The following choices are recommended and have been tested:
- Windows: CUDA 11.5 or higher
- Linux: CUDA 10.2 or higher
- CMake v3.21 or higher.
- The fully fused MLP component of this framework requires a very large amount of shared memory in its default configuration. It will likely only work on an RTX 3090, an RTX 2080 Ti, or higher-end GPUs. Lower end cards must reduce the
n_neuronsparameter or use theCutlassMLP(better compatibility but slower) instead.
If you are using Linux, install the following packages
sudo apt-get install build-essential git
We also recommend installing CUDA in /usr/local/ and adding the CUDA installation to your PATH.
For example, if you have CUDA 12.6.3, add the following to your ~/.bashrc
export PATH="/usr/local/cuda-12.6.3/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-12.6.3/lib64:$LD_LIBRARY_PATH"
Compilation (Windows & Linux)
Begin by cloning this repository and all its submodules using the following command:
$ git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
$ cd tiny-cuda-nn
Then, use CMake to build the project: (on Windows, this must be in a developer command prompt)
tiny-cuda-nn$ cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
tiny-cuda-nn$ cmake --build build --config RelWithDebInfo -j
If compilation fails inexplicably or takes longer than an hour, you might be running out of memory. Try running the above command without -j in that case.
PyTorch extension
tiny-cuda-nn comes with a PyTorch extension that allows using the fast MLPs and input encodings from within a Python context. These bindings can be significantly faster than full Python implementations; in particular for the multiresolution hash encoding.
The overheads of Python/PyTorch can nonetheless be extensive if the batch size is small. For example, with a batch size of 64k, the bundled
mlp_learning_an_imageexample is ~2x slower through PyTorch than native CUDA. With a batch size of 256k and higher (default), the performance is much closer.
Begin by setting up a Python 3.X environment with a recent, CUDA-enabled version of PyTorch. Then, invoke
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Alternatively, if you would like to install from a local clone of tiny-cuda-nn, invoke
tiny-cuda-nn$ cd bindings/torch
tiny-cuda-nn/bindings/torch$ python setup.py install
By default, the extension automatically enables half precision (FP16) on GPUs with good support (Volta, Turing, Ampere, etc.) and disables it on older architectures or those with slow FP16 (e.g., Pascal/GTX 10-series).
If you wish to override this behavior (e.g., to force FP16 on unsupported hardware or disable it for debugging), set the TCNN_HALF_PRECISION environment variable before installation:
Disable FP16: 0 Enable FP16: 1
Example:
# Linux / macOS (Disable FP16)
export TCNN_HALF_PRECISION=0
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Upon success, you can use tiny-cuda-nn models as in the following example:
import commentjson as json
import tinycudann as tcnn
import torch
with open("data/config_hash.json") as f:
config = json.load(f)
# Option 1: efficient Encoding+Network combo.
model = tcnn.NetworkWithInputEncoding(
n_input_dims, n_output_dims,
config["encoding"], config["network"]
)
# Option 2: separate modules. Slower but more flexible.
encoding = tcnn.Encoding(n_input_dims, config["encoding"])
network = tcnn.Network(encoding.n_output_dims, n_output_dims, config["network"])
model = torch.nn.Sequential(encoding, network)
model.jit_fusion = tcnn.supports_jit_fusion() # Optional: accelerate with JIT fusion
See samples/mlp_learning_an_image_pytorch.py for an example.
Components
Following is a summary of the components of this framework. The JSON documentation lists configuration options.
| Networks | ||
|---|---|---|
| Fully fused MLP | src/fully_fused_mlp.cu | Lightning fast implementation of small multi-layer perceptrons (MLPs). |
| CUTLASS MLP | src/cutlass_mlp.cu | MLP based on CUTLASS' GEMM routines. Slower than fully-fused, but handles larger networks and still is reasonably fast. |
| Input encodings | ||
|---|---|---|
| Composite | include/tiny-cuda-nn/encodings/composite.h | Allows composing multiple encodings. Can be, for example, used to assemble the Neural Radiance Caching encoding [Müller et al. 2021]. |
| Frequency | include/tiny-cuda-nn/encodings/frequency.h | NeRF's [Mildenhall et al. 2020] positional encoding applied equally to all dimensions. |
| Grid | include/tiny-cuda-nn/encodings/grid.h | Encoding based on trainable multiresolution grids. Used for Instant Neural Graphics Primitives [Müller et al. 2022]. The grids can be backed by hashtables, dense storage, or tiled storage. |
| Identity | include/tiny-cuda-nn/encodings/identity.h | Leaves values untouched. |
| MultiLevelEncodingLoD | include/tiny-cuda-nn/encodings/multi_level_lod.h | Hard or soft per-element LoD for Grid and Permuto. |
| Oneblob | include/tiny-cuda-nn/encodings/oneblob.h | From Neural Importance Sampling [Müller et al. 2019] and Neural Control Variates [Müller et al. 2020]. |
| Permuto | include/tiny-cuda-nn/encodings/internal/permuto.h | Trainable lattice for selected input and per-level feature widths. |
| SphericalHarmonics | include/tiny-cuda-nn/encodings/spherical_harmonics.h | A frequency-space encoding that is more suitable to direction vectors than component-wise ones. |
| TriangleWave | include/tiny-cuda-nn/encodings/triangle_wave.h | Low-cost alternative to the NeRF's encoding. Used in Neural Radiance Caching [Müller et al. 2021]. |
| Losses | ||
|---|---|---|
| L1 | include/tiny-cuda-nn/losses/l1.h | Standard L1 loss. |
| Relative L1 | include/tiny-cuda-nn/losses/l1.h | Relative L1 loss normalized by the network prediction. |
| MAPE | include/tiny-cuda-nn/losses/mape.h | Mean absolute percentage error (MAPE). The same as Relative L1, but normalized by the target. |
| SMAPE | include/tiny-cuda-nn/losses/smape.h | Symmetric mean absolute percentage error (SMAPE). The same as Relative L1, but normalized by the mean of the prediction and the target. |
| L2 | include/tiny-cuda-nn/losses/l2.h | Standard L2 loss. |
| Relative L2 | include/tiny-cuda-nn/losses/relative_l2.h | Relative L2 loss normalized by the network prediction [Lehtinen et al. 2018]. |
| Relative L2 Luminance | include/tiny-cuda-nn/losses/relative_l2_luminance.h | Same as above, but normalized by the luminance of the network prediction. Only applicable when network prediction is RGB. Used in Neural Radiance Caching [Müller et al. 2021]. |
| Cross Entropy | include/tiny-cuda-nn/losses/cross_entropy.h | Standard cross entropy loss. Only applicable when the network prediction is a PDF. |
| Variance | include/tiny-cuda-nn/losses/variance_is.h | Standard variance loss. Only applicable when the network prediction is a PDF. |
| Optimizers | ||
|---|---|---|
| Adam | include/tiny-cuda-nn/optimizers/adam.h | Implementation of Adam [Kingma and Ba 2014], generalized to AdaBound [Luo et al. 2019]. |
| Novograd | include/tiny-cuda-nn/optimizers/lookahead.h | Implementation of Novograd [Ginsburg et al. 2019]. |
| SGD | include/tiny-cuda-nn/optimizers/sgd.h | Standard stochastic gradient descent (SGD). |
| Shampoo | include/tiny-cuda-nn/optimizers/shampoo.h | Implementation of the 2nd order Shampoo optimizer [Gupta et al. 2018] with home-grown optimizations as well as those by Anil et al. [2020]. |
| Average | include/tiny-cuda-nn/optimizers/average.h | Wraps another optimizer and computes a linear average of the weights over the last N iterations. The average is used for inference only (does not feed back into training). |
| Batched | include/tiny-cuda-nn/optimizers/batched.h | Wraps another optimizer, invoking the nested optimizer once every N steps on the averaged gradient. Has the same effect as increasing the batch size but requires only a constant amount of memory. |
| Composite | include/tiny-cuda-nn/optimizers/composite.h | Allows using several optimizers on different parameters. |
| EMA | include/tiny-cuda-nn/optimizers/average.h | Wraps another optimizer and computes an exponential moving average of the weights. The average is used for inference only (does not feed back into training). |
| Exponential Decay | include/tiny-cuda-nn/optimizers/exponential_decay.h | Wraps another optimizer and performs piecewise-constant exponential learning-rate decay. |
| Lookahead | include/tiny-cuda-nn/optimizers/lookahead.h | Wraps another optimizer, implementing the lookahead algorithm [Zhang et al. 2019]. |
License and Citation
This framework is licensed under the BSD 3-clause license. Please see LICENSE.txt for details.
If you use it in your research, we would appreciate a citation via
@software{tiny-cuda-nn,
author = {M\"uller, Thomas},
license = {BSD-3-Clause},
month = {4},
title = {{tiny-cuda-nn}},
url = {https://github.com/NVlabs/tiny-cuda-nn},
version = {2.0},
year = {2021}
}
For business inquiries, please visit our website and submit the form: NVIDIA Research Licensing
Publications & Software
Among others, this framework powers the following publications:
Instant Neural Graphics Primitives with a Multiresolution Hash Encoding
Thomas Müller, Alex Evans, Christoph Schied, Alexander Keller
ACM Transactions on Graphics (SIGGRAPH), July 2022
Website / Paper / Code / Video / BibTeX
Extracting Triangular 3D Models, Materials, and Lighting From Images
Jacob Munkberg, Jon Hasselgren, Tianchang Shen, Jun Gao, Wenzheng Chen, Alex Evans, Thomas Müller, Sanja Fidler
CVPR (Oral), June 2022
Website / Paper / Video / BibTeX
Real-time Neural Radiance Caching for Path Tracing
Thomas Müller, Fabrice Rousselle, Jan Novák, Alexander Keller
ACM Transactions on Graphics (SIGGRAPH), August 2021
Paper / GTC talk / Video / Interactive results viewer / BibTeX
NVGS: Neural Visibility for Occlusion Culling in 3D Gaussian Splatting
Brent Zoomers, Florian Hahlbohm, Joni Vanherck, Lode Jorissen, Marcus Magnor, Nick Michiels
CVPR, June 2026
Website / Paper / Code / BibTex
As well as the following software:
NerfAcc: A General NeRF Accleration Toolbox
Ruilong Li, Matthew Tancik, Angjoo Kanazawa
https://github.com/KAIR-BAIR/nerfacc
Nerfstudio: A Framework for Neural Radiance Field Development
Matthew Tancik*, Ethan Weber*, Evonne Ng*, Ruilong Li, Brent Yi, Terrance Wang, Alexander Kristoffersen, Jake Austin, Kamyar Salahi, Abhik Ahuja, David McAllister, Angjoo Kanazawa
https://github.com/nerfstudio-project/nerfstudio
Please feel free to make a pull request if your publication or software is not listed.
Acknowledgments
Special thanks go to the NRC authors for helpful discussions and to Nikolaus Binder for providing part of the infrastructure of this framework, as well as for help with utilizing TensorCores from within CUDA.



