Skip to content

Commit

Permalink
Add an option for insert gpu allocs to treat allocations as gpu-native
Browse files Browse the repository at this point in the history
  • Loading branch information
zhczhong committed Sep 24, 2024
1 parent cad8a29 commit 3906c28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/imex-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6c2e414a953b9a118bce6adac21cf9d42630e674
20f2eef4f6c10fcbd68d358591c8b3ef4d1b97d2
5 changes: 4 additions & 1 deletion lib/gc/Transforms/GPU/Pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ void populateGPUPipeline(mlir::OpPassManager &pm) {
pm.addNestedPass<func::FuncOp>(createGpuMapParallelLoopsPass());
pm.addNestedPass<func::FuncOp>(createParallelLoopToGpuPass());

pm.addNestedPass<func::FuncOp>(imex::createInsertGPUAllocsPass("opencl"));
imex::InsertGPUAllocsOptions insertGPUAllocsOption{
/*clientAPI*/ "opencl", /*inRegions*/ false, /*isUsmArgs*/ true};
pm.addNestedPass<func::FuncOp>(
imex::createInsertGPUAllocsPass(insertGPUAllocsOption));
pm.addPass(createGpuKernelOutliningPass());
pm.addPass(createCanonicalizerPass());
pm.addPass(imex::createSetSPIRVCapabilitiesPass());
Expand Down

0 comments on commit 3906c28

Please sign in to comment.