-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Use more abstract types to create a hierarchy #15
Conversation
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.
AI-Maintainer Review for PR - Use more abstract types to create a hierarchy
Title and Description ⚠️
The title is clear but the description is missing
The title of the pull request is clear and provides a concise summary of the changes. However, the description is missing. It would be beneficial to include a description that provides more context and explains the rationale for using more abstract types and creating a hierarchy.
Code Changes 👍
The changes are narrowly focused and relevant
The changes in the pull request are narrowly focused on introducing more abstract types to create a hierarchy. The diff primarily consists of the addition of new abstract types and their respective subtypes, along with a few modifications to existing types. There are no indications of the author attempting to resolve multiple issues simultaneously.
Testing ⚠️
Information about testing is missing
The description does not provide any information about how the changes were tested. It would be beneficial to include details about the testing approach taken to ensure the correctness and functionality of the introduced abstract types and their subtypes.
Documentation ⚠️
Docstrings for new types are missing
The newly added abstract types and their subtypes do not have docstrings. It would be beneficial to include docstrings that describe their behavior, arguments, and return values.
Suggested Changes
- Please add a description that provides more context and explains the rationale for the changes.
- Please provide information about how the changes were tested.
- Please add docstrings for the newly added abstract types and their subtypes.
Reviewed with AI Maintainer
src/ADTypes.jl
Outdated
struct AutoEnzyme{M} <: AbstractADType | ||
mode::M | ||
end | ||
|
||
AutoEnzyme(; mode = nothing) = AutoEnzyme(mode) |
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.
Should we split Enzyme into forward and reverse modes to fit into this better?
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.
I was conflicted about this as well. The mode
field should take the choice per the current definition. That can be the Enzyme Forward
and Reverse
objects directly, it's nothing
because a default mode doesn't make sense to me it would be completely up the package if they want to put a default mode.
src/ADTypes.jl
Outdated
struct AutoZygote <: AbstractADType end | ||
struct AutoZygote <: AbstractReverseMode end | ||
|
||
struct AutoSparseZygote <: AbstractSparseReverseMode end | ||
|
||
struct AutoEnzyme{M} <: AbstractADType |
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.
struct AutoEnzyme{M} <: AbstractADType | |
struct AutoEnzyme{M} <: Union{AutoForwardMode, AutoReverseMode, AutoSparseForwardMode, AutoSparseReverseMode} |
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 could be an option to keep dispatches happy 😅 but will put all the onus on the downstream package developer to make sure it's used with M
being checked
Co-authored-by: Avik Pal <avik.pal.2017@gmail.com>
c2cab51
to
238281a
Compare
No description provided.