Page 2 of 7

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

Posted: Wed May 27, 2020 10:43 pm
by Dade
Windows never stop to amaze me (a limited stack size in 2020...), I should have fixed the problem in the latest sources.

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

Posted: Thu May 28, 2020 12:52 pm
by u3dreal
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.

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

Posted: Thu May 28, 2020 1:27 pm
by Dade
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).

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

Posted: Thu May 28, 2020 1:33 pm
by u3dreal
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 ??

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

Posted: Thu May 28, 2020 1:46 pm
by Dade
You don't need any OpenCL or CUDA header or library to compile the code, it is the magic of dynamic loading of DLLs.

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

Posted: Thu May 28, 2020 2:22 pm
by u3dreal
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 ...

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

Posted: Thu May 28, 2020 3:11 pm
by acasta69
I think that the NVRTC DLLs are still needed, they are not shipped with the drivers.

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

Posted: Thu May 28, 2020 7:27 pm
by acasta69
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.

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

Posted: Thu May 28, 2020 7:59 pm
by u3dreal
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 ??

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

Posted: Thu May 28, 2020 8:37 pm
by acasta69
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.