Skip to content

Commit 3782e4e

Browse files
committed
fix: lower linalg ops to lapack
1 parent 5c71c2d commit 3782e4e

File tree

3 files changed

+44
-1086
lines changed

3 files changed

+44
-1086
lines changed

src/enzyme_ad/jax/Dialect/EnzymeXLAAttrs.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def EnzymeXLA_SVDAlgorithm : I32EnumAttr<"SVDAlgorithm",
8787
[
8888
I32EnumAttrCase<"DEFAULT", 0>,
8989
I32EnumAttrCase<"QRIteration", 1>,
90-
I32EnumAttrCase<"DivideAndConquer", 2>
90+
I32EnumAttrCase<"DivideAndConquer", 2>,
91+
I32EnumAttrCase<"Jacobi", 3>
9192
]> {
9293
let genSpecializedAttr = 0;
9394
let cppNamespace = "::mlir::enzymexla";

src/enzyme_ad/jax/Integrations/c/EnzymeXLA.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ MlirAttribute enzymexlaSVDAlgorithmAttrGet(MlirContext ctx, int32_t mode) {
7575
break;
7676
case 2:
7777
algorithm = mlir::enzymexla::SVDAlgorithm::DivideAndConquer;
78+
break;
79+
case 3:
80+
algorithm = mlir::enzymexla::SVDAlgorithm::Jacobi;
81+
break;
7882
}
7983
return wrap(mlir::enzymexla::SVDAlgorithmAttr::get(unwrap(ctx), algorithm));
8084
}

0 commit comments

Comments
 (0)