Skip to content

Commit

Permalink
fix constant 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Sep 20, 2023
1 parent 5dab863 commit 7c42c2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion enzyme/Enzyme/BlasDerivatives.td
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def gemm : CallBlasPattern<(Op $layout, $transa, $transb, $m, $n, $k, $alpha, $A
//(Rows $transb, ____, $lda),
Constant<"1.0">, adj<"B">),
/* beta */ (FrobInnerProd<""> $m, $n, adj<"C">, input<"C">),
/* C */ (b<"lascl"> $layout, Char<"G">, ConstantInt<0>, ConstantInt<0>, Constant<"1.0">, $beta, $m, $n, adj<"C">, ConstantInt<0>)
/* C */ (b<"lascl"> $layout, Char<"G">, ConstantInt<0>, ConstantInt<0>, Constant<"1.0">, $beta, $m, $n, adj<"C">)
]
>;

Expand Down
2 changes: 1 addition & 1 deletion enzyme/tools/enzyme-tblgen/blas-tblgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ void rev_call_args(StringRef argName, Rule &rule, size_t actArg,
}
os << " if (byRef) {\n";
int n = 0;
if (func == "gemv")
if (func == "gemv" || func == "lascl")
n = 1;
if (func == "gemm")
n = 2;
Expand Down

0 comments on commit 7c42c2f

Please sign in to comment.