uNetworking / libvc

Vulkan Compute for C++ (experimentation project)
zlib License
131 stars 12 forks source link

Improve performance #2

Open ghost opened 8 years ago

ghost commented 8 years ago

I have two versions of case1, a benchmark that aims to measure dispatch launch overhead in Vulkan vs OpenCL. Currently the OpenCL version is faster (~400ms vs ~700ms) on my GTX 980. This is being investigated by NVIDIA driver devs - I could have made some big mistake but it might also be a driver issue since things are pretty beta still.

oscarbg commented 8 years ago

Interesting.. have you tested AMD Windows Vulkan driver or Intel Vulkan Linux driver to see dispatch overhead of Vulkan vs OpenCL on this platforms?

ghost commented 8 years ago

Nope I only have NVIDIA products :(

ghost commented 8 years ago

I did try the 364.12 drivers and there is still a difference between OpenCL and Vulkan in this regard. This needs to be improved to make Vulkan a decent alternative. I'm still in contact with NVIDIA regarding this issue.

ghost commented 8 years ago

Sorry for the delay, I haven't heard anything new from NVIDIA. I guess this project can serve as a guideline for the basics of Vulkan compute pipelines in the mean time. I really do hope they manage to improve the compute performance.

Delwin9999 commented 8 years ago

Any update to this? I'm looking at the possibility of using Vulkan on a rather large project that will need both intensive compute capability as well as graphics.

ghost commented 8 years ago

I reported the issue to NVIDIA and they were active in the beginning but then they stopped responding. The benchmark OpenCL vs Vulkan shows no improvement in kernel launch overhead but rather shows OpenCL to be faster which makes this project lose its meaning until NVIDIA fixes this. Theoretically Vulkan should offer lower kernel launch overhead since you can pre-record the command buffer which is not the case in OpenCL.

ghost commented 7 years ago

NVIDIA finally fixed this performance issue, my test case went from 800 ms down to 400 ms in Vulkan, roughly the same as OpenCL! Very good news, now I can really consider working more on this library!

ghost commented 7 years ago

Well I spoke too soon, they seem to have improved OpenCL also in this regard so now it's 200-300 ms OpenCL vs. 400 - 500 ms Vulkan. They cut the time in half for both APIs with this driver update in this regard.

oscarbg commented 7 years ago

Can share what driver (version) update are you talking about?

ghost commented 7 years ago

375.26 from 367.x (can't remember exactly which)

Andreyogld3d commented 5 years ago

Hi! thank you for your project. I have some problem: 1) Need to replace:https://github.com/uNetworking/libvc/blob/347a431008b58840792df65ce7167334bd3f9b94/src/main.cpp#L21 to Program program(device, "shaders/comp.spv", {BUFFER}); 2) I have crash on Intel HD 630: https://github.com/uNetworking/libvc/blob/347a431008b58840792df65ce7167334bd3f9b94/src/program.cpp#L55,

vanteew29 commented 5 years ago

@alexhultman - - @ [](url)