-
Notifications
You must be signed in to change notification settings - Fork 38
symm op #1777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symm op #1777
Changes from 1 commit
cca8ff3
5a4b3a4
322bd41
0fd57e1
6c6fcc9
3622657
fdc56b4
8b05cdc
e77039c
95e2217
2452151
8a06166
96a819d
5751b52
180ee83
adb655f
024548c
a2abd76
1a86d57
fe6ee8e
54f5d5d
f498044
6e1a02c
1737a70
158b986
e5fc60f
155630f
41e2a67
90412ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -934,6 +934,34 @@ end | |
| return TracedRArray{T,N}((), MLIR.IR.result(conv), result_size) | ||
| end | ||
|
|
||
| @noinline function lapack_symm( | ||
| A::TracedRArray{T}, | ||
| B::TracedRArray{T}, | ||
| C::TracedRArray{T}, | ||
| alpha::TracedRNumber{T}, | ||
| beta::TracedRNumber{T}; | ||
| side::Symbol, | ||
| uplo::Symbol, | ||
| location=mlir_stacktrace("lapack_symm", @__FILE__, @__LINE__), | ||
| ) where {T} | ||
| ctx = MLIR.IR.context() | ||
| ressize = size(C) | ||
| res = MLIR.IR.result( | ||
| enzymexla.lapack_symm( | ||
| A.mlir_data, | ||
| B.mlir_data, | ||
| C.mlir_data, | ||
| alpha.mlir_data, | ||
| beta.mlir_data; | ||
| output=mlir_type(TracedRArray{eltype(C),length(ressize)}, ressize), | ||
| side=enzymexlaLapackSideAttrGet(ctx, side == :L ? 1 : 0), | ||
| uplo=enzymexlaLapackUploAttrGet(ctx, uplo == :U ? 1 : 0), | ||
| location, | ||
| ), | ||
| ) | ||
| return res | ||
|
||
| end | ||
|
|
||
| Base.@nospecializeinfer @noinline function dot_general( | ||
| @nospecialize(lhs::TracedRArray{T1}), | ||
| @nospecialize(rhs::TracedRArray{T2}); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -273,6 +273,38 @@ function overloaded_mul!( | |||||
| return C | ||||||
| end | ||||||
|
|
||||||
| function overloaded_mul!( | ||||||
| @nospecialize(C::TracedRArray{T,2} where {T}), | ||||||
| @nospecialize(A::Symmetric), | ||||||
| @nospecialize(B::AbstractMatrix), | ||||||
|
Comment on lines
+277
to
+279
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also add the version where B is Symmetric |
||||||
| α::Number=true, | ||||||
| β::Number=true, | ||||||
| ) | ||||||
| # Promote to traced arrays | ||||||
| A = call_with_reactant(Reactant.promote_to, TracedRArray, A.data) | ||||||
|
||||||
| A = call_with_reactant(Reactant.promote_to, TracedRArray, A.data) | |
| A = call_with_reactant(Reactant.promote_to, TracedRArray, parent(A)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eltype(c)make this into unwrapped_eltype