-
Notifications
You must be signed in to change notification settings - Fork 9
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
Patches for Lux integration #7
Conversation
3186dee
to
ab01055
Compare
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.
Could array interface be done in an extension package if it's not in base
Done |
@@ -7,7 +7,7 @@ function transpose_val(val) | |||
return MLIR.IR.result(MLIR.Dialects.stablehlo.transpose(val, permutation=attr), 1) | |||
end | |||
|
|||
function apply(f, args...; kwargs) | |||
function apply(f, args...; kwargs...) |
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.
Can you add a test for what needed this. I somehow recall the other way being intentional but maybe not
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.
This came up in computing the gradient of the model with Enzyme. But that code is not completely functional yet, see LuxDL/Lux.jl#665 (comment)
Ah looking at that error I think we should trace the primal and shadow
arrays into tracedrarrays so then the duplicates invariant holds. We'll
need the data as an rarray anyways to run it
…On Mon, May 27, 2024, 11:33 PM Avik Pal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/utils.jl
<#7 (comment)>:
> @@ -7,7 +7,7 @@ function transpose_val(val)
return MLIR.IR.result(MLIR.Dialects.stablehlo.transpose(val, permutation=attr), 1)
end
-function apply(f, args...; kwargs)
+function apply(f, args...; kwargs...)
This came up in computing the gradient of the model with Enzyme. But that
code is not completely functional yet, see LuxDL/Lux.jl#665 (comment)
<LuxDL/Lux.jl#665 (comment)>
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXFWCLE53NPEVDMVQGLZEORCZAVCNFSM6AAAAABIKKBQG6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAOBRGQ4DANZQGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
However separate from this fix (which ought be done regardless) it is
surprising that the original model is not an rarray as I would expect. That
should probably be fixed in lux
…On Mon, May 27, 2024, 11:36 PM Billy Moses ***@***.***> wrote:
Ah looking at that error I think we should trace the primal and shadow
arrays into tracedrarrays so then the duplicates invariant holds. We'll
need the data as an rarray anyways to run it
On Mon, May 27, 2024, 11:33 PM Avik Pal ***@***.***> wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In src/utils.jl
> <#7 (comment)>:
>
> > @@ -7,7 +7,7 @@ function transpose_val(val)
> return MLIR.IR.result(MLIR.Dialects.stablehlo.transpose(val, permutation=attr), 1)
> end
>
> -function apply(f, args...; kwargs)
> +function apply(f, args...; kwargs...)
>
> This came up in computing the gradient of the model with Enzyme. But that
> code is not completely functional yet, see LuxDL/Lux.jl#665 (comment)
> <LuxDL/Lux.jl#665 (comment)>
>
> —
> Reply to this email directly, view it on GitHub
> <#7 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJTUXFWCLE53NPEVDMVQGLZEORCZAVCNFSM6AAAAABIKKBQG6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAOBRGQ4DANZQGY>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
I am pulling out the patches from #5, so that we can get them in faster