Skip to content

Commit

Permalink
[BLAS] fix row transpose arg
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Sep 19, 2023
1 parent 3870f89 commit 47d2f54
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions enzyme/test/Enzyme/ReverseMode/blas/gemv_f_c_split_blascpy.ll
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ entry:
; CHECK-NEXT: store i64 1, i64* %byref.constant.int.1
; CHECK-NEXT: %intcast.constant.int.1 = bitcast i64* %byref.constant.int.1 to i8*
; CHECK-NEXT: call void @dgemv_64_(i8* %malloccall, i8* %m_p, i8* %n_p, i8* %fpcast.constant.fp.1.0, i8* %A, i8* %lda_p, i8* %20, i8* %intcast.int.one, i8* %fpcast.constant.fp.0.0, i8* %19, i8* %intcast.constant.int.1)
; CHECK-NEXT: %ld.row.trans = load i8, i8* %byref.transpose.transa
; CHECK-NEXT: %ld.row.trans = load i8, i8* %malloccall
; CHECK-DAG: %[[c1:.+]] = icmp eq i8 %ld.row.trans, 110
; CHECK-DAG: %[[c2:.+]] = icmp eq i8 %ld.row.trans, 78
; CHECK-NEXT: %[[c3:.+]] = or i1 %[[c2]], %[[c1]]
Expand All @@ -203,7 +203,7 @@ entry:
; CHECK-NEXT: store double 1.000000e+00, double* %byref.constant.fp.1.09
; CHECK-NEXT: %fpcast.constant.fp.1.010 = bitcast double* %byref.constant.fp.1.09 to i8*
; CHECK-NEXT: call void @dgemv_64_(i8* %byref.transpose.transa, i8* %m_p, i8* %n_p, i8* %alpha, i8* %A, i8* %lda_p, i8* %"y'", i8* %incy_p, i8* %fpcast.constant.fp.1.010, i8* %"x'", i8* %incx_p)
; CHECK-NEXT: %ld.row.trans11 = load i8, i8* %byref.transpose.transa
; CHECK-NEXT: %ld.row.trans11 = load i8, i8* %malloccall
; CHECK-DAG: %[[r39:.+]] = icmp eq i8 %ld.row.trans11, 110
; CHECK-DAG: %[[r40:.+]] = icmp eq i8 %ld.row.trans11, 78
; CHECK-NEXT: %41 = or i1 %[[r40]], %[[r39]]
Expand All @@ -213,7 +213,7 @@ entry:
; CHECK-NEXT: %45 = load double, double* %44
; CHECK-NEXT: %46 = fadd fast double %45, %43
; CHECK-NEXT: store double %46, double* %44
; CHECK-NEXT: %ld.row.trans12 = load i8, i8* %byref.transpose.transa
; CHECK-NEXT: %ld.row.trans12 = load i8, i8* %malloccall
; CHECK-DAG: %[[r47:.+]] = icmp eq i8 %ld.row.trans12, 110
; CHECK-DAG: %[[r48:.+]] = icmp eq i8 %ld.row.trans12, 78
; CHECK-NEXT: %49 = or i1 %[[r48]], %[[r47]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ entry:
; CHECK-NEXT: br i1 %rt.inactive.beta, label %invertentry.beta.done, label %invertentry.beta.active

; CHECK: invertentry.beta.active: ; preds = %invertentry.A.done
; CHECK-NEXT: %ld.row.trans = load i8, i8* %byref.transpose.transa
; CHECK-NEXT: %ld.row.trans = load i8, i8* %malloccall
; CHECK-DAG: %[[r39:.+]] = icmp eq i8 %ld.row.trans, 110
; CHECK-DAG: %[[r40:.+]] = icmp eq i8 %ld.row.trans, 78
; CHECK-NEXT: %[[r41:.+]] = or i1 %[[r40]], %[[r39]]
Expand All @@ -194,7 +194,7 @@ entry:
; CHECK-NEXT: br i1 %rt.inactive.y, label %invertentry.y.done, label %invertentry.y.active

; CHECK: invertentry.y.active: ; preds = %invertentry.beta.done
; CHECK-NEXT: %ld.row.trans2 = load i8, i8* %byref.transpose.transa
; CHECK-NEXT: %ld.row.trans2 = load i8, i8* %malloccall
; CHECK-DAG: %[[r47:.+]] = icmp eq i8 %ld.row.trans2, 110
; CHECK-DAG: %[[r48:.+]] = icmp eq i8 %ld.row.trans2, 78
; CHECK-NEXT: %[[r49:.+]] = or i1 %[[r48]], %[[r47]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ entry:
; CHECK-NEXT: store double 1.000000e+00, double* %byref.constant.fp.1.0
; CHECK-NEXT: %fpcast.constant.fp.1.0 = bitcast double* %byref.constant.fp.1.0 to i8*
; CHECK-NEXT: call void @dgemv_64_(i8* %byref.transpose.transa, i8* %m_p, i8* %n_p, i8* %alpha_p, i8* %A, i8* %lda_p, i8* %"y'", i8* %incy_p, i8* %fpcast.constant.fp.1.0, i8* %"x'", i8* %incx_p)
; CHECK-NEXT: %ld.row.trans = load i8, i8* %byref.transpose.transa
; CHECK-NEXT: %ld.row.trans = load i8, i8* %malloccall
; CHECK-DAG: %[[r2:.+]] = icmp eq i8 %ld.row.trans, 110
; CHECK-DAG: %[[r3:.+]] = icmp eq i8 %ld.row.trans, 78
; CHECK-NEXT: %26 = or i1 %[[r3]], %[[r2]]
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 @@ -1042,7 +1042,7 @@ void rev_call_arg(StringRef argName, DagInit *ruleDag, Rule &rule,
auto tname = Dag->getArgNameStr(0);
auto rname = Dag->getArgNameStr(1);
auto cname = Dag->getArgNameStr(2);
os << "get_blas_row(Builder2, arg_transposed_" << tname << ", arg_"
os << "get_blas_row(Builder2, arg_" << tname << ", arg_"
<< rname << ", arg_" << cname << ", byRef)";
} else if (Def->isSubClassOf("MagicInst") && Def->getName() == "ld") {
assert(Dag->getNumArgs() == 5);
Expand Down

0 comments on commit 47d2f54

Please sign in to comment.