[mlir][gpu] Introduce `host_shared` flag to `gpu.alloc`
authorIvan Butygin <ivan.butygin@gmail.com>
Thu, 8 Sep 2022 22:04:01 +0000 (00:04 +0200)
committerIvan Butygin <ivan.butygin@gmail.com>
Wed, 5 Oct 2022 20:01:30 +0000 (22:01 +0200)
commita93ec06ae6277480b3f3d7521f867a7099e68fc1
treed84fe50b715fae267996d34a383b56c236381c34
parent606245ad542491400a5475c796df86a99f5c8c12
[mlir][gpu] Introduce `host_shared` flag to `gpu.alloc`

Motivation: we have lowering pipeline based on upstream gpu and spirv dialects and and we are using host shared gpu memory to transfer data between host and device.
Add `host_shared` flag to `gpu.alloc` to distinguish between shared and device-only gpu memory allocations.

Differential Revision: https://reviews.llvm.org/D133533
mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
mlir/test/Dialect/GPU/ops.mlir