diff --git a/mlir/include/mlir/Dialect/GPU/GPUOps.td b/mlir/include/mlir/Dialect/GPU/GPUOps.td --- a/mlir/include/mlir/Dialect/GPU/GPUOps.td +++ b/mlir/include/mlir/Dialect/GPU/GPUOps.td @@ -746,8 +746,14 @@ 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 --- a/mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp +++ b/mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp @@ -125,7 +125,7 @@ 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 {