aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mlir/include/mlir/Dialect/GPU/GPUOps.td10
-rw-r--r--mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp2
2 files changed, 9 insertions, 3 deletions
diff --git a/mlir/include/mlir/Dialect/GPU/GPUOps.td b/mlir/include/mlir/Dialect/GPU/GPUOps.td
index 0ae6267..39c091a 100644
--- a/mlir/include/mlir/Dialect/GPU/GPUOps.td
+++ b/mlir/include/mlir/Dialect/GPU/GPUOps.td
@@ -746,8 +746,14 @@ def GPU_HostRegisterOp : GPU_Op<"host_register">,
Arguments<(ins AnyUnrankedMemRef:$value)> {
let summary = "Registers a memref for access from device.";
let description = [{
- This op registers the host memory pointed to by a memref to be accessed from
- a device.
+ This op maps the provided host buffer into the device address space.
+
+ This operation may not be supported in every environment, there is not yet a
+ way to check at runtime whether this feature is supported.
+
+ Writes from the host are guaranteed to be visible to device kernels that are
+ launched afterwards. Writes from the device are guaranteed to be visible on
+ the host after synchronizing with the device kernel completion.
}];
let assemblyFormat = "$value attr-dict `:` type($value)";
diff --git a/mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp b/mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
index 8aa8433..56dc7d3 100644
--- a/mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
+++ b/mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
@@ -125,7 +125,7 @@ protected:
llvmIntPtrType /* intptr_t elementSizeBytes */}};
};
-/// A rewrite patter to convert gpu.host_register operations into a GPU runtime
+/// A rewrite pattern to convert gpu.host_register operations into a GPU runtime
/// call. Currently it supports CUDA and ROCm (HIP).
class ConvertHostRegisterOpToGpuRuntimeCallPattern
: public ConvertOpToGpuRuntimeCallPattern<gpu::HostRegisterOp> {