Skip to content
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

Remove invariant loads on primal computation #1325

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Remove invariant loads on primal computation #1325

merged 1 commit into from
Mar 22, 2024

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented Mar 5, 2024

I thought we were running this already, but somehow it might have decayed off?

Comment on lines 4366 to 4367

mod, meta = GPUCompiler.codegen(:llvm, primal_job; optimize=false, toplevel=toplevel, cleanup=false, validate=false, parent_job=parent_job)
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, meta = GPUCompiler.codegen(:llvm, primal_job; optimize=false, toplevel=toplevel, cleanup=false, validate=false, parent_job=parent_job)
mod, meta = GPUCompiler.codegen(
:llvm,
primal_job;
optimize=false,
toplevel=toplevel,
cleanup=false,
validate=false,
parent_job=parent_job,
)

@@ -4366,6 +4366,9 @@ function GPUCompiler.codegen(output::Symbol, job::CompilerJob{<:EnzymeTarget};

mod, meta = GPUCompiler.codegen(:llvm, primal_job; optimize=false, toplevel=toplevel, cleanup=false, validate=false, parent_job=parent_job)
prepare_llvm(mod, primal_job, meta)
for f in functions(mod)
permit_inlining!(f)
end

LLVM.ModulePassManager() do pm
API.AddPreserveNVVMPass!(pm, #=Begin=#true)
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
API.AddPreserveNVVMPass!(pm, #=Begin=#true)
API.AddPreserveNVVMPass!(pm, true) #=Begin=#

Copy link
Member Author

Choose a reason for hiding this comment

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

@vchuravy @simsurace so I actually disagree with this part of the autoformatter, since I would very much like to know what that arg corresponds to (as presently specified with a comment).

What's the right way to do so in-format?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, good question. It seems to be a known issue domluna/JuliaFormatter.jl#562

@wsmoses wsmoses merged commit 2e1b77e into main Mar 22, 2024
39 of 48 checks passed
@wsmoses wsmoses deleted the pi branch March 22, 2024 23:12
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.

3 participants