You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use an ultrabook with an eGPU (1080Ti) over TB3, when i have it plugged in everything works fine. When it's not connected attempting to enable BlendLuxCore I get the following error.
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\addon_utils.py", line 382, in enable
mod.register()
File "C:\Users\error\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\BlendLuxCore\__init__.py", line 93, in register
pyluxcore.Init(LuxCoreLog.add)
RuntimeError: CUDA driver API error CUDA_ERROR_UNKNOWN (code: 999, file:C:\lambda\luxcorerender\LuxCore\src\luxrays\core\init.cpp, line: 71): unknown error
Problem
The issue is that even though I have CUDA installed but no CUDA devices we're getting past line 67 of init.cpp
66const CUresult err = cuInit(0);
67if (err == CUDA_ERROR_NO_DEVICE) {
68// This handles the case when CUDA is installed but there are no69// NVIDIA GPUs installed.70 } else {
71CHECK_CUDA_ERROR(err);
7273 isCudaAvilable = true;
I built LuxCore after changing line 67 to be simply
67if ( true ) {
and when using the freshly built binaries BlendLuxCore behaves correctly and I'm able to render and use lux as expected. As best I can tell this means the problem has to be that the check on line 67 is failing to detect my particular no-cuda-device situation.
I think I can probably fix this myself and submit a PR, but I am not super familiar with C++, my next step is to log the actual error or analyze the state to see what it's returning and make sure we add whatever weird config I've ended up in to this check. I'm not sure what the easiest way to debug this is so any help on that front would be appreciated.
P.S. I'm also able to attempt a CPU render by unplugging my eGPU after enabling BlendLuxCore which results in a different error message. (sorry about the image)
I think this might(??) be a separate issue, but I haven't dug into the code to try and understand it. The question is, if the renderer is set to CPU in blender, why is CUDA attempting to initialize at all? However if isCudaAvilable = false; there is no problem, so as long as we fix the above issue this may be irrelevant.
P.P.S. What's the correct way to update the version of LuxCore inside BlendLuxCore, i was just copying over my freshly built pyluxcore.pyd which i'm sure is a bad idea for many reasons.
This is more a bug in CUDA because it should report an CUDA_ERROR_NO_DEVICE in your case instead of a CUDA_ERROR_UNKNOWN. However it is easy to work around: I modified the code to disable CUDA for any type of cuInit() error (not just CUDA_ERROR_NO_DEVICE).
This should work in your case too.
As far as I know, CUDA doesn't really support plugging/unplugging a GPU so you have still to restart Blender if you are connecting/disconnecting your device half way.
About CPU rendering: LuxCore uses GPU also for image pipeline (if CUDA is available) so it used also when doing CPU-only rendering. There is an option in BlendLuxCore to force the use of CPU for the image pipeline too (I'm not sure where it is, it may be in the camera panel).
Updating pyluxcore.pyd file is the only required step if you are not modifying the LuxCore Python API.
howetuft
pushed a commit
to howetuft/LuxCore
that referenced
this issue
Jan 16, 2021
Background
For background regarding this situation see this commit and this issue
I use an ultrabook with an eGPU (1080Ti) over TB3, when i have it plugged in everything works fine. When it's not connected attempting to enable BlendLuxCore I get the following error.
Problem
The issue is that even though I have CUDA installed but no CUDA devices we're getting past line 67 of init.cpp
I built LuxCore after changing line 67 to be simply
and when using the freshly built binaries BlendLuxCore behaves correctly and I'm able to render and use lux as expected. As best I can tell this means the problem has to be that the check on line 67 is failing to detect my particular no-cuda-device situation.
I think I can probably fix this myself and submit a PR, but I am not super familiar with C++, my next step is to log the actual error or analyze the state to see what it's returning and make sure we add whatever weird config I've ended up in to this check. I'm not sure what the easiest way to debug this is so any help on that front would be appreciated.
P.S. I'm also able to attempt a CPU render by unplugging my eGPU after enabling BlendLuxCore which results in a different error message. (sorry about the image)
I think this might(??) be a separate issue, but I haven't dug into the code to try and understand it. The question is, if the renderer is set to CPU in blender, why is CUDA attempting to initialize at all? However if
isCudaAvilable = false;
there is no problem, so as long as we fix the above issue this may be irrelevant.P.P.S. What's the correct way to update the version of LuxCore inside BlendLuxCore, i was just copying over my freshly built
pyluxcore.pyd
which i'm sure is a bad idea for many reasons.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: