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

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Posts: 4392
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Wed May 27, 2020 10:43 pm

Windows never stop to amaze me (a limited stack size in 2020...), I should have fixed the problem in the latest sources.
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 12:52 pm

OSX works fine :) NVIDIA and APPLE drivers. Using LUXRAYS_ENABLE_OPENCL and LUXRAYS_ENABLE_CUDA .

Also a sidenote compilation time
CUDA 3min
NV OPENCL 6min
APPLE OPENCL 14min

Will test on APPLE AMD drivers this evening.
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: 4392
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 1:27 pm

u3dreal wrote:
Thu May 28, 2020 12:52 pm
Using LUXRAYS_ENABLE_OPENCL and LUXRAYS_ENABLE_CUDA .
Defining symbols should be not required any more. Binaries will have now always the potential ability to work with CUDA and OpenCL if the drivers are available when run.

You can use LUXRAYS_DISABLE_OPENCL and LUXRAYS_DISABLE_CUDA if you really want to produce binaries that can not support GPUs (but it should be never required).
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 1:33 pm

Well then i will have to find out how to compile with cuda on a system that does not support cuda...
But it is files and libs after all ..

luxcoreui seems to be liked against :shock:

Does cuda get linked in statically ???

Code: Select all

MacBook-Pro:LuxCore drquader$ otool -L build/Release/luxcoreui 
build/Release/luxcoreui:
	@rpath/libomp.dylib (compatibility version 5.0.0, current version 5.0.0)
	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 23.0.0)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1560.12.0)
	/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
	@rpath/libembree3.3.dylib (compatibility version 3.0.0, current version 3.0.0)
	@rpath/libOpenImageDenoise.0.dylib (compatibility version 0.0.0, current version 1.2.0)
	@rpath/libtbb.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libtiff.5.dylib (compatibility version 11.0.0, current version 11.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	@rpath/libOpenImageIO.1.8.dylib (compatibility version 1.8.0, current version 1.8.13)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1671.10.106)
	/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1247.4.1)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1560.12.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
there does not seem to be a dynamic dependency anymore ??
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: 4392
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 1:46 pm

You don't need any OpenCL or CUDA header or library to compile the code, it is the magic of dynamic loading of 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 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 ...
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

acasta69
Developer
Posts: 329
Joined: Tue Jan 09, 2018 3:45 pm

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

Post by acasta69 » Thu May 28, 2020 3:11 pm

I think that the NVRTC DLLs are still needed, they are not shipped with the drivers.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87

acasta69
Developer
Posts: 329
Joined: Tue Jan 09, 2018 3:45 pm

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

Post by acasta69 » Thu May 28, 2020 7:27 pm

The unified executables seem to work fine on Windows, both standalone and in blender.

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

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87

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 7:59 pm

acasta69 wrote:
Thu May 28, 2020 7:27 pm
LuxCoreUI still allows to choose OCL render engines. I'll try to check why this happens.
What is so bad about that ? On Linux you can use NVIDIA and AMD GPU together ... i plan to do that ... :D
What dlls do you need to copy ??
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

acasta69
Developer
Posts: 329
Joined: Tue Jan 09, 2018 3:45 pm

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

Post by acasta69 » Thu May 28, 2020 8:37 pm

u3dreal wrote:
Thu May 28, 2020 7:59 pm
What is so bad about that ? On Linux you can use NVIDIA and AMD GPU together ... i plan to do that ... :D
What dlls do you need to copy ??
Well, nothing so bad I guess... ;)
Only, it's not the expected behaviour...

The needed DLLs on Windows are nvrtc64_101_0.dll and nvrtc-builtins64_101.dll.
They are not included in drivers, they come with the SDK and Nvidia allows to redistribute them.
If they are missing, the unified executable does not find CUDA.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87

Post Reply