-
Notifications
You must be signed in to change notification settings - Fork 22
Insert call instructions (without any caching) #1276
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
base: main
Are you sure you want to change the base?
Conversation
…ure the latter can be removed?
….fill` instead of creating an uninitialized TracedRArray
…urse through the object. This is useful for constructing a new traced object without altering the paths.
…thing. This now handles that.
It checks the contents of the generated MLIR which is different when call operations are generated.
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
Lines 1105 to 1113 in 68e7079
traced_result = push_inst!(Expr( | |
:call, | |
GlobalRef(Core, :_apply_iterate), | |
Base.iterate, | |
call_epilogue, | |
push_inst!(Expr(:call, GlobalRef(Core, :tuple), fn_args[1], push_inst!(Expr(:call, GlobalRef(Core, :tuple), fn_args[2:end]...)))), | |
push_inst!(Expr(:call, GlobalRef(Core, :tuple), traced_result)), | |
push_inst!(Expr(:call, GlobalRef(Reactant, :get_args_from_finalize_function), finalize_function_result)), | |
)) |
[JuliaFormatter] reported by reviewdog 🐶
Lines 1117 to 1122 in 68e7079
push_inst!(Expr( | |
:call, | |
GlobalRef(Base, :setindex!), | |
GlobalRef(Reactant, :TRACE_CALLS), | |
should_trace_call, | |
)) |
[JuliaFormatter] reported by reviewdog 🐶
Lines 1125 to 1130 in 68e7079
push_inst!(Expr( | |
:call, | |
GlobalRef(Base, :setindex!), | |
GlobalRef(Reactant, :TRACE_CALLS), | |
TRACE_CALLS[], | |
)) |
… call operation for blacklisted operations but not for the functions called within them.
This reverts commit 7c732dc.
Status:
|
…oadcastFunction
…en calling `make_tracer` on the `AnyTracedRArray`.
@@ -675,14 +675,14 @@ function Base.similar( | |||
::Broadcasted{AbstractReactantArrayStyle{N}}, ::Type{T}, dims | |||
) where {T<:Reactant.ReactantPrimitive,N} | |||
@assert N isa Int | |||
return TracedRArray{T,length(dims)}((), nothing, map(length, dims)) | |||
return Ops.fill(zero(unwrapped_eltype(T)), dims) |
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.
minor, but could we make a smaller PR with some of these utilities to get that in first (and confirm everything works)
No description provided.