3 ms·
> I don't think anyone on HN that regularly uses CUDA would call graphics compute ergonomic I use CUDA, but DirectCompute is OK too. > I often see complaints
by Const-me 6y ago
> I don't think anyone on HN that regularly uses CUDA would call graphics compute ergonomic
I use CUDA, but DirectCompute is OK too.
> I often see complaints about it
People complain about all technologies they use. The more popular the technology is, the more complaints on the internets you gonna see.
My largest complaint about graphics compute is inability to spawn threads in runtime. DispatchIndirect and append buffers often help to workaround, but still limited, not really an equivalent to CUDA’s dynamic parallelism.
> rather than anything better or worse about either model
Not sure what do you mean by that?
CUDA exposes more stuff (dynamic parallelism mentioned above, intrinsics to shuffle data across threads, and a few others) but still, the model is pretty much the same. These CUDA’s triple angle brackets directly map to Dispatch arguments, and [numthreads] values in HLSL.
- Impossible 6y agoInstrinics to shuffle data around threads exist in graphics compute but only are really supported in DX12 (WaveInstrinics) and Vulkan (subgroup). They were first introduced to game developers widely on consoles (Xbox One and PS4), but also exist in a more limited form as vendor specific extensions in DX11 (and I think OpenGL). Callable shaders (https://docs.microsoft.com/en-us/windows/win32/direct3d12/callable-shader https://docs.microsoft.com/en-us/windows/win32/direct3d12/ca...) in DX12 and Vulkan might give you the dynamic dispatch functionality you want. They are usable in ray generation shaders but I'm not sure if they can be used in general purpose compute yet. The better or worse comment was more about having a heterogeneous environment vs using a graphics API to dispatch compute. I agree that generally speaking they are the same though, after all it's the same hardware.