-
Notifications
You must be signed in to change notification settings - Fork 22
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
update OneMKL gemm_batch
call inside dpnp.matmul
and column_major version of gemm
#1793
Conversation
View rendered docs @ https://intelpython.github.io/dpnp/pull//index.html |
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.
This is a great improvement. Thank you @vtavana !
split batch_size to smaller chunks and gemm with column major when both input array F-contig
gemm_batch
call inside dpnp.matmul
gemm_batch
call inside dpnp.matmul
and column_major version of gemm
Timing for calling
|
Timing for calling
|
Timing for calling
|
…eep their alphabetic order
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.
Thank you @vtavana , no more comments from me
In this PR,
oneapi::mkl::blas::column_major::gemm
andoneapi::mkl::blas::column_major::gemm_batch
are added to be used indpnp.matmul
when the base of input arrays is f-contiguous.In addition, the
gemm_batch
is updated to improve the performance for some cases by keeping the base of intermediate arrays the same as input arrays (working with arrays views instead of copying).Also, for large values of
batch_size
ingemm_batch
, thebatch_size
is split to smaller chunk sizes to avoid OneMKL error.