-
Notifications
You must be signed in to change notification settings - Fork 10
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
Split should_rewrite_ft
for call
and invoke
expressions, and overlay Base._unique_dims
#505
Conversation
src/utils.jl
Outdated
function should_rewrite_invoke(@nospecialize(ft), @nospecialize(args)) | ||
Core.println(Core.stderr, "[should_rewrite_invoke] ft = $ft, parameters = $(args)") |
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.
[JuliaFormatter] reported by reviewdog 🐶
function should_rewrite_invoke(@nospecialize(ft), @nospecialize(args)) | |
Core.println(Core.stderr, "[should_rewrite_invoke] ft = $ft, parameters = $(args)") |
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.
probably remove the print?
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.
yeah, i'm using the prints for debugging. invokelatest
is just calling the generic should_rewrite_invoke
method, and not the specialized one for Base.unique
.
will remove them once i fix it.
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.
yeah I'm just suggesting to use https://github.com/JuliaLang/julia/blob/37b8b61ee0bd4b8db1b210a5389cf794a1358ed1/base/essentials.jl#L1062 instead where world is interp.world
end | ||
if Base.invokelatest(should_rewrite_ft, ft) && !is_reactant_method(omi) | ||
argsig = Core.apply_type(Core.Tuple, argsig...) |
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'd probably be lazy and do Tuple{argsize...} but sure
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.
it's the same right?
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.
yeah
@mofeing what if you change it to invoke_in_world and use the world from the absint/generated fn? |
I previously tried and failed to get the defn to work with overloads like you have it, but had no luck (and hence there's the weird cuda overload check inside of). cc @gbaraldi if you have any ideas? |
mmm not sure what you mean. do you mind if i merge, and then we discuss this on wednesday? |
ah sorry replied in wrong place, but yeah do you mind giving """I'm just suggesting to use https://github.com/JuliaLang/julia/blob/37b8b61ee0bd4b8db1b210a5389cf794a1358ed1/base/essentials.jl#L1062 instead where world is interp.world""" a quick go to see if that fixes things? |
if not applylatest works |
should_rewrite_ft
for call
and invoke
expressionsshould_rewrite_ft
for call
and invoke
expressions, and overlay Base._unique_dims
This should fix #493 but
invokelatest
is skipping the method ofshould_rewrite_invoke
forBase.unique
?