The ops are very similar to the std variants, but support async GPU execution.
gpu.alloc does not currently support an alignment attribute, and the new ops do not have
canonicalizers/folders like their std siblings do.
Paths
| Differential D91698
[mlir] Add gpu.allocate, gpu.deallocate ops with LLVM lowering to runtime function calls. ClosedPublic Authored by csigg on Nov 18 2020, 4:26 AM.
Details Summary The ops are very similar to the std variants, but support async GPU execution. gpu.alloc does not currently support an alignment attribute, and the new ops do not have
Diff Detail
Event Timelineherhut added inline comments.
This revision now requires changes to proceed.Nov 23 2020, 6:36 AM csigg added inline comments.
This revision is now accepted and ready to land.Nov 26 2020, 5:04 AM Closed by commit rG5535696c386b: [mlir] Add gpu.allocate, gpu.deallocate ops with LLVM lowering to runtime… (authored by csigg). · Explain WhyNov 27 2020, 12:41 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 306050 mlir/include/mlir/Dialect/GPU/GPUDialect.h
mlir/include/mlir/Dialect/GPU/GPUOps.td
mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
mlir/test/Conversion/GPUCommon/lower-alloc-to-gpu-runtime-calls.mlir
mlir/test/Dialect/GPU/ops.mlir
mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
mlir/tools/mlir-rocm-runner/rocm-runtime-wrappers.cpp
|
Not for now but I was wondering whether we should have a different resource for GPU allocations? Maybe also to use as a key for buffer assignment to insert the corresponding free.