Skip to content

Commit

Permalink
Fix transposed lda on cache
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Oct 24, 2023
1 parent 9f7cb46 commit 4e5639c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion enzyme/Enzyme/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,7 @@ llvm::Value *transpose(IRBuilder<> &B, llvm::Value *V, bool cublas) {

// Implement the following logic to get the width of a matrix
// if (cache_A) {
// ld_A = (arg_transa == 'N') ? arg_m : arg_k;
// ld_A = (arg_transa == 'N') ? arg_k : arg_m;
// } else {
// ld_A = arg_lda;
// }
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Integration/ReverseMode/blas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static void gemvTests() {
lda);

// dB = alpha * trans(A) * dC + dB
cblas_dgemv(layout, transpose(transA), M, N, alpha, A_cache, M, dC, incC, 1.0, dB, incB);
cblas_dgemv(layout, transpose(transA), M, N, alpha, A_cache, N, dC, incC, 1.0, dB, incB);

// dY = beta * dY
cblas_dscal(trans ? N : M, beta, dC, incC);
Expand Down

0 comments on commit 4e5639c

Please sign in to comment.