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

If you're not sure about the file name format, learn more about wheel file names.

drjit-1.2.0-cp313-cp313-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.13Windows x86-64

drjit-1.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

drjit-1.2.0-cp313-cp313-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

drjit-1.2.0-cp313-cp313-macosx_10_14_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.13macOS 10.14+ x86-64

drjit-1.2.0-cp312-cp312-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.12Windows x86-64

drjit-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

drjit-1.2.0-cp312-cp312-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

drjit-1.2.0-cp312-cp312-macosx_10_14_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.12macOS 10.14+ x86-64

drjit-1.2.0-cp312-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.12+Windows x86-64

drjit-1.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

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

drjit-1.2.0-cp312-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

drjit-1.2.0-cp312-abi3-macosx_10_14_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.12+macOS 10.14+ x86-64

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

Uploaded CPython 3.11Windows x86-64

drjit-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

drjit-1.2.0-cp311-cp311-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

drjit-1.2.0-cp311-cp311-macosx_10_14_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

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

Uploaded CPython 3.10Windows x86-64

drjit-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

drjit-1.2.0-cp310-cp310-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

drjit-1.2.0-cp310-cp310-macosx_10_14_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

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

Uploaded CPython 3.9Windows x86-64

drjit-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

drjit-1.2.0-cp39-cp39-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

drjit-1.2.0-cp39-cp39-macosx_10_14_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: drjit-1.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 4.1 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.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 85fce1f4ad269d66fa6c9721efb272c6b0c20fe78d7b916560748a051c4c63cb
MD5 5d6b50b360189b5ef49a30907c09f9e7
BLAKE2b-256 c06b16b72889c8e92d014830eeba0dbc19ea099030342e95d2969e9f6b2a165c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1808dd43bf6d80d862bd62651ac8e55a6b69f19288d95d187789a6601243b99
MD5 973683544f8696ae369f3f84e35370b7
BLAKE2b-256 49b985e07502a42393e32add4184a650acabe9b645742e3c990d8799fe77094d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fb0607d6b7b01da2d0a8d6a3c727baabde3e91fec391d53f088b66bf18a24d51
MD5 0986960367ccf9523d9981fde085541d
BLAKE2b-256 d4cff77c0a7397f85455a6eb69e4580c0c99636f8fc044cd4644413148464a54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5110d4f4e1ec89b3dce5de610eea244c318d398df0a31c18597c288a29373121
MD5 699610402596caebc95824d0dd3c141d
BLAKE2b-256 3cb102e7bb2bd1a3ea9b6433666ca4c1d4919cee3a431807be1c3e87f6507340

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.1 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.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cac9b8b90b27e49ab2effc3eeeff0bfdb5574acca619ed78721ce8670a6b7ef6
MD5 d1f9154676596d94c0b74cf110f0919b
BLAKE2b-256 45018cc159722ea9c728d9ce3a38fc7814ba8b485a03fb0a6ff9bbfb8b3916b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f4ddc78ce78453cecf6e877fbd7ea937f53f966af586d10265af64b0d85c21ec
MD5 ad2b8f606f714bed954312954051843e
BLAKE2b-256 35663a95a2293bd8f7ffbaf31dff37ef894ef60eb137f1d8562f0f326e364aa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39a28f2875f776978d6767aef7e058bda684c333cb374e42790ed46d0307f56f
MD5 69ce786a90e36b74a6101372290029ca
BLAKE2b-256 f614654da7679070b297a99911be107e7b8ae8cf998c8ba8ddd6c42a286349c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6407337f812f85247f2e9fb0d3801436f93de164d1b72352232609b54d9d646a
MD5 0908542e60d734ca6472cf49ee699305
BLAKE2b-256 a104b369d1899be07ae215bd6e4c3f2b83e7947df6185de93bbf99285b2cae92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.2.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.1 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.2.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 085de7d7e9fd3b46fde2ded13c49bcfa79c99bd8f36c7dea3889376f776f2849
MD5 83dbff5a1c21a1fb3df3f190e9be52ce
BLAKE2b-256 6057ea75562289df726748ef8ca275d6328bfbbe45ce1bfa5d20c2de19deff5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4888569b5db6f75e9eedbfdbfba775a8d3d27ed338cbabdd175b73f125cd7237
MD5 b590739d1314bf0a877d91f651f959cb
BLAKE2b-256 fe7c976831406ebb4c432d63a34b95ccd010bd51450c798d12c8f1a2040f54f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5571b785be8ffb7c84d971a8c479e8c56af84207c75fce0da71d5827c003f92c
MD5 b30ba1d7751ccbae3e7c9bd0d4bf3773
BLAKE2b-256 8756d3963cc44db6a40affe2d3402fc2f03f000e4582ae3f082d4ee2fb746e32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp312-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5a5a070acf1b228c9f3b755a9b08a2f5fd1e8b67ddd4b9d4762fb4154a00d51d
MD5 2403558c7904bacdac0ecd219fc07b1b
BLAKE2b-256 4291a6e729debde26f7a8fa0c98f4b20bdbbe8db53305943a7a715ca3797e940

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.2.0-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/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ab83f82af148a5b3ffe49c06bf7c1ef6fed5ef4a7235b01e21bec35a9beb82cb
MD5 2f0ab5e7256b16c7e752b8f21949a1c3
BLAKE2b-256 f3e64990f7ec04eeb4265b6670952224c892e77fb3ea9462fcdf54d69574986a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87a6f7526d48005e15039feeb2e4e51ab97591126fd650fcf448152453f72ee9
MD5 c35190330f88995c924b08b7ae360f38
BLAKE2b-256 3332f6186d3bff68929e4a94837c3d9f3e2b9ede7e6616e34f6c755ce372710e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fa18f07e298dc50821e8d387c2766ad21a352b28ae65043ee43e5cef36249d5
MD5 648363f12f8427f957695f0c2b031eb9
BLAKE2b-256 7e65d3fb88a91079c8670029604a8a8ed84b9768f0800634b71a1d8c1c4821c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 bd6e812b2c21101aa655b8fc7dc65fef8da0894ba501c69d269111cafebbf93a
MD5 eaba5335fca2df291bc84d1a71aefccf
BLAKE2b-256 e18140028e1f3d4522605ce84e02e4f2a6947d4080f4d84c3063d3f45e31daf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.2.0-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/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8644a34a60a1f99c47df37379e4a3a513679fb5e01a776794c55ecccd5da0df6
MD5 c871165c4c0a06128818f7235c11e160
BLAKE2b-256 37a91588e16151d657b1aebe8c97fa4d1f5b8ef8ef0d12154b7ab8fa4e8b9f52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03c94bf17a0d419defe8232438d49ef7683154301675dab42a523abbbe0a9c21
MD5 4ec27210a80dab9c2071e29698a45532
BLAKE2b-256 e405837ffb32b344e16a7c384cbd31ef875c42efb6b30a5bd473893efff16f08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3a37465eadfd91ed6b37f3743be17b073a6b6c0e269f9465689eaa37aabca37e
MD5 fb43c22e700422240c8fd8593390fd2f
BLAKE2b-256 c71f56b6b02e442395293e02727862e68a990a57c8a780f10a9db3dfafd83669

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2c519a439555f4744d0671a2926170075cf402559699bbbe4f764a37f7bde345
MD5 05722fa1dada64630c12e8f6dfb37cc0
BLAKE2b-256 af6ad2d89d5e433bcd8be754610cb76cb6d3bff98d42c1ae5a9d594ebfb7a38e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drjit-1.2.0-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/6.1.0 CPython/3.12.8

File hashes

Hashes for drjit-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 12be76815d75ef8bc57f02c72c5b830bcc2da6bae2fe7f896b9859823699ea77
MD5 6009e59533f1fccb759bac61b9d50894
BLAKE2b-256 047ad46aef93d81c4b517e14303fc93fb123b0cb2016ae70d56c3a0987b882e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 835b03744cb4437d29f7cb6bbbdc3ac3ce1c582bef4894dc96ade2c9b1f85bb3
MD5 3c3cd7f55436205857c9dcb7811d9b53
BLAKE2b-256 34cb1c9bed91e003e6238f2c6b390705155d86fceceb258fc27449577aa4c890

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d36a07ccddf6af22858f6e4d31e1791cd587df808fa6453036698e78193b7a9
MD5 1aecb4cd66323b66ec6ac98cab6ea8d6
BLAKE2b-256 de65817a04990806dc0d723df7f6058ef6499f77ad29995739c41e1a8ff32e26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.2.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8007418a0b1fde88769e16d869f7d5cb4e97dd6c34009488bcd9da56ccdf4665
MD5 edf3f1dc0c1103e1eeeff73ed4f9aecb
BLAKE2b-256 8079fb4eb5cc39a8f42686def53635a2a318e5b380b9af172084c1ce81823218

See more details on using hashes here.

Supported by

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