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.6-cp312-cp312-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.12 Windows x86-64

drjit-0.4.6-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.6-cp312-cp312-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

drjit-0.4.6-cp312-cp312-macosx_10_14_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12 macOS 10.14+ x86-64

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

Uploaded CPython 3.11 Windows x86-64

drjit-0.4.6-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.6-cp311-cp311-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

drjit-0.4.6-cp311-cp311-macosx_10_14_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

drjit-0.4.6-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.6-cp310-cp310-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

drjit-0.4.6-cp310-cp310-macosx_10_14_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

drjit-0.4.6-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.6-cp39-cp39-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

drjit-0.4.6-cp39-cp39-macosx_10_14_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

drjit-0.4.6-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.6-cp38-cp38-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

drjit-0.4.6-cp38-cp38-macosx_10_14_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: drjit-0.4.6-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.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bbbced958e46165825cfab772296ac17d7fa3afabb6129eea6d8863296ff8fd4
MD5 306f1384b683bebf6f614701df465ff6
BLAKE2b-256 640fa7adc19db31b71693675259952d9f962aaa3fa5d71b660681d1b2626edba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f02a219fdd01d4832f0f1fba1e8d68d5c55322d095fcbf626d66bdf6a787c693
MD5 91190f08721fbe3d617778339a731c93
BLAKE2b-256 6594b7a9f0ff142a770ad0a2f33e802c74d553d615ea0300ee644a884ebe8761

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52b9de6493b825bdd589e58b5ced4f3dbb6b8b3714ea64294f2d310f25c38d9c
MD5 8ce2d1b36a20e11ae09aa6cd58bd8409
BLAKE2b-256 b327c6ae38e88071684d59ce7836b9b3fc23d3414ef8074c62519761320286cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d9d79bdc1b4300b3615c23455759800412b041baca308d916ee57dcc8df036ea
MD5 d00c221882d6aaf1c451e3eb65114a0b
BLAKE2b-256 b094597c85278e8a31bc6442dc5cbacb252c5b73c9a26fd33f68fd071d40ff28

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-0.4.6-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.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 da4451e4e9a24974c6023a53b6fcefdaa45836ca632a5ae0175f86b9433941fe
MD5 f27438a90b76972c53ee597224d4ea83
BLAKE2b-256 1f9ac36fa4f1ae2edd41200d61b477532d741bb1089dac714d7a512b87d3c24a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4ad24dd522831f9dc2ba38a4b63eab2caf1f23fea5f25795d03e46fd8ba7b11c
MD5 cadd73ab3e8997db1478aafae865cd14
BLAKE2b-256 dff84dcab18d8768247c8a77aa6e9f9bcf283e3aa0e71a26d360f73a956efb39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 382b3b093f06b859f3ce4539a56d16e76b1298e25db788b0c31ca30d56c1cdf3
MD5 2da068495a1e9fa071be592f732de7b5
BLAKE2b-256 8d9cae7bda95b71f79c6a378d7057c987978fc02713cd2a746775604398cf5f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7b21e8bf28d7cfb732a5f060419055f18d72a2568bf12cce50132eacb316e355
MD5 6159972da581dfef5554f0fe8a52b554
BLAKE2b-256 9cf05ae2a3ba5cbb43ee39237fd2be7409a4b9445662eed8114a0463004b65db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-0.4.6-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.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 580b6b650a98340ae17a3926e97b0d9f32d54e7d1659ceab26cb1c807b8a1393
MD5 27b60e1c210561ccacec4d473cf5f2ba
BLAKE2b-256 1c000cfec7162d8498bf346e2f0466679d001e892ea5cdaeb062e8eb36a0424f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dcb92670b8e95afab4b57b3a40ff17c0d5e6358d2cf1bfb7f47ecbc78b108acb
MD5 58f5791da3dfffdda0b1912ba3f69e7c
BLAKE2b-256 47daa3e3c697c9d758421f7ac0cbbc198a81607085829793a7c6eb9ae4e17d62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4289950e6f8a2da4ff545160a4882dd8f11c7888e71d9bac8220717e1e12109
MD5 0f59d13d087f9d65a1914815a728c040
BLAKE2b-256 166b0b9cbbe815eb356ae06486c3f5533b80dbaa82eee51e79cdec7c1d168cb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 69576b5f438083df724f5c73a0faaa96623da4bbec2c4d5ae0fa1e51edd94fa4
MD5 ff914d3a01dbbc6deb6e1807627bd65b
BLAKE2b-256 614ac0447bf09f9461948c4de3472b6c7da6bb574d37902fdf65409bbf899deb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-0.4.6-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.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 452370365c834b7a1d03366c63ebce63881faf66f8e6cd162ca6b517faabdb02
MD5 e7a9f8168797c587f4b2650b8299c903
BLAKE2b-256 18237d2a8533caa2b4178f2dd7ef9fde8fdbede7bc0bf15c92bbaf5333e5ebb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00bc884b85f9bcc7164c189e4db425bffa962bc32f54c154ee99da69b3eb3a55
MD5 177387bf43b8b41462e2040c23784488
BLAKE2b-256 c83bdef11290b6d7d88d3073426ab0cd3071d4dd04f094c490f0024087b0cee4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 609fc23f2241d22e96b04a9f2d2aef8025972a0b0fcf9b7d25bb4d57d0d53215
MD5 066a82c3216ec5e327207ac27499b1ff
BLAKE2b-256 0c08fd2f427c90925f028bf25fa24552c3d58e6ff4718b55bf1d4c9bde16c4fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a4d8c0316412a6adf05a6d513bca81bbc563a24e9383f2d0c8bba7520ea356fd
MD5 5dc88f8a34035bb5af30df6b2d6634fc
BLAKE2b-256 671b675a6533f836f00d1292f75fa0f934320a6c756922c974d97c0fe7c3d893

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-0.4.6-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.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 44327e63eec53b281f1fed80a9917c8061fba160db69e16df69e8d5e6e8fb9fb
MD5 d0beaded5e8049429e8340e1c19ecabe
BLAKE2b-256 636334927ac4ef91fae7df04549b0ff1f1a9504ce3c3c85e0a0a6c6f4fa0144b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c01485c0b773e2b8f7ea1b7e7ab27ca4a84f45ebf0b03d857839d6642b3b20f
MD5 d0d0842c359e5baefdeecdfddae86ac1
BLAKE2b-256 b58190aceb695938b6f40eb3ad003ee2116c7b6bb9bb2bad8dc02e3e303cbc41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 943373e63f44ea6b53e5a44f0ddecfec6ca7a1a3d99a87ff10f0fa63784f698b
MD5 1d531028d784b0511f6918a1a55d7f51
BLAKE2b-256 84a4fd21180a76cb97306803b261a92cd59e222ed3c2342f8bb0f5103d585435

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-0.4.6-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3b57d48cc3d5b5459bc1eb61f81b60e619af1fe57ad23188c7b2c09980ee46a3
MD5 bc679d5a238b2b8750e6d6c06f359fff
BLAKE2b-256 4596efb8871333b0af41e9b2cb5c33163d9a1ee0d7c587d4271dc756420b70c6

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