Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

drjit-0.4.5-cp312-cp312-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.12 Windows x86-64

drjit-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

drjit-0.4.5-cp312-cp312-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

drjit-0.4.5-cp312-cp312-macosx_10_14_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.12 macOS 10.14+ x86-64

drjit-0.4.5-cp311-cp311-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.11 Windows x86-64

drjit-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

drjit-0.4.5-cp311-cp311-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

drjit-0.4.5-cp311-cp311-macosx_10_14_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

drjit-0.4.5-cp310-cp310-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10 Windows x86-64

drjit-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

drjit-0.4.5-cp310-cp310-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

drjit-0.4.5-cp310-cp310-macosx_10_14_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

drjit-0.4.5-cp39-cp39-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.9 Windows x86-64

drjit-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

drjit-0.4.5-cp39-cp39-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

drjit-0.4.5-cp39-cp39-macosx_10_14_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

drjit-0.4.5-cp38-cp38-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.8 Windows x86-64

drjit-0.4.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

drjit-0.4.5-cp38-cp38-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

drjit-0.4.5-cp38-cp38-macosx_10_14_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

File details

Details for the file drjit-0.4.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: drjit-0.4.5-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/5.1.0 CPython/3.9.19

File hashes

Hashes for drjit-0.4.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3876ffc98f358188332dabc530a88bf86c6c8af6bfbb9226837b14b7c44e0fd6
MD5 9cb54b9a4df405935f0e834c07ef76b0
BLAKE2b-256 c04dad1c0a97751184f6b1ca6ef2a7e4dd781433421e23b89066f8b247ecd0f9

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d35a16bec49ee8703583357103459192c8d6fbdf143af76f2ac767ae5e0d7aa9
MD5 b6c9fe7fa95de676f8bf9368de7f02ef
BLAKE2b-256 21abeacf91a9958cce31d40ab3d56a248c8fbf4b0522847d37278dd889812c1a

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1543861a1883009453d22337d1b91a91dd2f3d8bd3c75e49f431270fccb17cec
MD5 a90618cadfdf0147370736285bda4dac
BLAKE2b-256 8b019c93656c6bf6cc91f3f6bb2823514ef6db5d80b5790f705800989db7b28b

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp312-cp312-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 46771fda41c8c189d1d0b84efa29313efe5f8c0d5bdff7974895f5cc2e919b6d
MD5 f2f0cc03c9c3dd50ff6fcee7a082f7a3
BLAKE2b-256 106754583915584eeec3f697140d194a1baad101dbe47844cdc91ce235a301d4

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: drjit-0.4.5-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/5.1.0 CPython/3.9.19

File hashes

Hashes for drjit-0.4.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 70213faa5ce64e3c8ebc2ce7926e1a59c427888bd9b9fc181a87dcbe446c62ea
MD5 988f6f95e4b75b725778728222b23981
BLAKE2b-256 614177aee6e4ded655842403a916337689f315156f32e004836589f8fdfed281

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13d045339936dc90f90457ce08106c6f2c46739d1f72e39a8f84994bc0e2e9cb
MD5 e0e6f61e4918cf9aaca52b05320b7961
BLAKE2b-256 d0ce0028a2bb98e79c226f8ed2d55d12f3f4090e9b92520c696336ac0f906484

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b4e8788adeb301c2a4a1549dc37ec1d4132d1c0b923245682c042cbb45b9ca4
MD5 9891e38a754a8b2ff235ac59db520032
BLAKE2b-256 f7db2094845b96db9382d421ec9eeccecffdbc4b3a7e6a9bac6138ce89bcb01f

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c5388a0b11001daab7b31f4c9361ef90d1bab6b164b1c75ccd59bcea9f1d3196
MD5 86f854218efa77eaf0dfbc0b352ffd48
BLAKE2b-256 846ec4740c11117642790ed3bf855b7d80a2e1012404ea54967588d6c299703b

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: drjit-0.4.5-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/5.1.0 CPython/3.9.19

File hashes

Hashes for drjit-0.4.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d1d667a73e6fb6b121bc4a35bef480a188d3211933eecf452b421f2cc603843b
MD5 b75f7285dd84b2133838cb87efb2182f
BLAKE2b-256 b4ca7ddbb6eaee2ba7724bd4a40c807a4fb651f346ebc1d707ae13887672a6c9

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4748d96889e896135e6e552ecb213a063e9b37f24929b7975b0426295b57558a
MD5 a399cd388bdfd0d81b7dd6dd2d3e9fb8
BLAKE2b-256 7c653942a4b7a4333b658f40138ed37871d3107746a09a079bfbdc8868314672

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 496d813ca6533e1761ca68f5d0b8a8201b694509c7d97523e11ac884ee5284ee
MD5 e3eda5032edebc9980d3e8157e22e84f
BLAKE2b-256 658b3f4e35a15cde66e4dbf175fb63e5d6c4dc5e992e7ff96efd4fdf91afecd0

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 bea760ca602c0fcc105845d92d92323133b6a4cdd00847371cb7b91c7b44ff5d
MD5 861cfa922e1ce09684adaac5a0a8b27e
BLAKE2b-256 e4d56075e7258fc2f9f21fe251a8091f940158900bfff19668db0bb75c5e924c

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: drjit-0.4.5-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/5.1.0 CPython/3.9.19

File hashes

Hashes for drjit-0.4.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 212a305f56b3265f9ddfe13de9fdf171a1f9db7247da82919910bcad561d7c29
MD5 fda328eb0b3bbce4d1583320760f085a
BLAKE2b-256 9186d57e5209afcc9116167d9fdec24f30ce6744c8ab7428d790e52cdc240ed4

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b547188ad87e83ce5beb59545a12fb3b263ba18751aefe92fc03876ad99cc355
MD5 63e347e3f14fee20ba8786871563e08f
BLAKE2b-256 116d29774062c2355ddd802ce85d69eeda9f42c4ece0c501f9a5dec8fd0aed29

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 97dae1ce9bd88b7a097dfa252c22c45641816c56fe59f840022ca199937cda6d
MD5 0452aa0d94232b9d790a0ac065c1a0ae
BLAKE2b-256 87ae06a2abfaab2df50f703d615661552caa32c5f1e941258ce8c3509e7e94a0

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 ce6298273d3f69f49434148bedf315fb793d84844c0382687a516d286a5df9b4
MD5 318be45c031f5f995b788c3481ad8a66
BLAKE2b-256 81c218cd818ce8ebc9d89ebd158a60d2ce580cb7a7d941a2617fc29e8faa3ea3

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: drjit-0.4.5-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/5.1.0 CPython/3.9.19

File hashes

Hashes for drjit-0.4.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 85376f1771824840bdf908c93dfdabb049275a63e14a433b399ef7413d01d8e6
MD5 bda95e3123c06c9e246f22864680066f
BLAKE2b-256 f05c96633bf9fc23cc192db559fb1a21d8fff1cfa82d4b28e72fe8ea10cb68b9

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6fd9c0c68fb4fd94856e9a628465bd08d84f87eb9df6aab489c42109d5b8d7ec
MD5 4d71cd0c8ec9843c2c41355c91e9f9e9
BLAKE2b-256 24ccc17a36c189787338337cca1f4a567eedd81854f427e63e7291c64f9616be

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4df3b510ad8154e36b559a49cd690b6eb06404ae7fa8cce6fd300c0d5856d59
MD5 377feec16114b8141ca8231458b77b05
BLAKE2b-256 71115b66662789ab27267f62c5600a55339e9024b0486c6754ea7cdfb9074bdb

See more details on using hashes here.

File details

Details for the file drjit-0.4.5-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for drjit-0.4.5-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3fadf21276aba000c74e114dce9be8faa83e0251b87297bfde2ee9bc52a6bb85
MD5 da626fd7668caf4499b9816c71208e2f
BLAKE2b-256 c9878b23952a66e82796a6738a11c0709fae07f6e5c92307e1e51b846cc05980

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page