Skip to content

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Feb 7, 2025

No description provided.

@giordano giordano linked an issue Feb 7, 2025 that may be closed by this pull request
@avik-pal avik-pal linked an issue Feb 8, 2025 that may be closed by this pull request
end
end

function vendored_buildEarlyOptimizerPipeline(mpm, @nospecialize(job), opt_level; instcombine=false)
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
function vendored_buildEarlyOptimizerPipeline(mpm, @nospecialize(job), opt_level; instcombine=false)
function vendored_buildEarlyOptimizerPipeline(
mpm, @nospecialize(job), opt_level; instcombine=false
)

end
end

function vendored_buildIntrinsicLoweringPipeline(mpm, @nospecialize(job), opt_level; instcombine::Bool=false)
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
function vendored_buildIntrinsicLoweringPipeline(mpm, @nospecialize(job), opt_level; instcombine::Bool=false)
function vendored_buildIntrinsicLoweringPipeline(
mpm, @nospecialize(job), opt_level; instcombine::Bool=false
)

else
LLVM.add!(fpm, LLVM.InstSimplifyPass())
end
LLVM.add!(fpm, LLVM.SimplifyCFGPass(; GPUCompiler.AggressiveSimplifyCFGOptions...))
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
LLVM.add!(fpm, LLVM.SimplifyCFGPass(; GPUCompiler.AggressiveSimplifyCFGOptions...))
LLVM.add!(
fpm, LLVM.SimplifyCFGPass(; GPUCompiler.AggressiveSimplifyCFGOptions...)
)


# Julia's operand bundles confuse the inliner, so repeat here now they are gone.
# FIXME: we should fix the inliner so that inlined code gets optimized early-on
LLVM.add!(mpm, LLVM.AlwaysInlinerPass())
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
LLVM.add!(mpm, LLVM.AlwaysInlinerPass())
return LLVM.add!(mpm, LLVM.AlwaysInlinerPass())

# end
end
vendored_buildIntrinsicLoweringPipeline(mpm, job, opt_level)
GPUCompiler.buildCleanupPipeline(mpm, job, opt_level)
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
GPUCompiler.buildCleanupPipeline(mpm, job, opt_level)
return GPUCompiler.buildCleanupPipeline(mpm, job, opt_level)

const DEBUG_KERNEL = Ref{Bool}(false)
const DUMP_LLVMIR = Ref{Bool}(false)


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

opt_passes2,
kern,
raise,
jit
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
jit
jit,

"remove-unnecessary-enzyme-ops",
"enzyme-simplify-math",
opt_passes2,
kern
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
kern
kern,

opt_passes2,
kern,
raise,
jit
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
jit
jit,

Comment on lines +772 to +777
mod, join([
"canonicalize,remove-unnecessary-enzyme-ops,enzyme-simplify-math",
kern,
raise,
jit
], ',')
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
mod, join([
"canonicalize,remove-unnecessary-enzyme-ops,enzyme-simplify-math",
kern,
raise,
jit
], ',')
mod,
join(
[
"canonicalize,remove-unnecessary-enzyme-ops,enzyme-simplify-math",
kern,
raise,
jit,
],
',',
),

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 🐶

Reactant.jl/src/Compiler.jl

Lines 780 to 782 in 4e39a42

run_pass_pipeline!(
mod, "canonicalize"
)

@wsmoses wsmoses merged commit a1fa03f into main Feb 8, 2025
34 of 39 checks passed
@wsmoses wsmoses deleted the wsmoses-patch-1 branch February 8, 2025 05:02
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