forked from boostorg/ublas
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Gemm #50
Open
imre-palik
wants to merge
14
commits into
uBLAS:feature/ublas00004_simd_gemm
Choose a base branch
from
imre-palik:gemm
base: feature/ublas00004_simd_gemm
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Gemm #50
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix bug in weak equality check
Add a simple convenience function to calculate the square norm (norm_2) of a vector
Commit e6b113 changed the `size_type` typedef to be based on the container and in doing so missed the case in vector_norm_2 when BOOST_UBLAS_SCALED_NORM is define. Also added test cases.
Fix compilation error when BOOST_UBLAS_SCALED_NORM is defined
This patch includes the gemm implementation from Michael Lehn to boost::ublas. This modifies the workings of ublas::prod() and ublas::axppy_prod() to use gemm() above a certain matrix size. This patch only contains the basic architecture, and a generic c++ implementation. Signed-off-by: Imre Palik <[email protected]> Cc: Michael Lehn <[email protected]>
This patch contains an optimised, vectorised kernel, using gcc's SIMD vectors. This reaches matrix multiplication speeds comparable to hand-crafted assembly kernels on x86 Haswell microarchitecture. The kernels are compile-time parametrisable, ans the patch also contains optimised kernel parameters for float, double, and long double. The validity of the parameters are checked during compile-time, but the produced compile error can be relatively obscure if vector_length is too big. For architectures that doesn't support vectorisation for all types, it is possible to specify parameters that cause really suboptimal code generation. But as far as I see code correctness is ensured. Signed-off-by: Imre Palik <[email protected]> Cc: Michael Lehn <[email protected]>
This patch increases the range of BLAS level 3 benchmarks for dense matrices up to 1000*1000 matrices. Signed-off-by: Imre Palik <[email protected]>
This patch enables the optimised kernel for clang. Sadly, when compiled by clang, the performance of this kernel on Haswell is approximately half of the kernel compiled by gcc. But it is still way faster than anything else. Signed-off-by: Imre Palik <[email protected]>
…ix multiplication If the preprocessor macro BOOST_UBLAS_LEGACY_PRODUCT is defined, then both prod() and axpy_prod() falls back to the legacy matrix multiplication algorithm. Signed-off-by: Imre Palik <[email protected]>
This patch contains optimised kernels for multiplying complex matrices, together with the kernel parameters I find decently performing on Haswell. Signed-off-by: Imre Palik <[email protected]>
This patch adds vectorised kernel support for icc. It is implemented using cilk arrays. It is tested on icc16, whith older versions your mileage may vary. The resulting kernel is still half the speed of the one compiled by gcc. Signed-off-by: Imre Palik <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes since last request: