Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8d46e52
Add hipExtMemcpyBatchAsync with asymmetric swap
iassiour Jul 22, 2026
17cc45a
hipExtMemcpyBatchAsync: drop failIdx from the Ext API
iassiour Aug 3, 2026
4a8cd6b
hip-tests: fix legacy batch calls broken by failIdx removal
iassiour Aug 3, 2026
8d9a04b
hip-tests: restore failIdx in legacy doc comment
iassiour Aug 3, 2026
8142797
hipExtMemcpyBatchAsync: pad reserved wait/signal structs to 64 bytes
iassiour Aug 14, 2026
e7960be
hipExtMemcpyBatchAsync: allow device-to-device indirect copies
iassiour Aug 14, 2026
308a243
hip-tests: add contract test for hipExtMemcpyBatchAsync
iassiour Aug 14, 2026
1d4470d
hipExtMemcpyBatchAsync: realign attrs API, add PreferCU
iassiour Sep 5, 2026
bd58b9e
hipExtMemcpyBatchAsync: address review comments
iassiour Sep 24, 2026
299e08f
hipExtMemcpyBatchAsync: rename PreferCU to PreferComputeEngine
iassiour Sep 30, 2026
afeaea8
hipExtMemcpyBatchAsync: add PreferLinear and PreferBroadcast hints
iassiour Sep 30, 2026
986f4d2
rocblit: simplify asymmetric swap detection
iassiour Sep 30, 2026
28772b2
rocr: fix stale asymmetric swap comment in DmaCopySwap
iassiour Sep 30, 2026
ec79eb0
rocprofiler-sdk: guard hipExtMemcpyBatchAsync on HIP runtime table st…
iassiour Sep 30, 2026
0841d87
rocr: reject asymmetric swap before any SDMA submission
iassiour Sep 30, 2026
2aff309
hip-tests: fix flags wording in attribute validation test doc
iassiour Oct 1, 2026
a5bd769
hip: make asymmetric swap sizes follow the src/dst operands
iassiour Oct 1, 2026
7a35bc0
Reject stream capture in hipExtMemcpyBatchAsync; fix swap size pairing
iassiour Oct 1, 2026
a2eb444
Trim comments in hipExtMemcpyBatchAsync changes
iassiour Oct 1, 2026
e881961
Rename hipExtMemcpyWaitAlways to hipExtMemcpyWaitNone
iassiour Oct 7, 2026
567bb85
Clarify addr/sizesDst docs; record hipExtMemcpyBatchAsync in HRR (v9)
iassiour Oct 7, 2026
a039890
feat(hip): add hipExtMemcpyBatch graph node type
saleelk Aug 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions projects/clr/hipamd/include/hip/amd_detail/hip_api_trace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define HIP_API_TABLE_STEP_VERSION 0
#define HIP_COMPILER_API_TABLE_STEP_VERSION 0
#define HIP_TOOLS_API_TABLE_STEP_VERSION 1
#define HIP_RUNTIME_API_TABLE_STEP_VERSION 37
#define HIP_RUNTIME_API_TABLE_STEP_VERSION 39

// HIP API interface
// HIP compiler dispatch functions
Expand Down Expand Up @@ -1093,6 +1093,13 @@ typedef hipError_t (*t_hipModuleLoadFatBinary)(hipModule_t* module, const void*
typedef hipError_t (*t_hipMemcpyBatchAsync)(void** dsts, void** srcs, size_t* sizes, size_t count,
hipMemcpyAttributes* attrs, size_t* attrsIdxs,
size_t numAttrs, size_t* failIdx, hipStream_t stream);
typedef hipError_t (*t_hipExtMemcpyBatchAsync)(void** dsts, void** srcs,
size_t* sizes, size_t* sizesDst,
hipExtMemcpyWait* waits,
hipExtMemcpySignal* signals,
size_t count,
hipExtMemcpyAttributes* attrs, size_t* attrsIdxs,
size_t numAttrs, hipStream_t stream);
typedef hipError_t (*t_hipMemcpy3DBatchAsync)(size_t numOps, struct hipMemcpy3DBatchOp* opList,
size_t* failIdx, unsigned long long flags,
hipStream_t stream);
Expand Down Expand Up @@ -1193,6 +1200,17 @@ typedef hipError_t (*t_hipDeviceFlushGPUDirectRDMAWrites)(
typedef hipError_t (*t_hipLibraryGetModule)(hipModule_t* pMod, hipLibrary_t library);
typedef hipError_t (*t_hipKernelSetAttributeForDevice)(hipKernel_t kernel, hipFuncAttribute attr,
int value, int device);

typedef hipError_t (*t_hipGraphAddExtMemcpyBatchNode)(
hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies,
size_t numDependencies, const hipExtMemcpyBatchNodeParams* nodeParams);
typedef hipError_t (*t_hipGraphExtMemcpyBatchNodeGetParams)(
hipGraphNode_t node, hipExtMemcpyBatchNodeParams* pNodeParams);
typedef hipError_t (*t_hipGraphExtMemcpyBatchNodeSetParams)(
hipGraphNode_t node, const hipExtMemcpyBatchNodeParams* pNodeParams);
typedef hipError_t (*t_hipGraphExecExtMemcpyBatchNodeSetParams)(
hipGraphExec_t hGraphExec, hipGraphNode_t node,
const hipExtMemcpyBatchNodeParams* pNodeParams);
// HIP Compiler dispatch table
struct HipCompilerDispatchTable {
// HIP_COMPILER_API_TABLE_STEP_VERSION == 0
Expand Down Expand Up @@ -1858,8 +1876,17 @@ struct HipDispatchTable {
// HIP_RUNTIME_API_TABLE_STEP_VERSION == 37
t_hipKernelSetAttributeForDevice hipKernelSetAttributeForDevice_fn;

// DO NOT EDIT ABOVE!
// HIP_RUNTIME_API_TABLE_STEP_VERSION == 38
t_hipExtMemcpyBatchAsync hipExtMemcpyBatchAsync_fn;

// HIP_RUNTIME_API_TABLE_STEP_VERSION == 39
t_hipGraphAddExtMemcpyBatchNode hipGraphAddExtMemcpyBatchNode_fn;
t_hipGraphExtMemcpyBatchNodeGetParams hipGraphExtMemcpyBatchNodeGetParams_fn;
t_hipGraphExtMemcpyBatchNodeSetParams hipGraphExtMemcpyBatchNodeSetParams_fn;
t_hipGraphExecExtMemcpyBatchNodeSetParams hipGraphExecExtMemcpyBatchNodeSetParams_fn;

// DO NOT EDIT ABOVE!
// HIP_RUNTIME_API_TABLE_STEP_VERSION == 40

// ******************************************************************************************* //
//
Expand Down
188 changes: 187 additions & 1 deletion projects/clr/hipamd/include/hip/amd_detail/hip_prof_str.h

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions projects/clr/hipamd/src/amdhip.def.in
Original file line number Diff line number Diff line change
Expand Up @@ -567,4 +567,9 @@ hipMemGetDefaultMemPool
hipKernelNameRefByPtr
hipModuleEnumerateFunctions
hipDeviceFlushGPUDirectRDMAWrites
hipExtMemcpyBatchAsync
hipGraphAddExtMemcpyBatchNode
hipGraphExtMemcpyBatchNodeGetParams
hipGraphExtMemcpyBatchNodeSetParams
hipGraphExecExtMemcpyBatchNodeSetParams
@HSA_EXPORTS@
37 changes: 35 additions & 2 deletions projects/clr/hipamd/src/hip_api_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,13 @@ hipError_t hipStreamSetAttribute(hipStream_t stream, hipStreamAttrID attr,
hipError_t hipMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count,
hipMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs,
size_t* failIdx, hipStream_t stream);
hipError_t hipExtMemcpyBatchAsync(void** dsts, void** srcs,
size_t* sizes, size_t* sizesDst,
hipExtMemcpyWait* waits,
hipExtMemcpySignal* signals,
size_t count,
hipExtMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs,
hipStream_t stream);
hipError_t hipMemcpy3DBatchAsync(size_t numOps, struct hipMemcpy3DBatchOp* opList, size_t* failIdx,
unsigned long long flags, hipStream_t stream);
hipError_t hipMemcpy3DPeer(hipMemcpy3DPeerParms* p);
Expand Down Expand Up @@ -946,6 +953,16 @@ hipError_t hipDeviceFlushGPUDirectRDMAWrites(hipFlushGPUDirectRDMAWritesTarget t
hipFlushGPUDirectRDMAWritesScope scope);
hipError_t hipKernelSetAttributeForDevice(hipKernel_t kernel, hipFuncAttribute attr, int value,
int device);
hipError_t hipGraphAddExtMemcpyBatchNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
const hipGraphNode_t* pDependencies,
size_t numDependencies,
const hipExtMemcpyBatchNodeParams* nodeParams);
hipError_t hipGraphExtMemcpyBatchNodeGetParams(hipGraphNode_t node,
hipExtMemcpyBatchNodeParams* pNodeParams);
hipError_t hipGraphExtMemcpyBatchNodeSetParams(hipGraphNode_t node,
const hipExtMemcpyBatchNodeParams* pNodeParams);
hipError_t hipGraphExecExtMemcpyBatchNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node,
const hipExtMemcpyBatchNodeParams* pNodeParams);
} // namespace hip

namespace hip {
Expand Down Expand Up @@ -1495,6 +1512,7 @@ void UpdateDispatchTable(HipDispatchTable* ptrDispatchTable) {
ptrDispatchTable->hipStreamGetAttribute_fn = hip::hipStreamGetAttribute;
ptrDispatchTable->hipStreamSetAttribute_fn = hip::hipStreamSetAttribute;
ptrDispatchTable->hipMemcpyBatchAsync_fn = hip::hipMemcpyBatchAsync;
ptrDispatchTable->hipExtMemcpyBatchAsync_fn = hip::hipExtMemcpyBatchAsync;
ptrDispatchTable->hipMemcpy3DBatchAsync_fn = hip::hipMemcpy3DBatchAsync;
ptrDispatchTable->hipMemcpy3DPeer_fn = hip::hipMemcpy3DPeer;
ptrDispatchTable->hipMemcpy3DPeerAsync_fn = hip::hipMemcpy3DPeerAsync;
Expand Down Expand Up @@ -1536,6 +1554,13 @@ void UpdateDispatchTable(HipDispatchTable* ptrDispatchTable) {
ptrDispatchTable->hipInitDevice_fn = hip::hipInitDevice;
ptrDispatchTable->hipModuleEnumerateFunctions_fn = hip::hipModuleEnumerateFunctions;
ptrDispatchTable->hipDeviceFlushGPUDirectRDMAWrites_fn = hip::hipDeviceFlushGPUDirectRDMAWrites;
ptrDispatchTable->hipGraphAddExtMemcpyBatchNode_fn = hip::hipGraphAddExtMemcpyBatchNode;
ptrDispatchTable->hipGraphExtMemcpyBatchNodeGetParams_fn =
hip::hipGraphExtMemcpyBatchNodeGetParams;
ptrDispatchTable->hipGraphExtMemcpyBatchNodeSetParams_fn =
hip::hipGraphExtMemcpyBatchNodeSetParams;
ptrDispatchTable->hipGraphExecExtMemcpyBatchNodeSetParams_fn =
hip::hipGraphExecExtMemcpyBatchNodeSetParams;
}

#if HIP_ROCPROFILER_REGISTER > 0
Expand Down Expand Up @@ -2283,15 +2308,23 @@ HIP_ENFORCE_ABI(HipDispatchTable, hipDeviceFlushGPUDirectRDMAWrites_fn, 545);
HIP_ENFORCE_ABI(HipDispatchTable, hipLibraryGetModule_fn, 546);
// HIP_RUNTIME_API_TABLE_STEP_VERSION == 37
HIP_ENFORCE_ABI(HipDispatchTable, hipKernelSetAttributeForDevice_fn, 547);
// HIP_RUNTIME_API_TABLE_STEP_VERSION == 38
HIP_ENFORCE_ABI(HipDispatchTable, hipExtMemcpyBatchAsync_fn, 548);

// HIP_RUNTIME_API_TABLE_STEP_VERSION == 39
HIP_ENFORCE_ABI(HipDispatchTable, hipGraphAddExtMemcpyBatchNode_fn, 549);
HIP_ENFORCE_ABI(HipDispatchTable, hipGraphExtMemcpyBatchNodeGetParams_fn, 550);
HIP_ENFORCE_ABI(HipDispatchTable, hipGraphExtMemcpyBatchNodeSetParams_fn, 551);
HIP_ENFORCE_ABI(HipDispatchTable, hipGraphExecExtMemcpyBatchNodeSetParams_fn, 552);
// if HIP_ENFORCE_ABI entries are added for each new function pointer in the table, the number below
// will be +1 of the number in the last HIP_ENFORCE_ABI line. E.g.:
//
// HIP_ENFORCE_ABI(<table>, <functor>, 8)
//
// HIP_ENFORCE_ABI_VERSIONING(<table>, 9) <- 8 + 1 = 9
HIP_ENFORCE_ABI_VERSIONING(HipDispatchTable, 548)
HIP_ENFORCE_ABI_VERSIONING(HipDispatchTable, 553)

static_assert(HIP_RUNTIME_API_TABLE_MAJOR_VERSION == 0 && HIP_RUNTIME_API_TABLE_STEP_VERSION == 37,
static_assert(HIP_RUNTIME_API_TABLE_MAJOR_VERSION == 0 && HIP_RUNTIME_API_TABLE_STEP_VERSION == 39,
"If you get this error, add new HIP_ENFORCE_ABI(...) code for the new function "
"pointers and then update this check so it is true");
#endif
147 changes: 147 additions & 0 deletions projects/clr/hipamd/src/hip_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3955,6 +3955,153 @@ hipError_t hipGraphExecBatchMemOpNodeSetParams(hipGraphExec_t hGraphExec, hipGra
}));
}

static hipError_t ValidateExtMemcpyBatchNodeParams(const hipExtMemcpyBatchNodeParams* params,
size_t* failIdx = nullptr) {
if (params == nullptr) {
return hipErrorInvalidValue;
}
return ihipValidateMemcpyBatch(params->dsts, params->srcs, params->sizes, params->sizesDst,
params->waits, params->signals, params->count, params->attrs,
params->attrsIdxs, params->numAttrs, failIdx);
}

hipError_t hipGraphAddExtMemcpyBatchNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
const hipGraphNode_t* pDependencies,
size_t numDependencies,
const hipExtMemcpyBatchNodeParams* nodeParams) {
HIP_INIT_API(hipGraphAddExtMemcpyBatchNode, pGraphNode, graph, pDependencies, numDependencies,
nodeParams);
if (pGraphNode == nullptr || graph == nullptr ||
(numDependencies > 0 && pDependencies == nullptr)) {
HIP_RETURN(hipErrorInvalidValue);
}
hipError_t status = ValidateExtMemcpyBatchNodeParams(nodeParams);
if (status != hipSuccess) {
HIP_RETURN(status);
}

hip::GraphNode* node = new hip::GraphExtMemcpyBatchNode(nodeParams);
status = ihipGraphAddNode(node, reinterpret_cast<hip::Graph*>(graph),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call leaves capture at its default true, so a batch node added to the graph from hipStreamGetCaptureInfo_v2 is not registered as a manual node. hipStreamEndCapture then returns hipErrorStreamCaptureUnjoined; the same flow with hipGraphAddEmptyNode returns hipSuccess. Pass false, as hipGraphAddEmptyNode does.

reinterpret_cast<hip::GraphNode* const*>(pDependencies),
numDependencies);
*pGraphNode = reinterpret_cast<hipGraphNode_t>(node);
HIP_RETURN(status);
}

hipError_t hipGraphExtMemcpyBatchNodeGetParams(hipGraphNode_t node,
hipExtMemcpyBatchNodeParams* pNodeParams) {
HIP_INIT_API(hipGraphExtMemcpyBatchNodeGetParams, node, pNodeParams);
hip::GraphNode* graph_node = reinterpret_cast<hip::GraphNode*>(node);
if (!hip::GraphNode::isNodeValid(graph_node) || pNodeParams == nullptr ||
graph_node->GetType() != hipGraphNodeTypeExtMemcpyBatch) {
HIP_RETURN(hipErrorInvalidValue);
}
reinterpret_cast<hip::GraphExtMemcpyBatchNode*>(graph_node)->GetParams(pNodeParams);
HIP_RETURN(hipSuccess);
}

hipError_t hipGraphExtMemcpyBatchNodeSetParams(hipGraphNode_t node,
const hipExtMemcpyBatchNodeParams* pNodeParams) {
HIP_INIT_API(hipGraphExtMemcpyBatchNodeSetParams, node, pNodeParams);
hip::GraphNode* graph_node = reinterpret_cast<hip::GraphNode*>(node);
if (!hip::GraphNode::isNodeValid(graph_node) ||
graph_node->GetType() != hipGraphNodeTypeExtMemcpyBatch) {
HIP_RETURN(hipErrorInvalidValue);
}
hipError_t status = ValidateExtMemcpyBatchNodeParams(pNodeParams);
if (status != hipSuccess) {
HIP_RETURN(status);
}
HIP_RETURN(reinterpret_cast<hip::GraphExtMemcpyBatchNode*>(graph_node)->SetParams(pNodeParams));
}

hipError_t hipGraphExecExtMemcpyBatchNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node,
const hipExtMemcpyBatchNodeParams* pNodeParams) {
HIP_INIT_API(hipGraphExecExtMemcpyBatchNodeSetParams, hGraphExec, node, pNodeParams);
hip::GraphNode* graph_node = reinterpret_cast<hip::GraphNode*>(node);
hip::GraphExecBase* graphExec = reinterpret_cast<hip::GraphExecBase*>(hGraphExec);
if (!hip::GraphExecBase::isGraphExecValid(graphExec) ||
!hip::GraphNode::isNodeValid(graph_node) ||
graph_node->GetType() != hipGraphNodeTypeExtMemcpyBatch) {
HIP_RETURN(hipErrorInvalidValue);
}
hipError_t status = ValidateExtMemcpyBatchNodeParams(pNodeParams);
if (status != hipSuccess) {
HIP_RETURN(status);
}

hip::GraphNode* clonedNode = graphExec->GetClonedNode(graph_node);
if (clonedNode == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
// Topology is fixed once instantiated, and the batch size is part of the work the node was
// scheduled with, so only the contents of the batch may be updated.
auto* batchNode = reinterpret_cast<hip::GraphExtMemcpyBatchNode*>(clonedNode);
if (batchNode->GetCount() != pNodeParams->count) {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(batchNode->SetParams(pNodeParams));
}

static hipError_t CaptureExtMemcpyBatchNode(hipStream_t stream,
const hipExtMemcpyBatchNodeParams& nodeParams,
size_t* failIdx) {
hipError_t status = ValidateExtMemcpyBatchNodeParams(&nodeParams, failIdx);
if (status != hipSuccess) {
return status;
}

hip::Stream* capture_stream = reinterpret_cast<hip::Stream*>(stream);
hip::GraphNode* node = new hip::GraphExtMemcpyBatchNode(&nodeParams);
status = ihipGraphAddNode(node, capture_stream->GetCaptureGraph(),
capture_stream->GetLastCapturedNodes().data(),
capture_stream->GetLastCapturedNodes().size());
if (status != hipSuccess) {
return status;
}
capture_stream->SetLastCapturedNode(node);
return hipSuccess;
}

hipError_t capturehipMemcpyBatchAsync(hipStream_t& stream, void**& dsts, void**& srcs,
size_t*& sizes, size_t& count, hipMemcpyAttributes*& attrs,
size_t*& attrsIdxs, size_t& numAttrs, size_t*& failIdx) {
ClPrint(amd::LOG_DETAIL_DEBUG, amd::LOG_API,
"[hipGraph] Current capture node MemcpyBatch on stream : %p", stream);
std::vector<hipExtMemcpyAttributes> extAttrs = ihipToExtMemcpyAttributes(attrs, numAttrs);

hipExtMemcpyBatchNodeParams nodeParams{};
nodeParams.dsts = dsts;
nodeParams.srcs = srcs;
nodeParams.sizes = sizes;
nodeParams.count = count;
nodeParams.attrs = extAttrs.empty() ? nullptr : extAttrs.data();
nodeParams.attrsIdxs = attrsIdxs;
nodeParams.numAttrs = numAttrs;
return CaptureExtMemcpyBatchNode(stream, nodeParams, failIdx);
}

hipError_t capturehipExtMemcpyBatchAsync(hipStream_t& stream, void**& dsts, void**& srcs,
size_t*& sizes, size_t*& sizesDst,
hipExtMemcpyWait*& waits, hipExtMemcpySignal*& signals,
size_t& count, hipExtMemcpyAttributes*& attrs,
size_t*& attrsIdxs, size_t& numAttrs) {
ClPrint(amd::LOG_DETAIL_DEBUG, amd::LOG_API,
"[hipGraph] Current capture node ExtMemcpyBatch on stream : %p", stream);
hipExtMemcpyBatchNodeParams nodeParams{};
nodeParams.dsts = dsts;
nodeParams.srcs = srcs;
nodeParams.sizes = sizes;
nodeParams.sizesDst = sizesDst;
nodeParams.waits = waits;
nodeParams.signals = signals;
nodeParams.count = count;
nodeParams.attrs = attrs;
nodeParams.attrsIdxs = attrsIdxs;
nodeParams.numAttrs = numAttrs;
return CaptureExtMemcpyBatchNode(stream, nodeParams, /*failIdx=*/nullptr);
}

hipError_t capturehipStreamBatchMemOp(hipStream_t& stream, unsigned int& count,
hipStreamBatchMemOpParams*& paramArray,
unsigned int& flags) {
Expand Down
10 changes: 10 additions & 0 deletions projects/clr/hipamd/src/hip_graph_capture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ hipError_t capturehipStreamBatchMemOp(hipStream_t& stream, unsigned int& count,
hipStreamBatchMemOpParams*& paramArray,
unsigned int& flags);

hipError_t capturehipMemcpyBatchAsync(hipStream_t& stream, void**& dsts, void**& srcs,
size_t*& sizes, size_t& count, hipMemcpyAttributes*& attrs,
size_t*& attrsIdxs, size_t& numAttrs, size_t*& failIdx);

hipError_t capturehipExtMemcpyBatchAsync(hipStream_t& stream, void**& dsts, void**& srcs,
size_t*& sizes, size_t*& sizesDst,
hipExtMemcpyWait*& waits, hipExtMemcpySignal*& signals,
size_t& count, hipExtMemcpyAttributes*& attrs,
size_t*& attrsIdxs, size_t& numAttrs);

hipError_t capturehipStreamWaitValue32(hipStream_t& stream, void*& ptr, uint32_t& value,
unsigned int& flags, uint32_t& mask);

Expand Down
15 changes: 15 additions & 0 deletions projects/clr/hipamd/src/hip_graph_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ hipError_t ihipMemcpyCommand(amd::Command*& command, amd::Memory* dstMemory, amd
size_t sizeBytes, hipMemcpyKind kind, hip::Stream& stream,
size_t dstOffset, size_t srcOffset, bool isAsync = true);

hipError_t ihipValidateMemcpyBatch(void** dsts, void** srcs, size_t* sizes, size_t* sizesDst,
hipExtMemcpyWait* waits, hipExtMemcpySignal* signals,
size_t count, hipExtMemcpyAttributes* attrs,
size_t* attrsIdxs, size_t numAttrs, size_t* failIdx);

// The batch must already have passed ihipValidateMemcpyBatch.
hipError_t ihipMemcpyBatchCreateCommands(void** dsts, void** srcs, size_t* sizes,
size_t* sizesDst, size_t count,
hipExtMemcpyAttributes* attrs, size_t* attrsIdxs,
size_t numAttrs, hip::Stream& stream,
std::vector<amd::Command*>& commands);

std::vector<hipExtMemcpyAttributes> ihipToExtMemcpyAttributes(const hipMemcpyAttributes* attrs,
size_t numAttrs);

void ihipHtoHMemcpy(void* dst, const void* src, size_t sizeBytes, hip::Stream& stream);

bool IsHtoHMemcpy(void* dst, const void* src);
Expand Down
2 changes: 2 additions & 0 deletions projects/clr/hipamd/src/hip_graph_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const char* GetGraphNodeTypeString(uint32_t op) {
CASE_STRING(hipGraphNodeTypeMemFree, MemFreeNode)
CASE_STRING(hipGraphNodeTypeMemcpyFromSymbol, MemcpyFromSymbolNode)
CASE_STRING(hipGraphNodeTypeMemcpyToSymbol, MemcpyToSymbolNode)
CASE_STRING(hipGraphNodeTypeBatchMemOp, BatchMemOpNode)
CASE_STRING(hipGraphNodeTypeExtMemcpyBatch, ExtMemcpyBatchNode)
default:
case_string = "Unknown node type";
};
Expand Down
Loading
Loading