AnswerDotAI / gpu.cpp

A lightweight library for portable low-level GPU computation using WebGPU.
https://gpucpp.answer.ai
Apache License 2.0
3.75k stars 177 forks source link

Does gpu.cpp support f64 or i64? #45

Open ghostplant opened 3 months ago

ghostplant commented 3 months ago

I wrote some kernels based on this framework, and I found datatypes for f64 and i64 are not defined.

MichealReed commented 3 months ago

Looks like float32 and halfs, maybe a contribution could be added to https://github.com/AnswerDotAI/gpu.cpp/tree/main/numeric_types for f64?

ghostplant commented 3 months ago

I don't think so. Unlike f16, datatype f64 is not defined in dawn so maybe more contribution should be in dawn?

MichealReed commented 3 months ago

Thanks for investigating. Maybe you could reach out to the author here to ask about contributing this?

https://developer.chrome.com/blog/new-in-webgpu-120

Dawn uses Gerrit here

https://dawn-review.googlesource.com/q/status:open+-is:wip

I have not even begun to digest their roadmap though.

MichealReed commented 3 months ago

Well, seems wgsl doesn't support f64 yet? https://webgpufundamentals.org/webgpu/lessons/webgpu-wgsl-function-reference.html

seems possible https://github.com/gfx-rs/wgpu/pull/1154