3 ms·
I don't think anyone on HN that regularly uses CUDA would call graphics compute ergonomic, and I often see complaints about it. I also see graphics programmers
by Impossible 6y ago
I don't think anyone on HN that regularly uses CUDA would call graphics compute ergonomic, and I often see complaints about it. I also see graphics programmers using CUDA complain about graphics interop (although Opti-X seems pretty good), so it might be the result of different use cases, rather than anything better or worse about either model.
- shmerl 6y agoSo you think there is no need to make something different for Rust than using it as a shading language for Vulkan, or GPU programming can be improved with different approaches? Basically, I'd like there to be something that's ergonomic, using Rust and can eventually help get rid of CUDA lock-in.
- Impossible 6y agoI think there is a need for it. I'm not sure if this will become that, although it might be a piece of it. There seem to be multiple projects to build CUDA like environments (or CUDA itself to Rust.
- 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.