complex blas reverse mode gemv/gemm - #3190
Open
ymardoukhi wants to merge 10 commits into
Open
ymardoukhi wants to merge 10 commits into
ymardoukhi wants to merge 10 commits into
Conversation
- removed the gurd for the `c` and `z` flags to enable reverse-mode for
BLAS functions.
- `dot` and `ger` have no `{c,z}dot` or `{c,z}ger` equivalent.
Admittable ones are `dot{u,c}` and `ger{u,c}` for (un)conjugated
variants.
real CBLAS passes alpha/beta by value, but complex CBLAS treat thems as pointers (const void*). The definition of byRefFloat didn't account for this.
swapping CblasNoTrans<->CblasConjTrans (111<->113) for complex. Similar to N<->C swap for the Fortran's case.
relax the check to receive complex values. Also use `dotc` instead of `dot` for the Frobenius product of the matrices.
getRealValuedConstant(fpType, val) helper builds a proper {val, 0.0} vector
when fpType is complex. `Constant<val>` for complex produced wrong {val, val}
vector.
only the "active A, C" and "active A, B, C" cases; overwrite, namely `ow` not covered here as they require lacpy/copy
added cblas_zgemm/cblas_zlascl mocks to blasinfra.h. overwrite needs A/B caching via lacpy and is skipped.
Member
|
Related #3181 |
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.
During JuliaCon, Billy told me that the infrastructure already exists for handling BLAS over complex numbers. So I gave it a shot with the help of Claude. This Intends to extend the support for AD over complex numbers.
littests are skipped because I don't have the knowledge. If someone could guide me on how to write them, I will take care of it.cuBLASand support for thetransA=Tcase for Fortran fall outside the scope of this PR.c/zchars.transflag swaps are checked and addressedConstant<>for complex values created1.0 + i1.0. Have it fixedcheckMemoryTraceuseselem_sizeinstead ofsizeof(double)zgemvTestsandzgemmTests