-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable external brgemm API on aarch64 #4406
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
base: main
Are you sure you want to change the base?
Conversation
2732fea to
92dc07a
Compare
92dc07a to
81a50ce
Compare
jondea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally good, two minor questions.
| return status::success; | ||
| } | ||
|
|
||
| status_t init_conf(brgemm_matmul_conf_t &conf, dim_t batch, dim_t M, dim_t K, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does adding the external brgemm interface mean we add a new function for the internal brgemm_matmul?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That init_conf is used by the transform, which is used for packing of B. We could move this logic elsewhere, I was just focusing on following the x64 approach as closely as possible for this initial version.
|
Also, can we make sure this is tested in CI somehow? |
As it is right now, building with |
|
I'd lean towards just enabling |
This change is an initial implementation of the external brgemm API for aarch64, mostly directly based on the existing x64 code. For now, only supports f32 is supported, with support for int8 and bf16 (and further improvements) to come in later patches building on this baseline implementation.
To test this change, enable
DNNL_EXPERIMENTAL_UKERNELbefore compiling, then run benchdnn with--brgemmas usual. As an alternative to benchdnn, you can useexamples/ukernels/cpu_brgemm.cpp, though it has to be changed slightly to use f32 instead of int8 and not set AB scales.