-
Notifications
You must be signed in to change notification settings - Fork 67
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
@turbo not doing LoopVectorization on Float64 #541
Comments
It works by passing This is a limitation of how the package is implemented. |
Is there a way to explicitly define a function for a Float64 SIMD object. I tried the below but it doesn't work.
I'd like to run Since Julia is so much about structs and performance I would have thought this would be supported. |
Ah, yeah, I was lazy in the implementation and just check if it works for LoopVectorization.jl/src/condense_loopset.jl Line 997 in cdd9ef1
Most of the functions are either fully generic, or only work with integers, so AFAIK no one noticed.
Any particular motivation for not supporting Alternatively, make a PR that runs a naive type inference (avoiding the base type inference, which we can do due to not being generic) on LV's internal IR to infer the correct types, and use this in I have not had much time to work on performance lately, but my future work has all moved to LoopModels (which will not have any of these problems, due to working at a lower level). |
I was trying to understand the basics. Ultimately I'd like to use
|
More general use case. A portfolio of financial products. Thousands of trades and dozens of product types. Each product type has a Struct and a Value function which takes the struct as an input. All the trades of a product type could be stored as a StructArray. For each product type I'd like to run the valuations vectorized. GPU is fast but has other disadvantages. I was hoping vmap or @tturbo might be a good substitute. |
You could get it to work with some manual effort. Or, you can make a PR to add explicit Note that I no longer use Julia, nor do I maintain LoopVectorization or the JuliaSIMD ecosystem, so I'm unlikely to make any of these changes myself. I can, however, answer questions or describe approaches, so that those who do have time and stand to benefit can take over. |
Any help is appreciated. If I understand correctly you're saying any solution would involve re-writing the structs and function inputs. |
It's not about the hardware, but that LoopVectorization.jl's implementation is bad/limited. This is why LoopModels would fix this. |
I hope they build it (don't think I'm smart enough to help there) :) |
Seems to fail for Float64 and AbstractFloat but works for real and more general types.
Also, should it be able to work on structs as in the X1 example at the bottom.
The text was updated successfully, but these errors were encountered: