Luxcore with CUDA

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Luxcore with CUDA

Post by bartek_zgo »

Hi Guys,
I'm using Luxcore via API (no Blender).
Luxcore detects my GPU:
opencl.device.0.platform.name = "NVIDIA Corporation"
opencl.device.0.platform.version = "OpenCL 1.2 CUDA"
opencl.device.0.name = "A10G"
opencl.device.0.type = "OPENCL_GPU"
opencl.device.0.units = 80
opencl.device.0.clock = 1710
opencl.device.0.nativevectorwidthfloat = 1
opencl.device.0.maxmemory = 23836098560
opencl.device.0.maxmemoryallocsize = 5959024640
opencl.device.0.localmemory = 49152
opencl.device.0.constmemory = 65536

but some reason does not use it. I looks that CUDA is disabled:
compile.LUXRAYS_DISABLE_OPENCL = 0
compile.LUXRAYS_ENABLE_OPENCL = 1
compile.LUXRAYS_DISABLE_CUDA = 1
compile.LUXRAYS_ENABLE_CUDA = 0
compile.LUXRAYS_ENABLE_OPTIX = 0
compile.LUXCORE_ENABLE_OIDN = 1
compile.LUXCORE_DISABLE_OIDN = 0
compile.LUXCORE_DISABLE_EMBREE_BVH_BUILDER = 0
compile.LC_MESH_MAX_DATA_COUNT = 8

When I create render session I get an error:
Error creating render session
No hardware device selected or available

I'm not sure about opencl.devices.select variable.
Should it be "1"?
User avatar
Odilkhan Yakubov
Posts: 208
Joined: Fri Jan 26, 2018 10:07 pm
Location: Tashkent, Uzbekistan

Re: Luxcore with CUDA

Post by Odilkhan Yakubov »

bartek_zgo wrote: Fri Apr 14, 2023 12:19 pm Hi.I'm not sure about opencl.devices.select variable.
Should it be "1"?
Hi. It looks like you have an older GPU card and you can just use LuxCore 2.1-2.4 not from 2.5 or so or upgrade your GPU card.
___________________________________________________________________________
LuxCoreRender Developer for Blender
___________________________________________________________________________
mib2berlin
Posts: 53
Joined: Fri Apr 06, 2018 6:29 pm

Re: Luxcore with CUDA

Post by mib2berlin »

bartek_zgo wrote: Fri Apr 14, 2023 12:19 pm Luxcore detects my GPU:
opencl.device.0.platform.name = "NVIDIA Corporation"
opencl.device.0.platform.version = "OpenCL 1.2 CUDA"
opencl.device.0.name = "A10G"
opencl.device.0.type = "OPENCL_GPU"
opencl.device.0.units = 80
opencl.device.0.clock = 1710
opencl.device.0.nativevectorwidthfloat = 1
opencl.device.0.maxmemory = 23836098560
opencl.device.0.maxmemoryallocsize = 5959024640
opencl.device.0.localmemory = 49152
opencl.device.0.constmemory = 65536

but some reason does not use it. I looks that CUDA is disabled:
compile.LUXRAYS_DISABLE_OPENCL = 0
compile.LUXRAYS_ENABLE_OPENCL = 1
compile.LUXRAYS_DISABLE_CUDA = 1
compile.LUXRAYS_ENABLE_CUDA = 0
compile.LUXRAYS_ENABLE_OPTIX = 0
compile.LUXCORE_ENABLE_OIDN = 1
compile.LUXCORE_DISABLE_OIDN = 0
This is a NVIDIA A10 Tensor Core GPU using the old OpenCL 1.2, it should support Cuda and Optix. I would try to disable OpenCL but I am not a compiling expert.
Do you have the Cuda toolkit installed?

Cheers, mib
User avatar
Odilkhan Yakubov
Posts: 208
Joined: Fri Jan 26, 2018 10:07 pm
Location: Tashkent, Uzbekistan

Re: Luxcore with CUDA

Post by Odilkhan Yakubov »

bartek_zgo wrote: Fri Apr 14, 2023 12:19 pm Hi Guys,
I'm using Luxcore via API (no Blender).
Luxcore detects my GPU:
opencl.device.0.platform.name = "NVIDIA Corporation"
opencl.device.0.platform.version = "OpenCL 1.2 CUDA"
opencl.device.0.name = "A10G"
opencl.device.0.type = "OPENCL_GPU"
opencl.device.0.units = 80
opencl.device.0.clock = 1710
opencl.device.0.nativevectorwidthfloat = 1
opencl.device.0.maxmemory = 23836098560
opencl.device.0.maxmemoryallocsize = 5959024640
opencl.device.0.localmemory = 49152
opencl.device.0.constmemory = 65536

but some reason does not use it. I looks that CUDA is disabled:
compile.LUXRAYS_DISABLE_OPENCL = 0
compile.LUXRAYS_ENABLE_OPENCL = 1
compile.LUXRAYS_DISABLE_CUDA = 1
compile.LUXRAYS_ENABLE_CUDA = 0
compile.LUXRAYS_ENABLE_OPTIX = 0
compile.LUXCORE_ENABLE_OIDN = 1
compile.LUXCORE_DISABLE_OIDN = 0
compile.LUXCORE_DISABLE_EMBREE_BVH_BUILDER = 0
compile.LC_MESH_MAX_DATA_COUNT = 8

When I create render session I get an error:
Error creating render session
No hardware device selected or available

I'm not sure about opencl.devices.select variable.
Should it be "1"?
Is this your GPU?
https://www.techpowerup.com/gpu-specs/a10g.c3798
___________________________________________________________________________
LuxCoreRender Developer for Blender
___________________________________________________________________________
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: Luxcore with CUDA

Post by bartek_zgo »

I've solved the issue.
The problem was a missing library. Luxcore coudn't find libnvrtc* libraries.
I found following comment in the code:
/// In all above cases, I just disable CUDA (but with this solution, at
/// the moment I have no way to report the type of error).
So luxcore was unable to load cuda, but there was no error.
Post Reply