diff --git a/docs/index.rst b/docs/index.rst index 9bae502ab..f686d9064 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -35,6 +35,11 @@ This command will also install :monosp:`Dr.Jit` on your system if not already av See the :ref:`developer guide ` for complete instructions on building from the git source tree. +When using the `Windows Subsystem for Linux 2 (WSL2) +`__, +you must follow the :ref:`linked instructions ` to enable hardware-accelerated +ray tracing on NVIDIA GPUs. + Requirements ^^^^^^^^^^^^ @@ -149,5 +154,6 @@ When using Mitsuba 3 in academic projects, please cite: :hidden: src/gallery + src/optix_setup release_notes zz_bibliography diff --git a/docs/src/developer_guide.rst b/docs/src/developer_guide.rst index 231da6c72..bdb7b71b2 100644 --- a/docs/src/developer_guide.rst +++ b/docs/src/developer_guide.rst @@ -63,4 +63,4 @@ Going further developer_guide/documentation developer_guide/variants_cpp developer_guide/writing_plugin - developer_guide/testing \ No newline at end of file + developer_guide/testing diff --git a/docs/src/optix_setup.rst b/docs/src/optix_setup.rst new file mode 100644 index 000000000..b26d6ab39 --- /dev/null +++ b/docs/src/optix_setup.rst @@ -0,0 +1,63 @@ +.. _optix-wsl2: + +Mitsuba on WSL 2 +---------------- + +Mitsuba uses the `NVIDIA OptiX +`__ framework for +hardware-accelerated ray tracing. While OptiX is not yet officially supported +on the `Windows Subsystem for Linux 2 (WSL 2) +`__, +it *is* possible to get it to run in practice. The following instructions are +based on an NVIDIA `forum post by @dhart +`__ +Use them at your own risk. + +- Determine your driver version using the ``nvidia-smi`` command. This is a number + such as ``560.94`` shown in the middle of the first row. + +- Go to the `NVIDA driver webpage `__ to + download a similar driver version for Linux (64 bit). You may have to click on + the "New feature branch" tab to find newer driver versions. + +- Following this step, you should have file named + ``NVIDIA-Linux-x86_64-*.run``. Move it to your WSL home directory but *do + not install it*. Instead, merely extract its contents within a WSL session using + the following command: + +.. code-block:: console + + $ bash NVIDIA-Linux-x86_64-*.run -x --target driver + +Create a symbolic link that exposes the already installed CUDA driver to runtime loading: + +.. code-block:: console + + $ ln -s /usr/lib/wsl/lib/libcuda.so /usr/lib/x86_64-linux-gnu/ + +Next, copy-paste and run the following command: + +.. code-block:: console + + $ mkdir driver-dist && cp driver/libnvoptix.so.* driver-dist/libnvoptix.so.1 && cp driver/libnvidia-ptxjitcompiler.so.* driver-dist/libnvidia-ptxjitcompiler.so.1 && cp driver/libnvidia-rtcore.so.* driver-dist && cp driver/libnvidia-gpucomp.so.* driver-dist && cp driver/nvoptix.bin driver-dist && explorer.exe driver-dist && explorer.exe "C:\Windows\System32\lxss\lib" + +This will open two Explorer windows: one to a system path containing internal +WSL driver files (``C:\Windows\System32\lxss\lib``), and another to a newly +created ``driver-dist`` directory containing files that need to be copied to +``C:\Windows\System32\lxss\lib``. Perform this copy manually using Explorer and +overwrite existing files if present. It will warn you that this is dangerous, +and you will need to give permission. + +Close all WSL windows, and enter the following command in a ``cmd.exe`` or +PowerShell session: + +.. code-block:: pwsh-session + + C:\Users\...> wsl --shutdown + +Following this, OptiX should be usable within WSL. + +.. warning:: + + Using CUDA and OptiX through WSL degrades performance. Please do not collect + performance data within WSL, since the results will not be representative. diff --git a/ext/drjit b/ext/drjit index d6c1f8df2..32f0bbd57 160000 --- a/ext/drjit +++ b/ext/drjit @@ -1 +1 @@ -Subproject commit d6c1f8df2dcd82e55fae446c75f925e2c70ecff2 +Subproject commit 32f0bbd5738b9ccc4e7f047d3776ed61db1b4983 diff --git a/ext/nanobind b/ext/nanobind index febdd3eb1..8dc834c5f 160000 --- a/ext/nanobind +++ b/ext/nanobind @@ -1 +1 @@ -Subproject commit febdd3eb1a3a76afeff252c80979f1ce455913dd +Subproject commit 8dc834c5fdaf412251732e7dde21b305ce5756be