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

Discussion related to the LuxCore functionality, implementations and API.
User avatar
u3dreal
Developer
Posts: 411
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

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

Post by u3dreal » Thu May 28, 2020 9:35 pm

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 ??
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - High Sierra
Xeon X5650@4Ghz, 2x GTX 770 Phantom RX 5700 - Catalina / High Sierra, Windows 10, Ubuntu 18.04

User avatar
Dade
Developer
Posts: 4389
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Thu May 28, 2020 9:43 pm

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.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 4389
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Thu May 28, 2020 9:45 pm

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).
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 4389
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Thu May 28, 2020 9:51 pm

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.
Support LuxCoreRender project with salts and bounties

User avatar
u3dreal
Developer
Posts: 411
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

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

Post by u3dreal » Thu May 28, 2020 9:55 pm

Does that mean cuda libs were found ?

Code: Select all

[LuxRays][10.703] CUDA support: enabled
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - High Sierra
Xeon X5650@4Ghz, 2x GTX 770 Phantom RX 5700 - Catalina / High Sierra, Windows 10, Ubuntu 18.04

User avatar
Dade
Developer
Posts: 4389
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Thu May 28, 2020 10:49 pm

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
Support LuxCoreRender project with salts and bounties

User avatar
u3dreal
Developer
Posts: 411
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

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

Post by u3dreal » Thu May 28, 2020 11:25 pm

Does luxcore look in the directory it is in ? or will we have to add that manually .

like @rpath for osx ?
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - High Sierra
Xeon X5650@4Ghz, 2x GTX 770 Phantom RX 5700 - Catalina / High Sierra, Windows 10, Ubuntu 18.04

User avatar
u3dreal
Developer
Posts: 411
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

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

Post by u3dreal » Fri May 29, 2020 9:37 am

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
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - High Sierra
Xeon X5650@4Ghz, 2x GTX 770 Phantom RX 5700 - Catalina / High Sierra, Windows 10, Ubuntu 18.04

User avatar
Dade
Developer
Posts: 4389
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Fri May 29, 2020 10:20 am

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.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 4389
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Fri May 29, 2020 10:24 am

Dade wrote:
Fri May 29, 2020 10:20 am
Ok, so it looks like everything is ok, I will merge the branch
Done.
Support LuxCoreRender project with salts and bounties

Post Reply