Page MenuHomePhabricator

[MLIR] Make gpu.launch_func rewrite pattern part of the LLVM lowering pass.
ClosedPublic

Authored by csigg on Sat, Aug 1, 7:41 AM.

Diff Detail

Event Timeline

csigg created this revision.Sat, Aug 1, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptSat, Aug 1, 7:41 AM
csigg requested review of this revision.Sat, Aug 1, 7:41 AM
csigg retitled this revision from Make gpu.launch_func rewrite pattern part of the LLVM lowering pass. to [MLIR] Make gpu.launch_func rewrite pattern part of the LLVM lowering pass..Sat, Aug 1, 7:41 AM

Nice, some nits.

mlir/include/mlir/Conversion/Passes.td
84–85

nit: formatting

mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
229

nit: formatting

295

Maybe return rewriter.notifyMatchfailure(op, "Cannot convert...")?

301–302

SymbolTable::lookupNearestSymbolFrom ?

csigg updated this revision to Diff 283558.Thu, Aug 6, 3:25 AM
csigg marked 3 inline comments as done.

Rebase, apply reviewer comments.

csigg updated this revision to Diff 283559.Thu, Aug 6, 3:30 AM
csigg marked an inline comment as done.

Fix.

jurahul added inline comments.Thu, Aug 6, 8:26 AM
mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
301–302

Would it make sense to make this a member function of gpu::LaunchFuncOp if this lookup is done in multiple places?

csigg added inline comments.Thu, Aug 6, 11:35 AM
mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
301–302

As far as I can tell, this is only used here.

herhut accepted this revision.Mon, Aug 10, 7:50 AM
herhut added inline comments.
mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
292–295

Maybe put this lambda in a local and give it a name?

This revision is now accepted and ready to land.Mon, Aug 10, 7:50 AM
csigg updated this revision to Diff 284392.Mon, Aug 10, 8:43 AM

Add isLLVMType function.

This revision was landed with ongoing or failed builds.Mon, Aug 10, 10:28 AM
This revision was automatically updated to reflect the committed changes.