Skip to content

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Jan 13, 2025

Comment on lines +298 to +300
passes = [
"inline{default-pipeline=canonicalize max-iterations=4}"
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
passes = [
"inline{default-pipeline=canonicalize max-iterations=4}"
]
passes = ["inline{default-pipeline=canonicalize max-iterations=4}"]

Comment on lines +302 to +304
push!(passes, "sroa-wrappers")
push!(passes, "libdevice-funcs-raise")
push!(passes, "canonicalize")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
push!(passes, "sroa-wrappers")
push!(passes, "libdevice-funcs-raise")
push!(passes, "canonicalize")
push!(passes, "sroa-wrappers")
push!(passes, "libdevice-funcs-raise")
push!(passes, "canonicalize")

Comment on lines +307 to 309
return join(passes,
',',
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
return join(passes,
',',
)
return join(passes, ',')

end
kern = "lower-kernel{run_init=true toolkitPath=$toolkit cuLaunchKernelPtr=$(cuLaunch[]) cuModuleLoadDataPtr=$(cuModule[]) cuModuleGetFunctionPtr=$(cuFunc[])},symbol-dce"
if DEBUG_KERNEL[]
curesulthandler = XLA.Libdl.dlsym(Reactant_jll.libReactantExtra_handle, "ReactantHandleCuResult")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
curesulthandler = XLA.Libdl.dlsym(Reactant_jll.libReactantExtra_handle, "ReactantHandleCuResult")
curesulthandler = XLA.Libdl.dlsym(
Reactant_jll.libReactantExtra_handle, "ReactantHandleCuResult"
)


function make_tracer(
seen,
@nospecialize(prev::Union{Base.ExceptionStack, Core.MethodInstance}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@nospecialize(prev::Union{Base.ExceptionStack, Core.MethodInstance}),
@nospecialize(prev::Union{Base.ExceptionStack,Core.MethodInstance}),


# Jax on Github CI dislikes X86 macos
@static if !Sys.isapple() || Sys.ARCH != :x86_64
using PythonCall
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
using PythonCall
using PythonCall

@test typeof(result) == ConcreteRNumber{Float32}
@test result 6
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

@testset "PythonCall" begin
jax = pyimport("jax")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

result = @jit jax.numpy.sum(Reactant.to_rarray(Float32[1, 2, 3]))
@test typeof(result) == ConcreteRNumber{Float32}
@test result 6

offset = 0
current_type = T


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

# Update current_type to the field's type for next iteration
current_type = fieldtype(current_type, field_idx)
current_type = tcurrent_type

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

current_type = tcurrent_type

end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

threaddim = CUDA.CuDim3(threads)

if convert == Val(true)
args = recudaconvert.(args)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
args = recudaconvert.(args)
args = recudaconvert.(args)

end

location = MLIR.IR.Location()
@assert length(restys) == length(aliases)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@assert length(restys) == length(aliases)
@assert length(restys) == length(aliases)

@wsmoses wsmoses merged commit a1f93a0 into main Jan 16, 2025
2 of 10 checks passed
@wsmoses wsmoses deleted the sroa branch January 16, 2025 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant