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 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.0.5-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13 Windows x86-64

drjit-1.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

drjit-1.0.5-cp313-cp313-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

drjit-1.0.5-cp313-cp313-macosx_10_14_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.13 macOS 10.14+ x86-64

drjit-1.0.5-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12 Windows x86-64

drjit-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

drjit-1.0.5-cp312-cp312-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

drjit-1.0.5-cp312-cp312-macosx_10_14_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.12 macOS 10.14+ x86-64

drjit-1.0.5-cp312-abi3-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12+ Windows x86-64

drjit-1.0.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

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

drjit-1.0.5-cp312-abi3-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.12+ macOS 11.0+ ARM64

drjit-1.0.5-cp312-abi3-macosx_10_14_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.12+ macOS 10.14+ x86-64

drjit-1.0.5-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11 Windows x86-64

drjit-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

drjit-1.0.5-cp311-cp311-macosx_10_14_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

drjit-1.0.5-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10 Windows x86-64

drjit-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

drjit-1.0.5-cp310-cp310-macosx_10_14_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

drjit-1.0.5-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9 Windows x86-64

drjit-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

drjit-1.0.5-cp39-cp39-macosx_10_14_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

File details

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

File metadata

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

File hashes

Hashes for drjit-1.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ec589015a8d8eda7a852ee47b85aab6debfc0a312292344460dfe523303043fd
MD5 48ebf2d3d97af1f2980c9f6c1db96429
BLAKE2b-256 382f3602c98324a2b3aac02ef2b4fb3f44d652a7a9445a3b479af7e8a5e6a8ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9c90aaf10e2ccb54f1e9093d3fb7f0c6ede4619366d2683fb16322df06bbea6
MD5 3f913f95465c1eaf3d3e2bb5061bc6c4
BLAKE2b-256 6ca44aabf7e53cbf23bbc8f799f2cff17a72d31c3ac6792871fdf99a5763a054

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81c2eabe446a99c65153b0d5976c73e167350be706f329282a0fe5091b1d348f
MD5 a767f0dcce68b2c792f7d7438f538a3c
BLAKE2b-256 9668c5318e9b07ca4cf505605df7ceae05d45fefef1843f5bf71cbd3291b2e48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp313-cp313-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a0bbf3ea58fee1c3c8914ec41e77c380081cf97727056d9facc7ff84f27fa1e4
MD5 4d064af9893eea31eae0c45dd5c4038b
BLAKE2b-256 e61623cccf8f17f5e6078cd564be6ed5f1fed0ee30a67f76cdb998286d272e1a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for drjit-1.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 de86df5ea645843849e01283689c96933a5b443e6055f89e614b935dc5de4a04
MD5 b8e3c3c28ccae003f126d040a5879f13
BLAKE2b-256 1222d3dd95e1f74585a00f3093f7861e2b4902eafca0205ff9a2c36258e525ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0a8b9a66cf32048bc625dd6b7eb1de7c4c8f62388954f1950c45022d2af500e
MD5 4befb285ba7d38e69e5e96ab76aaca55
BLAKE2b-256 e28b227381ff40c0b1cc31d3dfb877d7cd24264df4b943f2c73d41725ad55fd5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3823a07940e852855c3c5d35d57bbd15043179b91a75aca7d78e243b30001d9
MD5 955f75a8bad37b8b9bcb0c72351747cc
BLAKE2b-256 688de14facbfe714c4b266888dd7fe97627034561e0bead50d661028e876dcb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp312-cp312-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9498011064be30d8f6ca502421b7ad8cca2c4504fe9276d70627ab24102733a0
MD5 28401134b85dbb8e16277b41fa11c9bc
BLAKE2b-256 fe861475556920fdf878875f681bf49519793486ec2ad81b92b25aa2e505e208

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for drjit-1.0.5-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e4e4899457244626d0060851882a56467749e7b1ec7f68d34fbca4f21fce9378
MD5 b28f316f486eb9021b8c20a1e8811dd7
BLAKE2b-256 c9a9ef030916b7513814e5b7b175e8fa9ed448d5113c241ca8d65df8ded4a93a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fdfa6469269e03788b5e97f224c2f93df8ac757209aa93d136fa0705f22df45
MD5 28896aa5d3f7da3c964aff5e53b8e3c0
BLAKE2b-256 7b8505091190e916b8f9cd6e40a8cb88773849f780f266ddd128249aecb6c61f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a00d47bc3350b55667263957b90a0ef9ffc6c75e70d2155c3413c36103459afe
MD5 7471000c4f4206c7497acfddb875ae4f
BLAKE2b-256 19dcd61e2860dd1e3841e5607c46fd573035ded8417bf235792ec8e04d17b974

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp312-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3f2e255f3b1c4babe1e620170394a52386c29021af3bb7780219edac4f6104f4
MD5 d204e03493beb07a3b3f90972cfdb3f6
BLAKE2b-256 0fb65fec7322335f0e896079f5adbe0fc34902d4a8a92bd49ca1f5d4e35988ea

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for drjit-1.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 77faa14ea707e5ab5bb00e641fa6506c85127a1ee626d1724d6b02bf99a4f48f
MD5 42603dce51c5f4bbeb31662cb300316d
BLAKE2b-256 e09caaff3d3bc1e368d0644bfa154d0c1767419761e2dbe55e9d19032fc7348f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 415a891172694f3efef2e47606de6c2bdd7c75f896d7b2859361a3f8df5ddfd6
MD5 47e9580739153c07d924be499f727437
BLAKE2b-256 0f78436f3dea728146874774bf118335849e2de604c80cabd50c6846cabd7385

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4452688e22dc051b9e7d06b6e226d6fd695c32bb28e67eeb13dfa3c46bc47221
MD5 8104c1447dc9e71f268f501dddf56251
BLAKE2b-256 bde4e8082a660e7bf58c234e9ff4e02b1d1600226a0f5d4ae7a4fa26f1a408c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c68864c06cac9a6e0960c963528a8d0f01722fe640fb015505c938e92fe89d2d
MD5 f5a53e3b0568722c688e2c10e3dc1097
BLAKE2b-256 a662b17d8eb7ee8d28df4ca44cc413a2278e832024105284cfc3a2b3a3527794

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for drjit-1.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f72583919fffcb2dffebf8d92eaea15c17533ec20ea55e276c412b5324fb43e
MD5 bf3af5d2fd3e1d52d980bc4d1cd9c30f
BLAKE2b-256 0fa56170bec2cebca2d654c257a5b1c3edec2f25be323ee55b1cc0f91c22a91f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb0cdf82dbaec62d817ab27b146e90353aa200fa7b6e188d015e9e71f866fd6f
MD5 6ab2b1e82c978a7050e00fa6f299ecd8
BLAKE2b-256 08d690c8a0e8b1e44ff32403cac2a5cc845ca1d2a8f0a690a0ff166f03c82923

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0594b8f3694b7e021f8fc42b2e75f0685edf47efcea4534835b289e700a4f03d
MD5 a6ed4dd61cd0d77e00b55629cae6f0d7
BLAKE2b-256 17e01592873a90da75f5ca099971ddabc135855c0cda664523d13293da249d11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 466391f837e4335f750ebc2d8f2b51c64ea2703f9a83d67cb66746355e1c7004
MD5 dfa2456e01cd55dd2ee0a01cc858ec9e
BLAKE2b-256 29dc0f2f554473ce4cf58a70f5afb616e1701a1688d5cd0be769ec537a433980

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for drjit-1.0.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3d1018b29b1a514c6628b8a1505a94d8cfb4565f3be223e196c4078e668d0263
MD5 5e2858b39a34a977fd921a84429a6ef2
BLAKE2b-256 8e2ac4e467c3505817ad16811cc860361f9264d43347f13826ec431bd4742b27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 39d54acfc52ee52c6b1e047a7fe3375cf3bccc1d2753f1eddda35d3fc0899223
MD5 0666db34de4621a1a0323319b0e44a89
BLAKE2b-256 98b96fcd3aae93397459d24fe8842de4fdb0eb1f337cc00c91902044e560d5ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 72ba431dcfb29d69af71b383096f2dc66e060b1dae84ea867136cfcd57a65a4b
MD5 562aba431a154f7879bee6087ffe309a
BLAKE2b-256 ff45610d68e56d1e6f2f7c350294710e34b98944ff083c44a65413afd929b231

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drjit-1.0.5-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 37838b9a1598df99f5dfca24c4ba431d3936774ad3a12261ccc2248b3bafc41b
MD5 8996ad00d940a57689b1cf7169c223fc
BLAKE2b-256 f9a259ad5a6132620d98f880cb66605a0fee1dfeaea49948e2088cc9e04d0fa1

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