feature: redesign Proteus's lambda JIT compilation interface and pipeline - #467
Conversation
ggeorgakoudis
left a comment
There was a problem hiding this comment.
This is great and will solve our lambda issues.
I made a first pass and left comments on things we need to restructure.
There was a problem hiding this comment.
I think installing and using a separate pass is quirky. We already register ProteusPass in multiple places (early-simplifications and LTO), so we can register it also at pipeline-start and just do the lambda analysis
There was a problem hiding this comment.
Could you expand on this? How else would be run an early LambdaAnalysis pass and Proteuspass later?
There was a problem hiding this comment.
Register ProteusPass at pipeline-start and pass an argument when you construct it to indicate the insert point. Check how we do it for early-simplifications and LTO. Apparently state is not true-false anymore, if there are 3 possible insert points.
2cf03a2 to
d5b97c4
Compare
d5b97c4 to
a56679a
Compare
|
all tests are passing for me locally on Tioga with rocm 6.4.2 |
c3d3d2e to
5daef48
Compare
4441506 to
3202250
Compare
|
This analysis is now compatible with RAJA launch, kernel, and forall LLVM IR shapes |
8e43319 to
f0ed85a
Compare
f3e5a08 to
f59b51e
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
f59b51e to
c462791
Compare
There was a problem hiding this comment.
This is great work. I have mostly minor things.
Because this PR is so big and has been so long in the works, I don't want to hold it up for any of these things.
I am concerned that we would perpetually run around in bike-shedding circles, all the while this important feature is held up. Anything you choose not to resolve should be opened as an issue for follow-up.
| for (User *U : F->users()) { | ||
| auto *CB = dyn_cast<CallBase>(U); | ||
| if (!CB) | ||
| continue; | ||
| DEBUG(Logger::logs("proteus-pass") | ||
| << "Analysis crossed interprocedural boundary at " | ||
| << *CB->getArgOperand(ArgNum) << "\n"); | ||
| WorkList.push_back({CB->getArgOperand(ArgNum), CB}); |
There was a problem hiding this comment.
Does this need to be context sensitive?
remove jit var analysis from later pass tmp update tests check point: all lambda tests GPU passing add wrapper functors Lambda redeisgn: add functors. This commit builds but the runtime needs work delete plugin get tests working Refactor tests and track lambdas by global annotations Remove changes to type traits Get rid of storing things in llvm.global.annotations. Fix lambda CPU test All lambda unit tests passing. Fixed cloning bug in ProteusPass delete xfail compile test remove script change Fix all unit tests
… expecting jit_variable schema for every lambda
…alue and insert_value analysis
…rt through ProteusPass
c462791 to
37978a0
Compare
This feature restructures Proteus's lambda support so that a device module containing multiple calls of a lambda with different runtime constants can be correctly JIT compiled. This feature makes Proteus's support of JIT compiled lambdas closer to supporting all possible C++ lambda syntax, instead of the narrow syntax often used by parallel programming abstraction layers. Concretely