DKMK100
DKMK100
CC#
Created by DKMK100 on 4/6/2023 in #help
❔ reduce CPU/GPU transfer ComputeSharp
I'm working on a project with ComputeSharp, and I'm struggling with the problem where I need to run a lot of compute shaders one after another. Is there a way to control this process from the GPU, so that my code isn't significantly slowed down? Or how should I go about this? I can't just move it all into one shader because some of them depend on the results of the previous one and there is obviously no way to synchronize.
30 replies
CC#
Created by DKMK100 on 3/19/2023 in #help
✅ ComputeSharp and activation functions
I'm working on making a neural net that I'm running on the GPU with the help of a library called ComputeSharp, and I want to use only pre-compiled shaders, but I also wanna have multiple activation function options so each layer can use a different activation function. The thing is, I have no idea how I can do this without manually writting a bunch of different versions of each shader, for use with each activation function. I can't pass the activation function as a parameter since that would mean having to compile the shaders at runtime, and I'm hoping to avoid that. Is there an alternative I can use, possibly something akin to c++ templates? Anyone here familiar with the library or know a solution I can use?
52 replies