Poor performance of Vulkan Compute Shaders using SwiftShader

58 views
Skip to first unread message

Zarsr

unread,
Nov 26, 2023, 12:55:41 AM11/26/23
to swiftshader
Hi

I tried using swiftshader to execute vulkan compute shaders on CPU.

I followed instructions from below link
https://github.com/google/swiftshader

Steps Followed:
clone the source code
cd build
cmake ..
cmake --build . --parallel

Build vk_swiftshader.dll (Release/x64) using Visual studio solution.
Copy vk_swiftshader.dll to <vulkan_compute_shader>.exe folder and rename it to vulkan-1.dll

Results:
Execution is fine and output is also fine. But performance is 5 to 10 times slower than single core CPU performance.
I mean convolution using for loops(normal c code) on CPU single core is faster than
using swiftshader + vulkan compute shader(written for GPU)

Query:
My compute shader is simple 2D convolution.
Is there anything I'm doing wrong.
How can I improve the performance using swiftshader
Reply all
Reply to author
Forward
0 new messages