A Just-In-Time-Compiler for Differentiable Rendering
Project description
About this project
Dr.Jit is a just-in-time (JIT) compiler for ordinary and differentiable computation. It was originally created as the numerical foundation of Mitsuba 3, a differentiable Monte Carlo renderer. However, Dr.Jit is a general-purpose tool that can also help with various other types of embarrassingly parallel computation.
Dr.Jit principally facilitates three steps:
Vectorization and tracing: When Dr.Jit encounters an operation (e.g. an addition a + b) it does not execute it right away: instead, it remembers that an addition will be needed at some later point by recording it into a graph representation (this is called tracing). Eventually, it will just-in-time (JIT) compile the recorded operations into a fused kernel using either LLVM (when targeting the CPU) or CUDA (when targeting the GPU). The values a and b will typically be arrays with many elements, and the system parallelizes their evaluation using multi-core parallelism and vector instruction sets like AVX512 or ARM Neon.
Dr.Jit is ideal for Monte Carlo methods, where the same computation must be repeated for millions of random samples. Dr.Jit dynamically generates specialized parallel code for the target platform. As a fallback, Dr.Jit can also be used without JIT-compilation, which turns the project into a header-only vector library without external dependencies.
Differentiation: If desired, Dr.Jit can compute derivatives using automatic differentiation (AD), using either forward or reverse-mode accumulation. Differentiation and tracing go hand-in-hand to produce specialized derivative evaluation code.
Python: Dr.Jit types are accessible within C++17 and Python. Code can be developed in either language, or even both at once. Combinations of Python and C++ code can be jointly traced and differentiated.
Dr.Jit handles large programs with custom data structures, side effects, and polymorphism. It includes a mathematical support library including transcendental functions and types like vectors, matrices, complex numbers, quaternions, etc.
Difference to machine learning frameworks
Why did we create Dr.Jit, when dynamic derivative compilation is already possible using Python-based ML frameworks like JAX, Tensorflow, and PyTorch along with backends like XLA and TorchScript?
The reason is related to the typical workloads: machine learning involves small-ish computation graphs that are, however, made of arithmetically intense operations like convolutions, matrix multiplications, etc. The application motivating Dr.Jit (differentiable rendering) creates giant and messy computation graphs consisting of 100K to millions of “trivial” nodes (elementary arithmetic operations). In our experience, ML compilation backends use internal representations and optimization passes that are too rich for this type of input, causing them to crash or time out during compilation. If you have encountered such issues, you may find Dr.Jit useful.
Cloning
Dr.Jit recursively depends on two other repositories: pybind11 for Python bindings, and drjit-core providing core components of the JIT-compiler.
To fetch the entire project including these dependencies, clone the project using the --recursive flag as follows:
$ git clone --recursive https://github.com/mitsuba-renderer/drjit
Documentation
Please see Dr.Jit’s page on readthedocs.io for example code and reference documentation.
References, citations
Please see the paper Dr.Jit: A Just-In-Time Compiler for Differentiable Rendering for the nitty-gritty details and details on the problem motivating this project. There is also a video presentation explaining the design decisions at a higher level.
If you use Dr.Jit in your own research, please cite it using the following BibTeX entry:
@article{Jakob2022DrJit,
author = {Wenzel Jakob and S{\'e}bastien Speierer and Nicolas Roussel and Delio Vicini},
title = {Dr.Jit: A Just-In-Time Compiler for Differentiable Rendering},
journal = {Transactions on Graphics (Proceedings of SIGGRAPH)},
volume = {41},
number = {4},
year = {2022},
month = jul,
doi = {10.1145/3528223.3530099}
}
Logo and history
The Dr.Jit logo was generously created by Otto Jakob. The “Dr.” prefix simultaneously abbreviates differentiable rendering with the stylized partial derivative D, while also conveying a medical connotation that is emphasized by the Rod of Asclepius. Differentiable rendering algorithms are growing beyond our control in terms of conceptual and implementation-level complexity. A doctor is a person, who can offer help in such a time of great need. Dr.Jit tries to fill this role to to improve the well-being of differentiable rendering researchers.
Dr.Jit is the successor of the Enoki project, and its high-level API still somewhat resembles that of Enoki. The system evolved towards a different approach and has an all-new implementation, hence the decision to switch to a different project name.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file drjit-0.4.4-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2c93d108a435a2ea66d9516ee418ecdd7052b558363f304d8577439ffdcf4f6 |
|
MD5 | 8107b925c91abb6653894d199f8459ce |
|
BLAKE2b-256 | eae62cc6e18d247ae98f02a081f18a3be7e525e739af5f6310adf3f5942c6a84 |
File details
Details for the file drjit-0.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a354d8d1b1e993d2d4222eddb69b0629646e9bcb38df186bf57bbfc36a3e75aa |
|
MD5 | b2c9633952f9fdf51294c46d26c6a6e7 |
|
BLAKE2b-256 | 6dd1f7ad5b945ebe7f9704e811820bd84f4ba3fd93b4030a8d9ec89ecd077964 |
File details
Details for the file drjit-0.4.4-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f66773219fb2588994677b23729a98e4fb60bd0836a9baca27339abc39664cf |
|
MD5 | 01ed6ba1132b070d95e26150e6fd59d0 |
|
BLAKE2b-256 | 4a3018f3d0435c8c95bc2f6a85f06eeb2485225208b35ed15dff239ef68a4cc1 |
File details
Details for the file drjit-0.4.4-cp312-cp312-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp312-cp312-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.12, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf6bffb1271d5dbbe37546d205a2e9b1988f7ab02456ad431e5fa79eeb2dff64 |
|
MD5 | 4e614c71f299721eb0f1b172ee83212b |
|
BLAKE2b-256 | eaf4711e0af9ffb78c40fb888e9bafc2a6a67aa26bcc003540ccc81259812267 |
File details
Details for the file drjit-0.4.4-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 738436a44aba0e5881c444af4d0701432ef4623ec2ea22bd4e9d7ac60ee04091 |
|
MD5 | a78f0047aa231adfc9427530bfce4def |
|
BLAKE2b-256 | 763a63046645b20f40980881b37c94d8121a7729a5fb0b11b0ab7365afff0a43 |
File details
Details for the file drjit-0.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab3711c75ca5916ed293b58a760150defca85a7b8e5e9b291c060c5eb73601ae |
|
MD5 | 393ab9f0f8b73e37e160a8b0f31666b9 |
|
BLAKE2b-256 | 3818fd3226672d3739d72c69610410881b59ff1b8dac75d99bfb28a425263178 |
File details
Details for the file drjit-0.4.4-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 139ff69aa5befc455b4343cd2f108ec7c21a0211734a4d1e8474cfca23015bc1 |
|
MD5 | d5e64eaa678bc1c90998ba22bfdc556f |
|
BLAKE2b-256 | b4ff3bdab4f9be0b322162bfdaf847ece9698f007d2c5742d4a7db9625c0abab |
File details
Details for the file drjit-0.4.4-cp311-cp311-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp311-cp311-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.11, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4975e1ba784a5ed4ab98d824296269bfb31d4cd0f362ef047e63ad8887fc959 |
|
MD5 | b26c0bde3ecf16046516c2bca9f60389 |
|
BLAKE2b-256 | efa5b64ff8c4f1e37715724b1c6a38f96d8c21936992e9d6c1e9c5dc838de40c |
File details
Details for the file drjit-0.4.4-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caa35fecbf53cbfb5032717a2f0e37abd1a4faad267ed43b5d24d20bcc3d1e85 |
|
MD5 | ac8d3b008406f80ef5658ef919294f62 |
|
BLAKE2b-256 | 579ec3be90b733de490b9c9495b8b255e553237a14aef765b47ccc96130497d5 |
File details
Details for the file drjit-0.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a564dc5bc197df1f76a32fc2b7e72876c7982280f5bbbf678e3893cd094007c0 |
|
MD5 | d1e4afdbf361e45393c243689389c120 |
|
BLAKE2b-256 | d0145b6277fe78cf23b528f5897ceddcfdcb254df06bd2608a9a808dbb53bd8f |
File details
Details for the file drjit-0.4.4-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4000a28866be7a988868a89b0b98501651a365fc69647fd05fb4c67b9886593c |
|
MD5 | 03a658a4e20048dba6d913088cc58684 |
|
BLAKE2b-256 | 3af35bbfe449e53964a3c4e9330be1319c47bb8f29ec21709fba257f92185d27 |
File details
Details for the file drjit-0.4.4-cp310-cp310-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp310-cp310-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.10, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a105be0b224531a8468e2362bcbe36d53bf98c5e9e4367dc0128b34f4183856 |
|
MD5 | 659bdb9a09e50a2738eed5381613cc1d |
|
BLAKE2b-256 | f1610777abb46b3c5b13db89b3210fb2a7766df49a5e2e1b2e02947a2468e08c |
File details
Details for the file drjit-0.4.4-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f0d49eedbdfb74ae37e72eed320119760eacdc253f606eaa26c830a1392d35d |
|
MD5 | 9dd066afbb1e4ec9a41039108b6b94c9 |
|
BLAKE2b-256 | 025cbc33a0e9c74f356b17d0e3b273828f64575a57399a8510207339098fd88f |
File details
Details for the file drjit-0.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63de4059e334a2d26fccf40887a5fca59da6c8d60caabbb238395473e2271f8e |
|
MD5 | ed223b12604d93a43370dfed02a1834e |
|
BLAKE2b-256 | 2a21ec519206d03d64aa1689807e725334837ba313419c6c44724b18b76c3f53 |
File details
Details for the file drjit-0.4.4-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b4dcff29d1958ee5f1ed4df9877779e69df7ba4ac0ebdfc52c025638a39403f |
|
MD5 | 48c3b19706ddfe888e62d49e89aa6206 |
|
BLAKE2b-256 | 4e43afc6fc01f19277005013f9d7bcf6e825fa7a17667ca3584bbe95bd77209d |
File details
Details for the file drjit-0.4.4-cp39-cp39-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp39-cp39-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.9, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35b83fe7072f7088d37218cafc07219f093ea334f474705f52947a544a3726b5 |
|
MD5 | 29ff9c357e7284411801a5fe9a973637 |
|
BLAKE2b-256 | a765395fb83b966a346267872d306b3fc373d9307a45dd2ec7a1a9e3c4baaf5f |
File details
Details for the file drjit-0.4.4-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4324101859452cac4cc3e3572967e0d5f657fa21b19d7cee28d979604c67a51d |
|
MD5 | 0b78b3d0f900a1b2aba82865c73addb3 |
|
BLAKE2b-256 | 2f874d0d13ef1905c57fc1a4b6dbd145258696bf9c9a7ba0668233ff6c6ad3f3 |
File details
Details for the file drjit-0.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 519a339b7f5154cd4083eb14737325952fcee4a8d1785d7591ca5e30a51d4643 |
|
MD5 | c7fc805617ee4ebe0addfc417dbc082f |
|
BLAKE2b-256 | c373b3b66e2569e3f481344d9b604cc718a84edb18906d7eed13ff9598727061 |
File details
Details for the file drjit-0.4.4-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fa3343a602d6e2964298d20a255d58a4ea7aa9a102939e0344aafcff3494fed |
|
MD5 | 8921f941da288f4fd71f6ece31cac0dc |
|
BLAKE2b-256 | e52167a0a09a5b5760d2fc81e5a993ec7c40d048cb8d33a1db0c373d669700a7 |
File details
Details for the file drjit-0.4.4-cp38-cp38-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: drjit-0.4.4-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f750178c0380aa399cb17709d9835456f08e6dbc125e980b1e735711baf080fb |
|
MD5 | 946ab05528b325573f1fb164268495ac |
|
BLAKE2b-256 | 7024607903c064667ae811de2af27f9b471cb2ab1240c39089f7c35881303ff6 |