Using BLAS backend for Blaze library #10
JanGaertner
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Blaze and BLAS
Balze is an already pretty powerful tool for matrix and vector multiplications. For improved performance it can be compiled together with a suitable BLAS library to use the processors potential to the fullest extend.
To test this effect I had added the blis library of the FLAME project. This library is a portable BLAS like library that works on several architectures. Thus, I choose this library, configured it for the zen architecture of Ryzen Pro processor in my own machine and linked it with the Blaze library.
After a first benchmark test I saw that nothing had changed to the state before. The reason for this was the setting of the threshold values in the Blaze config files. By default the Blaze library uses cblas functions only for matrix vector multiplications if the matrix has over 400.000 entries. However, within the WENO library we deal with much smaller matrices in the WENOCoeff functions. Therefore, the cblas library was never used.
Yet, reducing the threshold to an appropriate value for the WENO library lead to a 25% decrease in performance! Probably caused by the small size of the matrices.
Changing the cache values in the Blaze config did also not give significant changes. Overall it seems that the default values of the Blaze library were already a good fit. This might not be the case for your setup and testing at least changes of the cache can be interesting to increase performance.
Beta Was this translation helpful? Give feedback.
All reactions