Fix complex scalar pointers in strided batched GEMM - #6086
Open
Arthur031221 wants to merge 1 commit into
Open
Arthur031221 wants to merge 1 commit into
Arthur031221 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or 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
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.
Callers of
cblas_cgemm_batch_stridedandcblas_zgemm_batch_stridedcan receive incorrect matrix values when using complexalphaandbeta. The strided batch interface stores the address of each local scalar pointer inblas_arg_t, so the GEMM kernel reads pointer bytes as the complex value. Pass the scalar pointers for complex builds and retain the scalar addresses for real builds.The added single and double precision tests use fixed 1x1 matrices. They expect
-14 + 24ifrom(2 + 3i)(1 + 2i)(3 + 4i) + (4 - i)(5 + 6i). Both tests failed before the fix and passed after it. Restoring the original source made both fail again.Tested with
make -j3 tests NO_LAPACK=1 NOFORTRAN=1 USE_THREAD=0: 137 core tests and 1,479 extension tests passed, with zero failures. This host has no Fortran compiler, so the LAPACK suite was not run.