[Openmp-commits] [openmp] [amdgpu] D2D memcpy via streams and HSA (PR #69977)
Jon Chesterfield via Openmp-commits
openmp-commits at lists.llvm.org
Mon Oct 23 15:45:01 PDT 2023
================
@@ -2250,14 +2286,20 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
PinnedMemoryManager);
}
- /// Exchange data between two devices within the plugin. This function is not
- /// supported in this plugin.
+ /// Exchange data between two devices within the plugin.
Error dataExchangeImpl(const void *SrcPtr, GenericDeviceTy &DstGenericDevice,
void *DstPtr, int64_t Size,
AsyncInfoWrapperTy &AsyncInfoWrapper) override {
- // This function should never be called because the function
- // AMDGPUPluginTy::isDataExchangable() returns false.
- return Plugin::error("dataExchangeImpl not supported");
+ AMDGPUDeviceTy &DstDevice = static_cast<AMDGPUDeviceTy &>(DstGenericDevice);
+
+ AMDGPUStreamTy *Stream = nullptr;
+ if (auto Err = getStream(AsyncInfoWrapper, Stream))
+ return Err;
+ if (Size < 0)
----------------
JonChesterfield wrote:
Ha, yes. Done
https://github.com/llvm/llvm-project/pull/69977
More information about the Openmp-commits
mailing list