-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
How to implement a new routine CLBlastSDgemm() to get the float and double type of Matrix C #427
Comments
I'm not sure what you mean exactly. Do you ask how to add the proposed computation to the CLBlast library (with the purpose of upstreaming it and making it available to all users) or do you ask how to modify your own copy of CLBlast locally to achieve this computation? If you ask for the first, I would say it is not general enough to benefit other users so I would rather leave it out. If you ask the latter, then you'll need to introduce new code in both the indirect GEMM here and the direct GEMM here. And of course modify the data-types and function arguments. Let me know if you need more help and for what specifically. |
I mean the latter case, i.e., How to modify my own copy of CLBlast locally to achieve this new computation.
But, How to modify the above to perform double |
Hmm lots of detailed questions, not sure if I can answer them all. If I were you I would just hack it in and not really create a new function, assuming the regular single-precision case as a starting point. Then use a separate CLBlast for the regular functions. Would that work?
That depends a bit on what you want to achieve. You could do either of:
Note that I'm not sure how expensive this cast is and what exactly your precision requirements are. You could choose to accumulate a few values and only then cast to doubles.
I would just replace all definitions of
Indeed, as I said above, also there you might have to change the data-types. Perhaps introducing this
I wouldn't do that, just replace the original one. If you really want to you'll need to modify https://github.com/CNugteren/CLBlast/blob/master/src/routines/level3/xgemm.cpp to support that new case, which isn't easy, because it is currently templated on a single data-type. And you'll mix two, so that won't work in the current design. You can copy that whole thing of course and make a separate version specifically for your |
|
As the requirement of our development, we need to obtain another higher precision matrix mutiplication of float A and float B, i.e., double type of C (cd_buffer). The compute procedure is shown as following:
How to add the new code to implement the newly introducted routine
CLBlastSDgemm
in CLBlast?@kpot @matze @umar456 @tholu @CNugteren
The text was updated successfully, but these errors were encountered: