calebwin / emu

The write-once-run-anywhere GPGPU library for Rust
https://calebwin.github.io/emu
MIT License
1.59k stars 53 forks source link

CUDA Support #15

Open ChipsSpectre opened 5 years ago

ChipsSpectre commented 5 years ago

Hey

is it planned to support binding to CUDA in the future? It would be a great enhancement I think :)

Best regards Chips

calebwin commented 5 years ago

CUDA could potentially get support at some point.

However, rather than creating multiple targets to support compiling Emu code to, I would prefer to compile Emu to some sort of bytecode or S-expressions and have a trait that can be implemented to generate CUDA or OpenCL or maybe even something else.

Note that if you want to run Emu functions on NVIDIA GPUs, many - if not all - are capable of having compiled OpenCL code run on them.

apriori commented 4 years ago

@calebwin Maybe look into https://github.com/gfx-rs/rspirv for SPIR-V generation. Or another approach: https://github.com/MaikKlein/rlsl.