Page 3 of 7

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Thu May 28, 2020 9:35 pm
by u3dreal
OK i copied ..

libnvrtc.dylib and versions
libnvrct-buildins.dylib and versions

in the luxcoreui dir
i renamed my cuda dir

cuda seems enabled but no cuda device found

Code: Select all

[LuxRays][11.197] OpenCL support: enabled
[LuxRays][11.197] OpenCL Platform 0: Apple
[LuxRays][11.198] CUDA support: enabled
[LuxRays][11.198] Device 0 name: Native
[LuxRays][11.198] Device 0 type: NATIVE_THREAD
[LuxRays][11.198] Device 0 compute units: 1
[LuxRays][11.198] Device 0 preferred float vector width: 4
[LuxRays][11.198] Device 0 max allocable memory: 17592186044415MBytes
[LuxRays][11.198] Device 0 max allocable memory block size: 17592186044415MBytes
[LuxRays][11.198] Device 0 has out of core memory support: 0
[LuxRays][11.198] Device 1 name: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
[LuxRays][11.198] Device 1 type: OPENCL_CPU
[LuxRays][11.198] Device 1 compute units: 8
[LuxRays][11.198] Device 1 preferred float vector width: 4
[LuxRays][11.198] Device 1 max allocable memory: 16384MBytes
[LuxRays][11.198] Device 1 max allocable memory block size: 4096MBytes
[LuxRays][11.198] Device 1 has out of core memory support: 0
[LuxRays][11.198] Device 2 name: Iris Pro
[LuxRays][11.198] Device 2 type: OPENCL_GPU
[LuxRays][11.198] Device 2 compute units: 40
[LuxRays][11.198] Device 2 preferred float vector width: 1
[LuxRays][11.198] Device 2 max allocable memory: 1536MBytes
[LuxRays][11.198] Device 2 max allocable memory block size: 384MBytes
[LuxRays][11.198] Device 2 has out of core memory support: 0
[LuxRays][11.198] Device 3 name: GeForce GT 750M
[LuxRays][11.198] Device 3 type: OPENCL_GPU
[LuxRays][11.198] Device 3 compute units: 2
[LuxRays][11.198] Device 3 preferred float vector width: 1
[LuxRays][11.198] Device 3 max allocable memory: 2048MBytes
[LuxRays][11.198] Device 3 max allocable memory block size: 512MBytes
[LuxRays][11.198] Device 3 has out of core memory support: 0
RenderSession starting error: 
Hardware device selection string has the wrong length, must be 3 instead of 4
Where does lux look for the libs ??

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Thu May 28, 2020 9:43 pm
by Dade
acasta69 wrote: Thu May 28, 2020 7:27 pm Defining LUXRAYS_DISABLE_CUDA and LUXRAYS_DISABLE_OPENCL seems to have no effect: LuxCoreUI still allows to choose OCL render engines. I'll try to check why this happens.
Yes but it should have no device available at all for the rendering. I guess it could be removed from the menu too.

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Thu May 28, 2020 9:45 pm
by Dade
u3dreal wrote: Thu May 28, 2020 2:22 pm which files are needed by lux then ??? only the installed driver ?So i will not have to add any .dylib files ?? And no patching :) That sounds unbelievable
This will make things alot easier ...
One thing is to compile from the source (nothing is required), another thing is to run the generated executable (drivers and DLLs are required).

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Thu May 28, 2020 9:51 pm
by Dade
u3dreal wrote: Thu May 28, 2020 9:35 pm Where does lux look for the libs ??
CUDA => https://github.com/LuxCoreRender/LuxCor ... w.cpp#L341
NVRTC => https://github.com/LuxCoreRender/LuxCor ... w.cpp#L634
OpenCL => https://github.com/LuxCoreRender/LuxCor ... w.cpp#L167

CUEW and CLEW are the same libraries used by Blender to dynamically load CUDA and OpenCL so if Blender works, Lux should work too however Blender doesn't use NVRTC (so it should be the only reason why Blender works and Lux doesn't).

Indeed, we can add additional paths where to search the DLLs.

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Thu May 28, 2020 9:55 pm
by u3dreal
Does that mean cuda libs were found ?

Code: Select all

[LuxRays][10.703] CUDA support: enabled

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Thu May 28, 2020 10:49 pm
by Dade
u3dreal wrote: Thu May 28, 2020 9:55 pm Does that mean cuda libs were found ?

Code: Select all

[LuxRays][10.703] CUDA support: enabled
No, it means the code has been compiled with CUDA support. You will have a:

Code: Select all

CUDA support: available
After that line if CUDA has been also found: https://github.com/LuxCoreRender/LuxCor ... t.cpp#L104

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Thu May 28, 2020 11:25 pm
by u3dreal
Does luxcore look in the directory it is in ? or will we have to add that manually .

like @rpath for osx ?

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Fri May 29, 2020 9:37 am
by u3dreal
cool adding @executable_path makes luxcoreui work ... so i guess i will just add the other paths for the bundle and pyluxcore ... i guess it uses the same paths Wow that makes the compiling on azure really easy ... just copy the libs ...
:)

Code: Select all

[LuxRays][19.683] OpenCL support: enabled
[LuxRays][19.683] OpenCL Platform 0: Apple
[LuxRays][19.683] CUDA support: enabled
[LuxRays][19.683] CUDA support: available
[LuxRays][19.683] CUDA driver version: 10.10
[LuxRays][19.683] CUDA device count: 1
[LuxRays][19.683] Device 0 name: Native
[LuxRays][19.683] Device 0 type: NATIVE_THREAD
[LuxRays][19.683] Device 0 compute units: 1
[LuxRays][19.683] Device 0 preferred float vector width: 4
[LuxRays][19.683] Device 0 max allocable memory: 17592186044415MBytes
[LuxRays][19.683] Device 0 max allocable memory block size: 17592186044415MBytes
[LuxRays][19.683] Device 0 has out of core memory support: 0
[LuxRays][19.683] Device 1 name: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
[LuxRays][19.683] Device 1 type: OPENCL_CPU
[LuxRays][19.683] Device 1 compute units: 8
[LuxRays][19.683] Device 1 preferred float vector width: 4
[LuxRays][19.683] Device 1 max allocable memory: 16384MBytes
[LuxRays][19.683] Device 1 max allocable memory block size: 4096MBytes
[LuxRays][19.683] Device 1 has out of core memory support: 0
[LuxRays][19.683] Device 2 name: Iris Pro
[LuxRays][19.683] Device 2 type: OPENCL_GPU
[LuxRays][19.683] Device 2 compute units: 40
[LuxRays][19.683] Device 2 preferred float vector width: 1
[LuxRays][19.683] Device 2 max allocable memory: 1536MBytes
[LuxRays][19.683] Device 2 max allocable memory block size: 384MBytes
[LuxRays][19.683] Device 2 has out of core memory support: 0
[LuxRays][19.683] Device 3 name: GeForce GT 750M
[LuxRays][19.683] Device 3 type: OPENCL_GPU
[LuxRays][19.683] Device 3 compute units: 2
[LuxRays][19.683] Device 3 preferred float vector width: 1
[LuxRays][19.683] Device 3 max allocable memory: 2048MBytes
[LuxRays][19.683] Device 3 max allocable memory block size: 512MBytes
[LuxRays][19.683] Device 3 has out of core memory support: 0
[LuxRays][19.683] Device 4 name: GeForce GT 750M
[LuxRays][19.683] Device 4 type: CUDA_GPU
[LuxRays][19.683] Device 4 compute units: 192
[LuxRays][19.683] Device 4 preferred float vector width: 1
[LuxRays][19.683] Device 4 max allocable memory: 2047MBytes
[LuxRays][19.683] Device 4 max allocable memory block size: 17592186044415MBytes
[LuxRays][19.683] Device 4 has out of core memory support: 1

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Fri May 29, 2020 10:20 am
by Dade
Ok, so it looks like everything is ok, I will merge the branch than we will have to update Azure build process to build only one type of executable.

Re: Unified executable (for CPU-only, OpenCL and CUDA)

Posted: Fri May 29, 2020 10:24 am
by Dade
Dade wrote: Fri May 29, 2020 10:20 am Ok, so it looks like everything is ok, I will merge the branch
Done.