coreylowman / dfdx

Deep learning in Rust, with shape checked tensors and neural networks
Other
1.74k stars 98 forks source link

Kernels written in rust-gpu #925

Open LegNeato opened 7 months ago

LegNeato commented 7 months ago

I'd like to add support for rust-gpu in the not-so-distant future. I have some questions while I figure out the plan:

  1. Would it make sense to have shaders written with rust-gpu to be hung off the webgpu device? rust-gpu can be used with wgpu but it isn't a requirement...should it have it's own device? A combo of [host api] + [rust-gpu]?
  2. How should I handle CPU and rust-gpu kernels being similar or perhaps the same? Should it be one kernel impl that is gated by cfg() or should it be split out into two regardless of overlap?
  3. Do you want the kernels written from scratch or should something like https://github.com/charles-r-earp/krnl be leveraged?
LegNeato commented 2 months ago

@coreylowman Any thoughts? I'll have time to work on this in the coming month.