-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access hardware accelerated vector types #1922
Comments
There is currently no way to use those in Futhark. We've been reluctant to support them since they don't exist for all our targets. It's definitely something it would be nice to have, though. It's possible we could make them available through an FFI (once we finally get around to adding that as well). |
You could include vector types, and have the implementation be dependent on the target. So, the vectors could be structs for C, and hardware accelerated vectors for OpenCL. If I understand correctly, that's the same sort of thing as what you did with |
Yes, but while we already have a mechanism for target-dependent code generation of parallel constructs, we don't have a notion of target-dependent primitive types, so the engineering effort is somewhat larger. The current IR wouldn't even be able to express these types, except as small arrays. It's a design question (even more challenging than an engineering question!) whether that is an appropriate representation. It probably is. |
I don't have experience with Futhark internals, but I do have experience coding. Let me know if there's anything I can do to help. |
That being said, I'd have to learn Haskell, so I can't help soon. |
I've heard that GPUs are designed to do operations on glsl
vec
types quickly. So, adding twovec3
s takes less then three times as long as adding twofloat
s. I think that OpenCLfloatn
types are equivalent, so is there a way to write code that uses those in Futhark code? I want to do some ray tracing, and I want my code to be as fast as possible, because of how computationally intensive ray tracing is.The text was updated successfully, but these errors were encountered: