-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8859de2
Patches for Lux integration
avik-pal 38779f9
Move ArrayInterface to an Extension
avik-pal d85ff84
Don't eval in __init__
avik-pal 0d4b541
Use broadcasting to construct the TracedRArray
avik-pal 1bcd90a
Add copyto!
avik-pal 4952b70
Run formatter
avik-pal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Reactant" | ||
uuid = "3c362404-f566-11ee-1572-e11a4b42c853" | ||
authors = ["William Moses <[email protected]>", "Valentin Churavy <[email protected]>"] | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
|
||
[deps] | ||
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" | ||
|
@@ -12,16 +12,19 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250" | |
Reactant_jll = "0192cb87-2b54-54ad-80e0-3be72ad8a3c0" | ||
|
||
[weakdeps] | ||
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" | ||
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" | ||
|
||
[extensions] | ||
ReactantArrayInterfaceExt = "ArrayInterface" | ||
ReactantNNlibExt = "NNlib" | ||
|
||
[compat] | ||
Cassette = "0.3" | ||
ArrayInterface = "7.10" | ||
CEnum = "0.4, 0.5" | ||
Cassette = "0.3" | ||
Enzyme = "0.11, 0.12" | ||
Reactant_jll = "0.0.6" | ||
NNlib = "0.9" | ||
Preferences = "1.4" | ||
Reactant_jll = "0.0.6" | ||
julia = "1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module ReactantArrayInterfaceExt | ||
|
||
using ArrayInterface: ArrayInterface | ||
using Reactant: RArray | ||
|
||
ArrayInterface.can_setindex(::Type{<:RArray}) = false | ||
ArrayInterface.fast_scalar_indexing(::Type{<:RArray}) = false | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)