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

Add option to disable vector pipeline #52544

Merged
merged 4 commits into from
Jan 19, 2024
Merged

Add option to disable vector pipeline #52544

merged 4 commits into from
Jan 19, 2024

Conversation

wsmoses
Copy link
Contributor

@wsmoses wsmoses commented Dec 15, 2023

This will allow tools like Enzyme to use the internal julia pass pipeline, rather than having their own version.

src/pipeline.cpp Outdated Show resolved Hide resolved
Copy link
Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

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

Need to add argument jl_build_newpm_pipeline_impl

@gbaraldi
Copy link
Member

We should probably make jl_build_newpm_pipeline_impl take a struct, otherwise it's going to grow eternally

@wsmoses
Copy link
Contributor Author

wsmoses commented Dec 15, 2023

@vchuravy fixed. I also added a flag for enabling/disabling the cleanup passes as well.

@gbaraldi I'm not sure if I agree. As far as I can tell this function's arguments are exclusively these pipeline options, which means that passing them all in a struct is just as much work to set up (now with a struct) as calling them.

@vchuravy
Copy link
Member

On the Julia level the struct is easier since we can use keyword arguments to maintain API compatibility instead of each caller maintaining an if VERSION >= list.

Please do git rebase --whitespace=fix origin/master

@wsmoses
Copy link
Contributor Author

wsmoses commented Dec 21, 2023

@vchuravy @gbaraldi re-bumping for review [the struct stuff was fixed a few days ago]

Copy link
Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

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

Well apparently I had forgotten to hit submit on my review several days ago.

src/pipeline.cpp Show resolved Hide resolved
src/pipeline.cpp Show resolved Hide resolved
src/pipeline.cpp Show resolved Hide resolved
@@ -599,19 +613,35 @@ static void buildPipeline(ModulePassManager &MPM, PassBuilder *PB, OptimizationL
MPM.addPass(AfterOptimizationMarkerPass());
}

extern "C" JL_DLLEXPORT_CODEGEN void jl_build_newpm_pipeline_impl(void *MPM, void *PB, int Speedup, int Size,
int lower_intrinsics, int dump_native, int external_use, int llvm_only) JL_NOTSAFEPOINT
struct PipelineConfig {
Copy link
Member

Choose a reason for hiding this comment

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

@gbaraldi can I charge you with adding a Julia API for this that consumers can then use?

Copy link
Member

Choose a reason for hiding this comment

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

In LLVM.jl?

Copy link
Member

Choose a reason for hiding this comment

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

I made one in AllocCheck.jl that I have to upstream to LLVM.jl or GPUCompiler, not sure where is better

@wsmoses
Copy link
Contributor Author

wsmoses commented Jan 5, 2024

pinging @vchuravy @gbaraldi for review

@wsmoses
Copy link
Contributor Author

wsmoses commented Jan 17, 2024

re-pinging @vchuravy @gbaraldi for review

@wsmoses
Copy link
Contributor Author

wsmoses commented Jan 18, 2024

The build issue [from earlier] looked like a CI failure [where it was an out of memory].

Pinging @vchuravy @gbaraldi for review

src/pipeline.cpp Show resolved Hide resolved
@vchuravy vchuravy merged commit ab9573f into JuliaLang:master Jan 19, 2024
5 of 7 checks passed
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