We present Dr.Jit, a domain-specific just-in-time compiler for physically based rendering and its derivative. Dr.Jit traces high-level programs (e.g., written in Python) and compiles them into efficient CPU or GPU megakernels. It achieves state-of-the-art performance thanks to global optimizations that specialize code generation to the rendering or optimization task at hand. While Dr.Jit drastically simplifies the creation of fast Monte Carlo renderers, its design was motivated by the needs of the differentiable rendering community. Builtin facilities for automatic differentiation expose fine-grained control over subtle details of the differentiation process needed to transform the derivative of a simulation into a simulation of the derivative, a prerequisite for high performance in this context. Just-in-time compilation embraces the dynamic nature of gradient evaluation: only small portions of the renderer may need derivative tracking in a specific task, but their location cannot be known ahead of time. Our system specializes algorithms on the fly and removes detected redundancies.
翻译:我们介绍Jit博士,这是一个用于物理成像及其衍生物的域内即时编译器。Jit博士跟踪高级程序(例如,以Python书写)并将其编成高效的CPU或GPU巨型内核。由于全球优化,将代码生成专门用于手头的成像或优化任务,我们实现了最先进的性能。Jit博士极大地简化了快速的蒙特卡洛成像器的创建,而设计它的动机是不同的成像界的需要。自动分化设施暴露了对将模拟的衍生物转化为衍生物模拟所需的细微细节的精细控制,这是这方面高性性能的先决条件。即时编译包含梯度评估的动态性质:只有一小部分成像器可能需要在特定任务中进行衍生物跟踪,但无法提前知道它们的位置。我们的系统专门对飞行进行算法,并清除所检测到的冗余物。