PATHGPU with OpenCL and CUDA support

Discussion related to the LuxCore functionality, implementations and API.
juangea
Donor
Posts: 216
Joined: Thu Jan 02, 2020 6:23 pm

Re: PATHGPU with OpenCL and CUDA support

Post by juangea » Tue Apr 21, 2020 7:25 am

OMG... I have no words... I’m gonna cry... thanks...

PetrT
Posts: 56
Joined: Sun Dec 02, 2018 6:13 pm

Re: PATHGPU with OpenCL and CUDA support

Post by PetrT » Tue Apr 21, 2020 7:57 am

It is awesome))

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

Re: PATHGPU with OpenCL and CUDA support

Post by acasta69 » Tue Apr 21, 2020 8:13 am

I gave it a try and... :(
On my system OpenCL runs about 9% faster than 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

User avatar
lacilaci
Donor
Posts: 1941
Joined: Fri May 04, 2018 5:16 am

Re: PATHGPU with OpenCL and CUDA support

Post by lacilaci » Tue Apr 21, 2020 9:34 am

acasta69 wrote:
Tue Apr 21, 2020 8:13 am
I gave it a try and... :(
On my system OpenCL runs about 9% faster than Cuda.
I don't know if this is a bad or a good thing :D But I'm expecting some proper perf. improvements once Dade starts adding cuda specific stuff.

User avatar
Sharlybg
Donor
Posts: 2575
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PATHGPU with OpenCL and CUDA support

Post by Sharlybg » Tue Apr 21, 2020 9:42 am

acasta69 wrote:
Tue Apr 21, 2020 8:13 am
I gave it a try and... :(
On my system OpenCL runs about 9% faster than Cuda.
maybe this will vary from card to card also that run on 2070 super and you probably on GTX 970. but as Dade say he assume there is more performance left.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

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

Re: PATHGPU with OpenCL and CUDA support

Post by Dade » Tue Apr 21, 2020 11:03 am

acasta69 wrote:
Tue Apr 21, 2020 8:13 am
I gave it a try and... :(
On my system OpenCL runs about 9% faster than Cuda.
I'm fixing a lot of stuff and CUDA has a lot of settings and configurations for each generation of GPU. Said that, I have now done more tests and the speedup is quite consistent with my RTX.

P.S. are you selecting only the CUDA device, right ? NVIDIA GPUs are now listed 2 times, one as OpenCL device and one as CUDA. I'm also doing the test with 0 CPU threads.
Support LuxCoreRender project with salts and bounties

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

Re: PATHGPU with OpenCL and CUDA support

Post by acasta69 » Tue Apr 21, 2020 11:51 am

Dade wrote:
Tue Apr 21, 2020 11:03 am
P.S. are you selecting only the CUDA device, right ? NVIDIA GPUs are now listed 2 times, one as OpenCL device and one as CUDA. I'm also doing the test with 0 CPU threads.
Yes, I tried selecting different devices with e.g.

Code: Select all

opencl.devices.select = 001
The speed is smaller when CUDAIntersect is used and higher with OpenCLIntersect. The 8% speed difference is calculated only with GPU rays/second, though.
Also, how can I get rid of native threads? The following does not have any effect :

Code: Select all

native.threads.count = 0
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
Dade
Developer
Posts: 4978
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PATHGPU with OpenCL and CUDA support

Post by Dade » Tue Apr 21, 2020 12:40 pm

acasta69 wrote:
Tue Apr 21, 2020 11:51 am
The speed is smaller when CUDAIntersect is used and higher with OpenCLIntersect. The 8% speed difference is calculated only with GPU rays/second, though.
The result shouldn't change but the performance is usally measured with the samples/sec counter.
acasta69 wrote:
Tue Apr 21, 2020 11:51 am
Also, how can I get rid of native threads? The following does not have any effect :

Code: Select all

native.threads.count = 0
With this:

Code: Select all

opencl.native.threads.count = 0
Support LuxCoreRender project with salts and bounties

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

Re: PATHGPU with OpenCL and CUDA support

Post by acasta69 » Tue Apr 21, 2020 5:36 pm

Dade wrote:
Tue Apr 21, 2020 12:40 pm
The result shouldn't change but the performance is usally measured with the samples/sec counter.
Yes, I used the other value to exclude the native threads that I could not switch off.
Now, without native threads and samples/sec as reference, I have 12% faster performance with OpenCL.

I assume it is ok to use the Cuda-enabled executable and select either the Cuda or the OpenCL device, right?
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
Dade
Developer
Posts: 4978
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PATHGPU with OpenCL and CUDA support

Post by Dade » Tue Apr 21, 2020 6:21 pm

acasta69 wrote:
Tue Apr 21, 2020 5:36 pm
I assume it is ok to use the Cuda-enabled executable and select either the Cuda or the OpenCL device, right?
Yes, the default PATHOCL behavior now is to use only CUDA devices if at least one is available, this will work fine on NVIDIA-only installation where GPUs are exposed 2 times (and it will work fine with NVIDIA-without installation too where only OpenCL devices are used). Inded, aside the case where you explicitly select what devices to use.
Support LuxCoreRender project with salts and bounties

Post Reply