-
Notifications
You must be signed in to change notification settings - Fork 8
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
Interp2 #365
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
src/TracedRArray.jl
Outdated
import ..ancestor | ||
import ReactantCore | ||
import ..TracedUtils: materialize_traced_array | ||
import GPUArraysCore |
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 🐶
import GPUArraysCore | |
using GPUArraysCore: GPUArraysCore |
src/TracedRArray.jl
Outdated
get_ancestor_indices(::TracedRArray, indices...) = indices | ||
function get_ancestor_indices(x::WrappedTracedRArray, indices...) | ||
return get_ancestor_indices(parent(x), Base.reindex(parentindices(x), indices)...) | ||
end | ||
|
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 🐶
src/TracedRArray.jl
Outdated
|
||
function Base.getindex( | ||
a::TracedRArray{T,N}, index::Vararg{Union{Int,TracedRNumber{Int}},N} | ||
) where {T,N} | ||
GPUArraysCore.assertscalar("getindex(::TracedRArray, ::Vararg{Int, N})") | ||
|
||
start_indices = [promote_to(TracedRNumber{Int}, i - 1).mlir_data for i in index] | ||
start_indices = [TracedUtils.promote_to(TracedRNumber{Int}, i - 1).mlir_data for i in index] |
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 🐶
start_indices = [TracedUtils.promote_to(TracedRNumber{Int}, i - 1).mlir_data for i in index] | |
start_indices = [ | |
TracedUtils.promote_to(TracedRNumber{Int}, i - 1).mlir_data for i in index | |
] |
src/TracedRArray.jl
Outdated
(TracedUtils.promote_to(TracedRNumber{Int}, i isa Colon ? 1 : first(i)) - 1).mlir_data for | ||
i in indices |
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 🐶
(TracedUtils.promote_to(TracedRNumber{Int}, i isa Colon ? 1 : first(i)) - 1).mlir_data for | |
i in indices | |
( | |
TracedUtils.promote_to(TracedRNumber{Int}, i isa Colon ? 1 : first(i)) - 1 | |
).mlir_data for i in indices |
src/TracedRArray.jl
Outdated
return traced2_result | ||
end | ||
TracedUtils.promote_to(::Type{TracedRArray{T,N}}, rhs) where {T,N} = TracedRArray{T,N}(rhs) | ||
TracedUtils.promote_to(::TracedRArray{T,N}, rhs) where {T,N} = TracedUtils.promote_to(TracedRArray{T,N}, rhs) |
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 🐶
TracedUtils.promote_to(::TracedRArray{T,N}, rhs) where {T,N} = TracedUtils.promote_to(TracedRArray{T,N}, rhs) | |
function TracedUtils.promote_to(::TracedRArray{T,N}, rhs) where {T,N} | |
return TracedUtils.promote_to(TracedRArray{T,N}, rhs) | |
end |
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.
src/TracedRNumber.jl
Outdated
end | ||
|
||
Base.float(x::TracedRNumber{T}) where {T} = promote_to(TracedRNumber{float(T)}, x) | ||
Base.float(x::TracedRNumber{T}) where {T} = TracedUtils.promote_to(TracedRNumber{float(T)}, x) |
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 🐶
Base.float(x::TracedRNumber{T}) where {T} = TracedUtils.promote_to(TracedRNumber{float(T)}, x) | |
function Base.float(x::TracedRNumber{T}) where {T} | |
return TracedUtils.promote_to(TracedRNumber{float(T)}, x) | |
end |
src/TracedUtils.jl
Outdated
|
||
struct TypeCast{T<:ReactantPrimitive} <: Function end | ||
|
||
(::TypeCast{T})(x::TracedRNumber{T2}) where {T,T2} = TracedUtils.promote_to(TracedRNumber{T}, x) |
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 🐶
(::TypeCast{T})(x::TracedRNumber{T2}) where {T,T2} = TracedUtils.promote_to(TracedRNumber{T}, x) | |
function (::TypeCast{T})(x::TracedRNumber{T2}) where {T,T2} | |
return TracedUtils.promote_to(TracedRNumber{T}, x) | |
end |
src/TracedUtils.jl
Outdated
end | ||
|
||
seen_results = OrderedIdDict() | ||
traced2_result = Reactant.make_tracer(seen_results, result, (), Reactant.TracedSetPath; tobatch=OutShape) |
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 🐶
traced2_result = Reactant.make_tracer(seen_results, result, (), Reactant.TracedSetPath; tobatch=OutShape) | |
traced2_result = Reactant.make_tracer( | |
seen_results, result, (), Reactant.TracedSetPath; tobatch=OutShape | |
) |
lib/ReactantCore/src/ReactantCore.jl
Outdated
@@ -153,15 +153,15 @@ function trace_for(mod, expr) | |||
|
|||
all_syms = Expr(:tuple, counter, external_syms...) | |||
args_init = Expr( | |||
:tuple, :(Reactant.promote_to(Reactant.TracedRNumber{Int}, 0)), external_syms... | |||
:tuple, :(Reactant.TracedUtils.promote_to(Reactant.TracedRNumber{Int}, 0)), external_syms... |
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 🐶
:tuple, :(Reactant.TracedUtils.promote_to(Reactant.TracedRNumber{Int}, 0)), external_syms... | |
:tuple, | |
:(Reactant.TracedUtils.promote_to(Reactant.TracedRNumber{Int}, 0)), | |
external_syms..., |
src/linear_algebra.jl
Outdated
using ..TracedUtils: | ||
get_mlir_data, | ||
materialize_traced_array, | ||
set_mlir_data! |
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 🐶
using ..TracedUtils: | |
get_mlir_data, | |
materialize_traced_array, | |
set_mlir_data! | |
using ..TracedUtils: get_mlir_data, materialize_traced_array, set_mlir_data! |
ext/ReactantNNlibExt.jl
Outdated
@@ -329,7 +332,7 @@ function NNlib.gather!(dst::TracedRArray, src::AnyTracedRArray, idxs::AbstractAr | |||
start_sizes = ntuple(i -> size(src, i), dims) | |||
results = map(CartesianIndices(idxs)) do k | |||
res = @allowscalar src[colons..., Tuple(idxs[k])...] | |||
res isa TracedRNumber && (res = Reactant.broadcast_to_size(res, (1,))) | |||
res isa TracedRNumber && (res = Reactant.TracedUtils.broadcast_to_size(res, (1,))) |
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 🐶
res isa TracedRNumber && (res = Reactant.TracedUtils.broadcast_to_size(res, (1,))) | |
res isa TracedRNumber && | |
(res = Reactant.TracedUtils.broadcast_to_size(res, (1,))) |
src/Tracing.jl
Outdated
@@ -498,14 +498,14 @@ function make_tracer( | |||
return ConcreteRNumber(prev) | |||
else | |||
if mode == TracedTrack | |||
res = TracedRNumber{RT}((path,), broadcast_to_size(prev, ()).mlir_data) | |||
res = TracedRNumber{RT}((path,), TracedUtils.broadcast_to_size(prev, ()).mlir_data) |
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 🐶
res = TracedRNumber{RT}((path,), TracedUtils.broadcast_to_size(prev, ()).mlir_data) | |
res = TracedRNumber{RT}( | |
(path,), TracedUtils.broadcast_to_size(prev, ()).mlir_data | |
) |
src/Tracing.jl
Outdated
if !haskey(seen, prev) | ||
return seen[prev] = res | ||
end | ||
return res | ||
elseif mode == TracedSetPath | ||
haskey(seen, prev) && return seen[prev] | ||
res = TracedRNumber{RT}((path,), broadcast_to_size(prev, ()).mlir_data) | ||
res = TracedRNumber{RT}((path,), TracedUtils.broadcast_to_size(prev, ()).mlir_data) |
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 🐶
res = TracedRNumber{RT}((path,), TracedUtils.broadcast_to_size(prev, ()).mlir_data) | |
res = TracedRNumber{RT}( | |
(path,), TracedUtils.broadcast_to_size(prev, ()).mlir_data | |
) |
src/linear_algebra.jl
Outdated
@@ -61,7 +80,7 @@ end | |||
function LinearAlgebra.triu!(@nospecialize(X::TracedRArray{T,2}), k::Integer) where {T} | |||
iota_1 = Ops.iota(Int64, [size(X)...]; iota_dimension=1) | |||
iota_2 = Ops.subtract( | |||
Ops.iota(Int64, [size(X)...]; iota_dimension=2), broadcast_to_size(k, size(X)) | |||
Ops.iota(Int64, [size(X)...]; iota_dimension=2), TracedUtils.broadcast_to_size(k, size(X)) |
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 🐶
Ops.iota(Int64, [size(X)...]; iota_dimension=2), TracedUtils.broadcast_to_size(k, size(X)) | |
Ops.iota(Int64, [size(X)...]; iota_dimension=2), | |
TracedUtils.broadcast_to_size(k, size(X)), |
src/linear_algebra.jl
Outdated
@@ -71,7 +90,7 @@ end | |||
function LinearAlgebra.tril!(@nospecialize(X::TracedRArray{T,2}), k::Integer) where {T} | |||
iota_1 = Ops.iota(Int64, [size(X)...]; iota_dimension=1) | |||
iota_2 = Ops.subtract( | |||
Ops.iota(Int64, [size(X)...]; iota_dimension=2), broadcast_to_size(k, size(X)) | |||
Ops.iota(Int64, [size(X)...]; iota_dimension=2), TracedUtils.broadcast_to_size(k, size(X)) |
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 🐶
Ops.iota(Int64, [size(X)...]; iota_dimension=2), TracedUtils.broadcast_to_size(k, size(X)) | |
Ops.iota(Int64, [size(X)...]; iota_dimension=2), | |
TracedUtils.broadcast_to_size(k, size(X)), |
src/linear_algebra.jl
Outdated
@@ -115,7 +134,7 @@ function LinearAlgebra.diag(x::AnyTracedRArray{T,2}, k::Integer=0) where {T} | |||
) | |||
#! format: on | |||
|
|||
slice_sizes = get_mlir_data(Reactant.promote_to(TracedRArray{Int,1}, [1, 1])) | |||
slice_sizes = get_mlir_data(Reactant.TracedUtils.promote_to(TracedRArray{Int,1}, [1, 1])) |
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 🐶
slice_sizes = get_mlir_data(Reactant.TracedUtils.promote_to(TracedRArray{Int,1}, [1, 1])) | |
slice_sizes = get_mlir_data( | |
Reactant.TracedUtils.promote_to(TracedRArray{Int,1}, [1, 1]) | |
) |
src/linear_algebra.jl
Outdated
@@ -139,6 +158,8 @@ function LinearAlgebra.diagm(m::Integer, n::Integer, v::AnyTracedRArray{T,1}) wh | |||
|
|||
mat = (v .+ zero(v)') .* diag_indicator | |||
return Ops.pad( | |||
mat, promote_to(TracedRNumber{T}, 0); high=[m - length(v), n - length(v)] | |||
mat, TracedUtils.promote_to(TracedRNumber{T}, 0); high=[m - length(v), n - length(v)] |
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 🐶
mat, TracedUtils.promote_to(TracedRNumber{T}, 0); high=[m - length(v), n - length(v)] | |
mat, | |
TracedUtils.promote_to(TracedRNumber{T}, 0); | |
high=[m - length(v), n - length(v)], |
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
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 🐶
Line 436 in f839a0b
iter_args = min(n_actual_args, n_method_args-1) |
[JuliaFormatter] reported by reviewdog 🐶
Line 438 in f839a0b
[JuliaFormatter] reported by reviewdog 🐶
Line 448 in f839a0b
[JuliaFormatter] reported by reviewdog 🐶
Line 450 in f839a0b
push!(overdubbed_code, Expr(:call, safe_print, "fn arg["*string(length(fn_args))*"]", fn_args[end])) |
[JuliaFormatter] reported by reviewdog 🐶
Line 455 in f839a0b
[JuliaFormatter] reported by reviewdog 🐶
Lines 470 to 472 in f839a0b
push!( | |
overdubbed_code, trailing_arguments | |
) |
[JuliaFormatter] reported by reviewdog 🐶
Line 476 in f839a0b
[JuliaFormatter] reported by reviewdog 🐶
Line 478 in f839a0b
push!(overdubbed_code, Expr(:call, safe_print, "fn arg["*string(length(fn_args))*"]", fn_args[end])) |
[JuliaFormatter] reported by reviewdog 🐶
Line 484 in f839a0b
[JuliaFormatter] reported by reviewdog 🐶
Line 500 in f839a0b
res = Core._call_in_world_total(world, make_oc, octup, rt, src, ocnargs, ocva, args[1].instance)::Core.OpaqueClosure |
[JuliaFormatter] reported by reviewdog 🐶
Lines 504 to 514 in f839a0b
push!(overdubbed_code, | |
Expr(:call, | |
make_oc, | |
octup, | |
rt, | |
src, | |
ocnargs, | |
ocva, | |
farg | |
) | |
) |
[JuliaFormatter] reported by reviewdog 🐶
Lines 519 to 526 in f839a0b
push!( | |
overdubbed_code, | |
Expr( | |
:(call), | |
oc, | |
fn_args[2:end]... | |
), | |
) |
[JuliaFormatter] reported by reviewdog 🐶
Lines 530 to 533 in f839a0b
push!( | |
overdubbed_code, | |
Core.ReturnNode(Core.SSAValue(length(overdubbed_code))) | |
) |
[JuliaFormatter] reported by reviewdog 🐶
Line 546 in f839a0b
src/TracedRArray.jl
Outdated
rdims = Int64[] | ||
|
||
if dims == (:) | ||
for i in 0:(N-1) |
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 🐶
for i in 0:(N-1) | |
for i in 0:(N - 1) |
src/TracedRArray.jl
Outdated
else | ||
Int64[i - 1 for i in dims] | ||
for i in dims | ||
push!(rdims, i-1) |
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 🐶
push!(rdims, i-1) | |
push!(rdims, i - 1) |
src/TracedRArray.jl
Outdated
toonedims = Int[] | ||
outdims = Int[] | ||
for i in 1:N | ||
tmp = if in(i-1, rdims) |
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 🐶
tmp = if in(i-1, rdims) | |
tmp = if in(i - 1, rdims) |
src/TracedRArray.jl
Outdated
@@ -471,19 +283,19 @@ function Base.mapreducedim!( | |||
@nospecialize(R::TracedRArray), | |||
A::Base.AbstractArrayOrBroadcasted, | |||
) | |||
tmp = broadcast_to_size(Base.mapreduce(f, op, A; dims=1), (1, size(R)[2:end]...)) | |||
tmp = TracedUtils.broadcast_to_size(Base.mapreduce(f, op, A; dims=1), (1, size(R)[2:end]...)) |
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 🐶
tmp = TracedUtils.broadcast_to_size(Base.mapreduce(f, op, A; dims=1), (1, size(R)[2:end]...)) | |
tmp = TracedUtils.broadcast_to_size( | |
Base.mapreduce(f, op, A; dims=1), (1, size(R)[2:end]...) | |
) |
src/TracedRArray.jl
Outdated
A.mlir_data = bcast.mlir_data | ||
return A | ||
end | ||
|
||
function Base.fill!(A::TracedRArray{T,N}, x::TracedRNumber{T2}) where {T,N,T2} | ||
bcast = broadcast_to_size(promote_to(TracedRNumber{T}, x), size(A)) | ||
bcast = TracedUtils.broadcast_to_size(TracedUtils.promote_to(TracedRNumber{T}, x), size(A)) |
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 🐶
bcast = TracedUtils.broadcast_to_size(TracedUtils.promote_to(TracedRNumber{T}, x), size(A)) | |
bcast = TracedUtils.broadcast_to_size( | |
TracedUtils.promote_to(TracedRNumber{T}, x), size(A) | |
) |
src/utils.jl
Outdated
mi = ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, | ||
(Any, Any, Any), match.method, match.spec_types, match.sparams) | ||
|
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 🐶
mi = ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, | |
(Any, Any, Any), match.method, match.spec_types, match.sparams) | |
mi = ccall( | |
:jl_specializations_get_linfo, | |
Ref{Core.MethodInstance}, | |
(Any, Any, Any), | |
match.method, | |
match.spec_types, | |
match.sparams, | |
) | |
src/utils.jl
Outdated
src = copy(ci) | ||
src.slotnames = Any[:call_with_reactant, REDUB_ARGUMENTS_NAME] | ||
|
||
src.edges = Any[ccall(:jl_method_table_for, Any, (Any,), sig)::Core.MethodTable, sig] |
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 🐶
src.edges = Any[ccall(:jl_method_table_for, Any, (Any,), sig)::Core.MethodTable, sig] | |
src.edges = Any[ | |
ccall(:jl_method_table_for, Any, (Any,), sig)::Core.MethodTable, sig | |
] |
src/utils.jl
Outdated
|
||
expr_fn = Core.SSAValue(length(overdubbed_code)) | ||
|
||
|
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 🐶
src/utils.jl
Outdated
|
||
push!(overdubbed_code, :(2:$expr_lastindex)) |
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 🐶
push!(overdubbed_code, :(2:$expr_lastindex)) | |
push!(overdubbed_code, :(2:($expr_lastindex))) |
src/utils.jl
Outdated
push!( | ||
overdubbed_code, | ||
Core.ReturnNode(Core.SSAValue(length(overdubbed_code))) | ||
) |
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 🐶
push!( | |
overdubbed_code, | |
Core.ReturnNode(Core.SSAValue(length(overdubbed_code))) | |
) | |
push!(overdubbed_code, Core.ReturnNode(Core.SSAValue(length(overdubbed_code)))) |
src/utils.jl
Outdated
Core.Compiler.ipo_dataflow_analysis!(interp, ir, caller) | ||
end | ||
end | ||
|
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 🐶
src/utils.jl
Outdated
end | ||
end | ||
|
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 🐶
src/utils.jl
Outdated
body=MLIR.IR.Region(), | ||
sym_visibility, | ||
src = Core.Compiler.ir_to_codeinf!(opt) | ||
|
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 🐶
src/utils.jl
Outdated
n_actual_args = length(redub_arguments) | ||
|
||
tys = [] | ||
|
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 🐶
src/utils.jl
Outdated
|
||
iter_args = n_actual_args | ||
if method.isva | ||
iter_args = min(n_actual_args, n_method_args-1) |
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 🐶
iter_args = min(n_actual_args, n_method_args-1) | |
iter_args = min(n_actual_args, n_method_args - 1) |
src/utils.jl
Outdated
# Opaque closures also require takign the function argument. We can work around the latter | ||
# if the function is stateless. But regardless, to work around this we sadly create/compile the opaque closure | ||
oc = if false && Base.issingletontype(args[1]) | ||
res = Core._call_in_world_total(world, make_oc, octup, rt, src, ocnargs, ocva, args[1].instance)::Core.OpaqueClosure |
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 🐶
res = Core._call_in_world_total(world, make_oc, octup, rt, src, ocnargs, ocva, args[1].instance)::Core.OpaqueClosure | |
res = Core._call_in_world_total( | |
world, make_oc, octup, rt, src, ocnargs, ocva, args[1].instance | |
)::Core.OpaqueClosure |
src/utils.jl
Outdated
push!(overdubbed_code, | ||
Expr(:call, | ||
make_oc, | ||
octup, | ||
rt, | ||
src, | ||
ocnargs, | ||
ocva, | ||
farg | ||
) | ||
) |
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 🐶
push!(overdubbed_code, | |
Expr(:call, | |
make_oc, | |
octup, | |
rt, | |
src, | |
ocnargs, | |
ocva, | |
farg | |
) | |
) | |
push!(overdubbed_code, Expr(:call, make_oc, octup, rt, src, ocnargs, ocva, farg)) |
src/utils.jl
Outdated
push!( | ||
overdubbed_code, | ||
Expr( | ||
:(call), | ||
oc, | ||
fn_args[2:end]... | ||
), | ||
) |
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 🐶
push!( | |
overdubbed_code, | |
Expr( | |
:(call), | |
oc, | |
fn_args[2:end]... | |
), | |
) | |
push!(overdubbed_code, Expr(:(call), oc, fn_args[2:end]...)) |
src/utils.jl
Outdated
push!( | ||
overdubbed_code, | ||
Core.ReturnNode(Core.SSAValue(length(overdubbed_code))) | ||
) |
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 🐶
push!( | |
overdubbed_code, | |
Core.ReturnNode(Core.SSAValue(length(overdubbed_code))) | |
) | |
push!(overdubbed_code, Core.ReturnNode(Core.SSAValue(length(overdubbed_code)))) |
src/utils.jl
Outdated
code_info.codelocs = overdubbed_codelocs | ||
code_info.ssavaluetypes = length(overdubbed_code) | ||
code_info.ssaflags = [0x00 for _ in 1:length(overdubbed_code)] # XXX we need to copy flags that are set for the original code | ||
|
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 🐶
commit 65e9976 Author: William Moses <[email protected]> Date: Sat Dec 14 14:05:03 2024 -0600 Interp2 (EnzymeAD#365) * WIP: kernels * more files * fix * wip * wqtmp * wip * inc * continuing * wip * more work * inf rec * fix * overload working * continuing * continuing * push * fix `call_with_reactant_generator` for Julia 1.11 (EnzymeAD#359) * conversion * continuing * Cleanup * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Delete test/cuda.jl * fixup * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix apply * indep of change * minor fix in name * Update utils.jl * Interp take 2 * continuing adentures * delcode * fix * tmp * make * fix * cleanup * continuing * more working * further simplify * fx * more improvements * minus show * less prints * even fewer * confusion * tmp * force clean * force oc * clean * Rewrite * fixup * fix * fix * fix * fixup * fix * wip * safe prints * fix * fix * stackoverflow * cleanup * dyindex * rt * continue * clean * fix * fix * fix * fix * fixup * fix * fix * capture oc * compile perf * v1.11 fix * other way 'round * formatting --------- Co-authored-by: William Moses <[email protected]> Co-authored-by: jumerckx <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: jumerckx <[email protected]> commit 73899f5 Author: Avik Pal <[email protected]> Date: Sat Dec 14 14:58:47 2024 +0530 fix: include files if they end with .jl (EnzymeAD#377) commit 9f96c09 Author: Sergio Sánchez Ramírez <[email protected]> Date: Fri Dec 13 23:12:43 2024 +0100 Run CI on aarch64 (EnzymeAD#350) * Run CI on aarch64 * use julia pipeline for aarch64-linux * fix var * exclude aarch64-linux jobs from github ci commit b56e661 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri Dec 13 08:58:51 2024 +0530 chore: format code (EnzymeAD#371) Co-authored-by: mofeing <[email protected]> commit 311498b Author: Anton Oresten <[email protected]> Date: Thu Dec 12 05:41:39 2024 +0100 feat: define outer `repeat` method for `TracedRArray` (EnzymeAD#361) * Add repeat method * Add repeat tests * Update test/basic.jl * Update src/TracedRArray.jl commit 8b90501 Author: Avik Pal <[email protected]> Date: Thu Dec 12 10:11:00 2024 +0530 fix: ensure printing of wrapped ConcreteRArrays goes through our show (EnzymeAD#367) * fix: ensure printing of wrapped ConcreteRArrays goes through our show * fix: allow wrapped arrays in mapreduce commit ea97be3 Author: Sergio Sánchez Ramírez <[email protected]> Date: Wed Dec 11 22:02:14 2024 +0100 Ignore versioned manifests
commit 65e9976 Author: William Moses <[email protected]> Date: Sat Dec 14 14:05:03 2024 -0600 Interp2 (EnzymeAD#365) * WIP: kernels * more files * fix * wip * wqtmp * wip * inc * continuing * wip * more work * inf rec * fix * overload working * continuing * continuing * push * fix `call_with_reactant_generator` for Julia 1.11 (EnzymeAD#359) * conversion * continuing * Cleanup * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Delete test/cuda.jl * fixup * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix apply * indep of change * minor fix in name * Update utils.jl * Interp take 2 * continuing adentures * delcode * fix * tmp * make * fix * cleanup * continuing * more working * further simplify * fx * more improvements * minus show * less prints * even fewer * confusion * tmp * force clean * force oc * clean * Rewrite * fixup * fix * fix * fix * fixup * fix * wip * safe prints * fix * fix * stackoverflow * cleanup * dyindex * rt * continue * clean * fix * fix * fix * fix * fixup * fix * fix * capture oc * compile perf * v1.11 fix * other way 'round * formatting --------- Co-authored-by: William Moses <[email protected]> Co-authored-by: jumerckx <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: jumerckx <[email protected]> commit 73899f5 Author: Avik Pal <[email protected]> Date: Sat Dec 14 14:58:47 2024 +0530 fix: include files if they end with .jl (EnzymeAD#377) commit 9f96c09 Author: Sergio Sánchez Ramírez <[email protected]> Date: Fri Dec 13 23:12:43 2024 +0100 Run CI on aarch64 (EnzymeAD#350) * Run CI on aarch64 * use julia pipeline for aarch64-linux * fix var * exclude aarch64-linux jobs from github ci commit b56e661 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri Dec 13 08:58:51 2024 +0530 chore: format code (EnzymeAD#371) Co-authored-by: mofeing <[email protected]> commit 311498b Author: Anton Oresten <[email protected]> Date: Thu Dec 12 05:41:39 2024 +0100 feat: define outer `repeat` method for `TracedRArray` (EnzymeAD#361) * Add repeat method * Add repeat tests * Update test/basic.jl * Update src/TracedRArray.jl commit 8b90501 Author: Avik Pal <[email protected]> Date: Thu Dec 12 10:11:00 2024 +0530 fix: ensure printing of wrapped ConcreteRArrays goes through our show (EnzymeAD#367) * fix: ensure printing of wrapped ConcreteRArrays goes through our show * fix: allow wrapped arrays in mapreduce commit ea97be3 Author: Sergio Sánchez Ramírez <[email protected]> Date: Wed Dec 11 22:02:14 2024 +0100 Ignore versioned manifests
No description provided.