deploying pre-compiled kernels (C++) #560
Unanswered
lfbuchmann
asked this question in
Q&A
Replies: 1 comment
-
Hi @lfbuchmann For anyone coming across this thread, please also refer to the end of this discussion. As I briefly mentioned in the thread above, I believe that this is reasonably achievable. It is definitely possible out-of-the box, you will need to understand and modify some Here are some pointers/tips:
We have a need/desire for a generalized solution to this problem of re-launching kernels, albeit it not being our top priority at the moment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
I would like to use mitsuba3 / drJit as a part of an integrated C++ pipeline. The aim is to infer properties of distinct objects that are captured in identical settings (lights, sensors, positions). The algorithm can be split up in two steps:
the key is to be able to apply step 2 repeatedly with new reference images, without having to re-compile the kernel and without invoking Python.
Minimal working example
Consider the following script:
Import necessary packages:
Create the scene:
Load a reference image, saved on disk as a numpy array :
The image contained in the array is the same scene, but with a uniformly red sphere. It can be obtained by rendering the scene with
sceneDict['sphere']
replaced byNow we set up a learning cycle to learn the red color of the sphere as a texture:
The output consist of the initial texture:
the initial rendering:
the texture after 100 iterations:
and the resulting rendering:
Checking the folder (AppData\Temp\drjit on windows) reveals 7 files with suffixes .cuda.bin and 3 "optix7cache.db*" files.
I now would like to write a C++ program that deploys the compiled kernels with a different choice of
referenceArray
without having to invoke python and recompile the kernels.Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions