-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Parsing to wrap Level 3 BLAS routines syr2k/her2k #48
Comments
Doing this in the parser is not really the direction we should be heading here, IMO, but it's not entirely clear how else to approach it. |
It would be nice if, at some point, the parser provided hooks to allow user code to analyze and rewrite expressions like this. Kevin |
Yes. We've discussed this forever and haven't come up with anything satisfactory yet. It's really hard to make something like this not super brittle. |
The only thing that comes to mind is something like Haskell rewrite rules. |
Honestly, I'm not even sure we should do this. It's getting into "sufficiently clever compiler" territory. Having the |
Yeah, it leaves me a bit cold too. |
I wouldn't mind trying out rewrite rules and it would be better if they can be expressed in julia rather than being part of the parser. Rewrite rules combined with type inference could make it possible for us to efficiently deal with a lot of array expressions.
The other big thing is reusing memory in something like |
That approach is certainly better than mucking with the parser. |
@ViralBShah's idea was sort of what I had in mind. I take it that this is implemented on top of the base Julia parser? |
Yes, there would be no parser changes. These would be patterns that the compiler can match and apply if it is able to. They are advisory and for performance only. |
Yeah, that's the clearly the way to go then. |
@JeffBezanson do you think anything like #48 will ever happen? If not, we should probably close this issue. |
Adding this to the parser seems quite unlikely due to how dynamic Julia has become. |
PR JuliaLang/julia#4813 provides a BLAS wrapper to the symmetric rank 2k update function
syr2k
, which provides the updates:Is it worth parsing Julia expressions of this form and turning them into calls to
syr2k
/her2k
?The text was updated successfully, but these errors were encountered: