Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/python/alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ static void set_variant(nb::args args) {
if (curr_variant.attr("startswith")(nb::make_tuple("llvm_", "cuda_"))) {
nb::module_ mi_python = nb::module_::import_("mitsuba.python.ad.integrators");
nb::steal(PyImport_ReloadModule(mi_python.ptr()));
mi_python = nb::module_::import_("mitsuba.python.ad.loaders");
nb::steal(PyImport_ReloadModule(mi_python.ptr()));
}

// Only invoke user-provided callbacks after Mitsuba plugins have reloaded,
Expand Down
1 change: 1 addition & 0 deletions src/python/python/ad/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .largesteps import LargeSteps
from .integrators import *
from .loaders import *
from .optimizers import *
from .guiding import *
from .projective import *
6 changes: 6 additions & 0 deletions src/python/python/ad/loaders/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import importlib
import mitsuba as mi

if mi.variant() is not None and not mi.variant().startswith('scalar'):
from .ray_loader import *
importlib.reload(ray_loader)
Loading