Skip to main content

Dr.Jit: A Just-In-Time Compiler for Differentiable Rendering

Project description

Dr.Jit logo

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 helps with 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 works particular well for Monte Carlo methods, which performs the same computation on 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 smallish 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: nanobind 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 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-1.1.0-cp313-cp313-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.13Windows x86-64

drjit-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

drjit-1.1.0-cp313-cp313-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

drjit-1.1.0-cp313-cp313-macosx_10_14_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.13macOS 10.14+ x86-64

drjit-1.1.0-cp312-cp312-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.12Windows x86-64

drjit-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.14+ x86-64

drjit-1.1.0-cp312-abi3-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.12+Windows x86-64

drjit-1.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

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

Uploaded CPython 3.12+macOS 10.14+ x86-64

drjit-1.1.0-cp311-cp311-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.11Windows x86-64

drjit-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

drjit-1.1.0-cp311-cp311-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

drjit-1.1.0-cp311-cp311-macosx_10_14_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

drjit-1.1.0-cp310-cp310-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.10Windows x86-64

drjit-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

drjit-1.1.0-cp310-cp310-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

drjit-1.1.0-cp310-cp310-macosx_10_14_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

drjit-1.1.0-cp39-cp39-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.9Windows x86-64

drjit-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

drjit-1.1.0-cp39-cp39-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

drjit-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

File details

Details for the file drjit-1.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: drjit-1.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dfcecfee0c21de8e6eb67a0de63b07f3a609a3b160ac1a9e4c27cac4072abc46
MD5 8b3e0ff19cf32352abc43c800eb28443
BLAKE2b-256 5bf9a6b79415f127a3760511a119a94fbe9066504d75ed9068204b3b3c8e2b6d

See more details on using hashes here.

File details

Details for the file drjit-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for drjit-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 495027ac21c34f887b3935028e5f9667b663bf0293f3468f20bda6de49253791
MD5 fc2f2282894b69d624e924e127b218cf
BLAKE2b-256 4d247b334611359f055da5765c30d5fdc3c601f3d55ba19b4ea920f11b930a04

See more details on using hashes here.

File details

Details for the file drjit-1.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for drjit-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3beb06d686cec56e5a0d8a8d89fe2af752edeb371dd826d1a5d1764af6313f49
MD5 189cba98d2c84f53aa3930c6e4701d78
BLAKE2b-256 cb4c73d41831768bb385bbc7fd5c4afd4830ca1f4351ef5e86adf7693d8156ff

See more details on using hashes here.

File details

Details for the file drjit-1.1.0-cp313-cp313-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for drjit-1.1.0-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6c845ea104b7b885f81bdcca933515d3a7a9915d02517755c5693751eb1bdaa9
MD5 a0a8c6d1cf47dd473777888f50fd8a17
BLAKE2b-256 980c4f96c0864b7e72b54cbf44554879fb8805bee90b9a07318657b924b6cbd5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3e5298c275b4df9d9dddd8606c7e98f06b4a918f6a378501d196842817070920
MD5 c8d9d539514fe0cb0c9e3ac8a4d50013
BLAKE2b-256 243e8063cc7d8667f03415a48bc4ca4c33c4d938e778805c63fc5d50ef50fe56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea9db3e17c6301efdc2b1dfc50633a41e9531c28e6caa3317c040f99e6aed0be
MD5 39b332c29056b0e98a0bbb8da1933a33
BLAKE2b-256 44d52ee944fbdfd2d569651d6b84d742502077b3bf68d6bb4bde09e2b93dc360

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d2250eb84ac8faf1fb6e843b4746503be7219d5ce700ef3ac84c144e18f00cd
MD5 5af4f923d8b41899defe70bd7d2b7f5a
BLAKE2b-256 9647fa0d3da274f2ccf28f681b38fa7d828a7cb20b1337d373efb05f7a965a8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d417f14838cf55cbafd36383f6c5c6017ae0206c32a853c009199d4582eaaee8
MD5 5b88952af6669f4a63cbaae97fd1e876
BLAKE2b-256 e86c74d7bc5bd138dddf728cb8f1618a69bd39d2f28849b4c5299175bbd7d911

See more details on using hashes here.

File details

Details for the file drjit-1.1.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: drjit-1.1.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.1.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fbb5c11595793d1af446ca5c5dfbdf8dc69e155c830356424ccc700a431d363b
MD5 9e4c985431d51944426c6b5ee6f19c82
BLAKE2b-256 24125a710d11c23db202bb9edbc6f369cae111ef45d2b2b06597e1344512d539

See more details on using hashes here.

File details

Details for the file drjit-1.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for drjit-1.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b163fb1f11cbcdee8269929027cccc0c63eacda1f438f7382d309ffb41367b5
MD5 c14b150faeb6376b22c84c6ee4709982
BLAKE2b-256 cbf3f93827a71656cbb8752935f9a23731de2dc7aaeb66d632ca02d4c5164b63

See more details on using hashes here.

File details

Details for the file drjit-1.1.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for drjit-1.1.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4aa21947e119157e19fa9f5832d5165c6ce0583585ef166e659f37c2cad907b5
MD5 73a0e5fb7f7e228542dc9d7641210e32
BLAKE2b-256 100cbfcffb7da67a6ec37a8c013983ed80b8ff275e12b28dc39664ca1cf58aad

See more details on using hashes here.

File details

Details for the file drjit-1.1.0-cp312-abi3-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for drjit-1.1.0-cp312-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 61ce659988cac3853254ddc5bd0d6458d58da783ff65e203fef8ac2b5d9c4c2b
MD5 f8c98a8f5e7cea74f08c01027fc3a71c
BLAKE2b-256 603fd80ec64765e01c359a2fd53e48150cf840f0bf1feba45af93a6984311184

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3c4dcef42aabf13d30414d5794030c678010ac00b0563fbb6352942626cd625e
MD5 4101f86363f6af7a677a22be4d26aed7
BLAKE2b-256 65d0a5ccad90b4859ff8530cc8c7cb7e003cc38c6d3d6214202fae9986259399

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d3d3574a91a7d5c90b80cde1f7311ea998cf9032c6bbe2ec3804fb354400a106
MD5 76572ac0e2e225a8cfb63ee39585df77
BLAKE2b-256 d3669359808dd0be22dc3b5b206037b110b2e810bb799550083825b5570887bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7408f4f9556818a43084f6e7719ccbfea6ff9eb4983281e841dcae35f1daa443
MD5 884d92d756cf30a3fa79540631488b7c
BLAKE2b-256 a6dd514e341fc540196621806b522b5562505db9747cf98cc706a6365f05a273

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b9c434fc0194371ce7de6df50badfd79368693f4afff7e6a99665e8c66a58261
MD5 e8e7437f88ea26f19ece7bb72601be78
BLAKE2b-256 cf902fd1418fb54f77b9e96faf66366bc2edb1573afaf628bc3d5e6ab7787b6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f11b698c9b09ad9b5ab4cb7ff98cca0fd72425dd070878f5134cf60be5c10dc4
MD5 ae4fc288c34facb177bfd62df1c05f07
BLAKE2b-256 9f28868df3aed69a37920933e1161864e2587d2f786b2f99370e186e554a60f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 703db09c001c244667d2104a133739954b12164f9bb85b4aae8a172761320895
MD5 a244bda65c0b589ff6044a18de6a6474
BLAKE2b-256 eb9ef106b27265ad6abc0773e38a4629d8909bb553efb2382bb935f8094f69c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c9130df94c159f7e03641a2aeb876633bf61664044a629e202cfab5390bdc481
MD5 cb05248ef846bf65ae86f625f0cdd8f4
BLAKE2b-256 e8515d8096ffa79edb094e33a68675f24d2826ba5d359f63f11439bfe1b9332c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 77c894bb4360446168ef73a253021b3b6093a1d8552370281c2c95c4d25f03f0
MD5 6ec99c6c64ab98cb222081dffdad3acf
BLAKE2b-256 96ccce22f28ba17bc0c2636ffcb3a6278ea9a7942af39b89119840645290eac8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a4d0d82bbe43a7e0fb9bdbe7ed355dbbc5465cc824aeb612ace8a0dfefeb475f
MD5 fee1c95301f6623a12b4142a69ee3620
BLAKE2b-256 f165c5369670c5d417c9863b0490f0f5c2393a12abfc0456ab607736c12db56c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8311d055ef220190c1958e7c28a86a48ce06c22baea218feea50fd7a5ec5647e
MD5 d94bb557dea628abc50b06dc34dc9b50
BLAKE2b-256 285a48ba918fe3f1ca93a4f3ede8001b48559056bae9b85f415b0338befd3f26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2973c9c709ee8abf161b1605630e642f58554019146c70e56b8fb0969a941fdf
MD5 1cfaf19a7e223c976158a8b483c353b4
BLAKE2b-256 d9b244b73c17e8b67c4232a6443e5ba5f3d7c639b8769642bb316c1811cb104c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 58815b942f35a4ad6dee9cd449365d8bd72996ddd9636182fafacc87b1327fc7
MD5 3f87cae98402ec7ce763665b47303dd0
BLAKE2b-256 bf5f6601e7407316a35520301a1e1d38533cd88009de0ad132e042b81c066169

See more details on using hashes here.

Supported by

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