Graph management#
-
hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode)#
Begins graph capture on a stream.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
stream – [in] - Stream to initiate capture.
mode – [in] - Controls the interaction of this capture sequence with other API calls that are not safe.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipStreamBeginCaptureToGraph(hipStream_t stream, hipGraph_t graph, const hipGraphNode_t *dependencies, const hipGraphEdgeData *dependencyData, size_t numDependencies, hipStreamCaptureMode mode)#
Begins graph capture on a stream to an existing graph.
Warning
param “const hipGraphEdgeData* dependencyData” is currently not supported and has to be passed as nullptr. This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.
- Parameters:
stream – [in] - Stream to initiate capture.
graph – [in] - Graph to capture into.
dependencies – [in] - Dependencies of the first node captured in the stream. Can be NULL if numDependencies is 0.
dependencyData – [in] - Optional array of data associated with each dependency.
numDependencies – [in] - Number of dependencies.
mode – [in] - Controls the interaction of this capture sequence with other API calls that are not safe.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t *pGraph)#
Ends capture on a stream, returning the captured graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
stream – [in] - Stream to end capture.
pGraph – [out] - Captured graph.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus *pCaptureStatus, unsigned long long *pId)#
Get capture status of a stream.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
stream – [in] - Stream of which to get capture status from.
pCaptureStatus – [out] - Returns current capture status.
pId – [out] - Unique capture ID.
- Returns:
hipSuccess, hipErrorStreamCaptureImplicit
-
hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus *captureStatus_out, unsigned long long *id_out, hipGraph_t *graph_out, const hipGraphNode_t **dependencies_out, size_t *numDependencies_out)#
Get stream’s capture state.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
stream – [in] - Stream of which to get capture status from.
captureStatus_out – [out] - Returns current capture status.
id_out – [out] - Unique capture ID.
graph_out – [out] - Returns the graph being captured into.
dependencies_out – [out] - Pointer to an array of nodes representing the graphs dependencies.
numDependencies_out – [out] - Returns size of the array returned in dependencies_out.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorStreamCaptureImplicit
-
hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus *pCaptureStatus)#
Get stream’s capture state.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
stream – [in] - Stream of which to get capture status from.
pCaptureStatus – [out] - Returns current capture status.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorStreamCaptureImplicit
-
hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t *dependencies, size_t numDependencies, unsigned int flags)#
Update the set of dependencies in a capturing stream.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
stream – [in] Stream that is being captured.
dependencies – [in] Pointer to an array of nodes to add/replace.
numDependencies – [in] Size of the dependencies array.
flags – [in] Flag to update dependency set. Should be one of the values in enum hipStreamUpdateCaptureDependenciesFlags.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorIllegalState
-
hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode *mode)#
Swaps the stream capture mode of a thread.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
mode – [in] - Pointer to mode value to swap with the current mode.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphCreate(hipGraph_t *pGraph, unsigned int flags)#
Creates a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraph – [out] - pointer to graph to create.
flags – [in] - flags for graph creation, must be 0.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorMemoryAllocation
-
hipError_t hipGraphDestroy(hipGraph_t graph)#
Destroys a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - instance of graph to destroy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t *from, const hipGraphNode_t *to, size_t numDependencies)#
Adds dependency edges to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - Instance of the graph to add dependencies to.
from – [in] - Pointer to the graph nodes with dependencies to add from.
to – [in] - Pointer to the graph nodes to add dependencies to.
numDependencies – [in] - Number of dependencies to add.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphRemoveDependencies(hipGraph_t graph, const hipGraphNode_t *from, const hipGraphNode_t *to, size_t numDependencies)#
Removes dependency edges from a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - Instance of the graph to remove dependencies from.
from – [in] - Array of nodes that provide the dependencies.
to – [in] - Array of dependent nodes.
numDependencies – [in] - Number of dependencies to remove.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t *from, hipGraphNode_t *to, size_t *numEdges)#
Returns a graph’s dependency edges.
from and to may both be NULL, in which case this function only returns the number of edges in numEdges. Otherwise, numEdges entries will be filled in. If numEdges is higher than the actual number of edges, the remaining entries in from and to will be set to NULL, and the number of edges actually returned will be written to numEdges.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - Instance of the graph to get the edges from.
from – [out] - Pointer to the graph nodes to return edge endpoints.
to – [out] - Pointer to the graph nodes to return edge endpoints.
numEdges – [out] - Returns number of edges.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t *nodes, size_t *numNodes)#
Returns a graph’s nodes.
nodes may be NULL, in which case this function will return the number of nodes in numNodes. Otherwise, numNodes entries will be filled in. If numNodes is higher than the actual number of nodes, the remaining entries in nodes will be set to NULL, and the number of nodes actually obtained will be returned in numNodes.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - Instance of graph to get the nodes from.
nodes – [out] - Pointer to return the graph nodes.
numNodes – [out] - Returns the number of graph nodes.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t *pRootNodes, size_t *pNumRootNodes)#
Returns a graph’s root nodes.
pRootNodes may be NULL, in which case this function will return the number of root nodes in pNumRootNodes. Otherwise, pNumRootNodes entries will be filled in. If pNumRootNodes is higher than the actual number of root nodes, the remaining entries in pRootNodes will be set to NULL, and the number of nodes actually obtained will be returned in pNumRootNodes.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - Instance of the graph to get the nodes from.
pRootNodes – [out] - Pointer to return the graph’s root nodes.
pNumRootNodes – [out] - Returns the number of graph’s root nodes.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphNodeGetDependencies(hipGraphNode_t node, hipGraphNode_t *pDependencies, size_t *pNumDependencies)#
Returns a node’s dependencies.
pDependencies may be NULL, in which case this function will return the number of dependencies in pNumDependencies. Otherwise, pNumDependencies entries will be filled in. If pNumDependencies is higher than the actual number of dependencies, the remaining entries in pDependencies will be set to NULL, and the number of nodes actually obtained will be returned in pNumDependencies.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Graph node to get the dependencies from.
pDependencies – [out] - Pointer to return the dependencies.
pNumDependencies – [out] - Returns the number of graph node dependencies.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphNodeGetDependentNodes(hipGraphNode_t node, hipGraphNode_t *pDependentNodes, size_t *pNumDependentNodes)#
Returns a node’s dependent nodes.
pDependentNodes may be NULL, in which case this function will return the number of dependent nodes in pNumDependentNodes. Otherwise, pNumDependentNodes entries will be filled in. If pNumDependentNodes is higher than the actual number of dependent nodes, the remaining entries in pDependentNodes will be set to NULL, and the number of nodes actually obtained will be returned in pNumDependentNodes.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Graph node to get the dependent nodes from.
pDependentNodes – [out] - Pointer to return the graph dependent nodes.
pNumDependentNodes – [out] - Returns the number of graph node dependent nodes.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphNodeGetType(hipGraphNode_t node, hipGraphNodeType *pType)#
Returns a node’s type.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Node to get type of.
pType – [out] - Returns the node’s type.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphDestroyNode(hipGraphNode_t node)#
Remove a node from the graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - graph node to remove
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphClone(hipGraph_t *pGraphClone, hipGraph_t originalGraph)#
Clones a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphClone – [out] - Returns newly created cloned graph.
originalGraph – [in] - original graph to clone from.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorMemoryAllocation
-
hipError_t hipGraphNodeFindInClone(hipGraphNode_t *pNode, hipGraphNode_t originalNode, hipGraph_t clonedGraph)#
Finds a cloned version of a node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pNode – [out] - Returns the cloned node.
originalNode – [in] - original node handle.
clonedGraph – [in] - Cloned graph to query.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphInstantiate(hipGraphExec_t *pGraphExec, hipGraph_t graph, hipGraphNode_t *pErrorNode, char *pLogBuffer, size_t bufferSize)#
Creates an executable graph from a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphExec – [out] - Pointer to instantiated executable graph.
graph – [in] - Instance of graph to instantiate.
pErrorNode – [out] - Pointer to error node. In case an error occured during graph instantiation, it could modify the corresponding node.
pLogBuffer – [out] - Pointer to log buffer.
bufferSize – [out] - Size of the log buffer.
- Returns:
hipSuccess, hipErrorOutOfMemory
-
hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t *pGraphExec, hipGraph_t graph, unsigned long long flags)#
Creates an executable graph from a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues. It does not support any of flag and is behaving as hipGraphInstantiate.
- Parameters:
pGraphExec – [out] - Pointer to instantiated executable graph.
graph – [in] - Instance of graph to instantiate.
flags – [in] - Flags to control instantiation.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphInstantiateWithParams(hipGraphExec_t *pGraphExec, hipGraph_t graph, hipGraphInstantiateParams *instantiateParams)#
Creates an executable graph from a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphExec – [out] - Pointer to instantiated executable graph.
graph – [in] - Instance of graph to instantiate.
instantiateParams – [in] - Graph instantiation Params
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream)#
Launches an executable graph in the specified stream.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graphExec – [in] - Instance of executable graph to launch.
stream – [in] - Instance of stream in which to launch executable graph.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream)#
Uploads an executable graph to a stream.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graphExec – [in] - Instance of executable graph to be uploaded.
stream – [in] - Instance of stream to which the executable graph is uploaded to.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, hipGraphNodeParams *nodeParams)#
Creates a kernel execution node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to kernel graph node that is created.
graph – [in] - Instance of graph to add the created node to.
pDependencies – [in] - Pointer to the dependencies on the kernel execution node.
numDependencies – [in] - Number of dependencies.
nodeParams – [in] - Pointer to the node parameters.
- Returns:
hipSuccess, hipErrorInvalidValue.
-
hipError_t hipGraphExecGetFlags(hipGraphExec_t graphExec, unsigned long long *flags)#
Return the flags of an executable graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graphExec – [in] - Executable graph to get the flags from.
flags – [out] - Flags used to instantiate this executable graph.
- Returns:
hipSuccess, hipErrorInvalidValue.
-
hipError_t hipGraphNodeSetParams(hipGraphNode_t node, hipGraphNodeParams *nodeParams)#
Updates parameters of a graph’s node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set parameters for.
nodeParams – [in] - Pointer to the parameters to be set.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorInvalidDeviceFunction, hipErrorNotSupported.
-
hipError_t hipGraphExecNodeSetParams(hipGraphExec_t graphExec, hipGraphNode_t node, hipGraphNodeParams *nodeParams)#
Updates parameters of an executable graph’s node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graphExec – [in] - Instance of the executable graph.
node – [in] - Instance of the node to set parameters to.
nodeParams – [in] - Pointer to the parameters to be set.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorInvalidDeviceFunction, hipErrorNotSupported.
-
hipError_t hipGraphExecDestroy(hipGraphExec_t graphExec)#
Destroys an executable graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graphExec – [in] - Instance of executable graph to destroy.
- Returns:
hipSuccess.
-
hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph, hipGraphNode_t *hErrorNode_out, hipGraphExecUpdateResult *updateResult_out)#
Check whether an executable graph can be updated with a graph and perform the update if * possible.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - instance of executable graph to update.
hGraph – [in] - graph that contains the updated parameters.
hErrorNode_out – [in] - node which caused the permissibility check to forbid the update.
updateResult_out – [in] - Return code whether the graph update was performed.
- Returns:
hipSuccess, hipErrorGraphExecUpdateFailure
-
hipError_t hipGraphAddKernelNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipKernelNodeParams *pNodeParams)#
Creates a kernel execution node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created
graph – [in] - Instance of graph to add the created node to.
pDependencies – [in] - Pointer to the dependencies of the kernel execution node.
numDependencies – [in] - The number of the dependencies.
pNodeParams – [in] - Pointer to the parameters of the kernel execution node.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorInvalidDeviceFunction
-
hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams *pNodeParams)#
Gets kernel node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - instance of the node to get parameters from.
pNodeParams – [out] - pointer to the parameters
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, const hipKernelNodeParams *pNodeParams)#
Sets a kernel node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set parameters of.
pNodeParams – [in] - const pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipKernelNodeParams *pNodeParams)#
Sets the parameters for a kernel node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - Instance of the executable graph with the node.
node – [in] - Instance of the node to set parameters of.
pNodeParams – [in] - const pointer to the kernel node parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGraphAddMemcpyNode(hipGraphNode_t *phGraphNode, hipGraph_t hGraph, const hipGraphNode_t *dependencies, size_t numDependencies, const HIP_MEMCPY3D *copyParams, hipCtx_t ctx)#
Creates a memcpy node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
phGraphNode – [out] - Pointer to graph node that is created.
hGraph – [in] - Instance of graph to add the created node to.
dependencies – [in] - const pointer to the dependencies of the memcpy execution node.
numDependencies – [in] - The number of dependencies.
copyParams – [in] - const pointer to the parameters for the memory copy.
ctx – [in] - context related to current device.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddMemcpyNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipMemcpy3DParms *pCopyParams)#
Creates a memcpy node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of graph to add the created node to.
pDependencies – [in] - const pointer to the dependencies of the memcpy execution node.
numDependencies – [in] - The number of dependencies.
pCopyParams – [in] - const pointer to the parameters for the memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms *pNodeParams)#
Gets a memcpy node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - instance of the node to get parameters from.
pNodeParams – [out] - pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms *pNodeParams)#
Sets a memcpy node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - instance of the node to set parameters to.
pNodeParams – [in] - const pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, const hipKernelNodeAttrValue *value)#
Sets a node’s attribute.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - Instance of the node to set parameters of.
attr – [in] - The attribute type to be set.
value – [in] - const pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, hipKernelNodeAttrValue *value)#
Gets a node’s attribute.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - Instance of the node to set parameters of.
attr – [in] - The attribute type to be set.
value – [in] - const pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, hipMemcpy3DParms *pNodeParams)#
Sets the parameters of a memcpy node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - Instance of the executable graph with the node.
node – [in] - Instance of the node to set parameters of.
pNodeParams – [in] - const pointer to the kernel node parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddMemcpyNode1D(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, void *dst, const void *src, size_t count, hipMemcpyKind kind)#
Creates a 1D memcpy node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of graph to add the created node to.
pDependencies – [in] - const pointer to the dependencies of the memcpy execution node.
numDependencies – [in] - The number of dependencies.
dst – [in] - Pointer to memory address of the destination.
src – [in] - Pointer to memory address of the source.
count – [in] - Size of the memory to copy.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemcpyNodeSetParams1D(hipGraphNode_t node, void *dst, const void *src, size_t count, hipMemcpyKind kind)#
Sets a memcpy node’s parameters to perform a 1-dimensional copy.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set parameters of.
dst – [in] - Pointer to memory address of the destination.
src – [in] - Pointer to memory address of the source.
count – [in] - Size of the memory to copy.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecMemcpyNodeSetParams1D(hipGraphExec_t hGraphExec, hipGraphNode_t node, void *dst, const void *src, size_t count, hipMemcpyKind kind)#
Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional copy.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - Instance of the executable graph with the node.
node – [in] - Instance of the node to set parameters of.
dst – [in] - Pointer to memory address of the destination.
src – [in] - Pointer to memory address of the source.
count – [in] - Size of the memory to copy.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddMemcpyNodeFromSymbol(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, void *dst, const void *symbol, size_t count, size_t offset, hipMemcpyKind kind)#
Creates a memcpy node to copy from a symbol on the device and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of graph to add the created node to.
pDependencies – [in] - const pointer to the dependencies of the memcpy execution node.
numDependencies – [in] - Number of the dependencies.
dst – [in] - Pointer to memory address of the destination.
symbol – [in] - Device symbol address.
count – [in] - Size of the memory to copy.
offset – [in] - Offset from start of symbol in bytes.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemcpyNodeSetParamsFromSymbol(hipGraphNode_t node, void *dst, const void *symbol, size_t count, size_t offset, hipMemcpyKind kind)#
Sets a memcpy node’s parameters to copy from a symbol on the device.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set parameters of.
dst – [in] - Pointer to memory address of the destination.
symbol – [in] - Device symbol address.
count – [in] - Size of the memory to copy.
offset – [in] - Offset from start of symbol in bytes.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, void *dst, const void *symbol, size_t count, size_t offset, hipMemcpyKind kind)#
Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the.
device.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - Instance of the executable graph with the node.
node – [in] - Instance of the node to set parameters of.
dst – [in] - Pointer to memory address of the destination.
symbol – [in] - Device symbol address.
count – [in] - Size of the memory to copy.
offset – [in] - Offset from start of symbol in bytes.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddMemcpyNodeToSymbol(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const void *symbol, const void *src, size_t count, size_t offset, hipMemcpyKind kind)#
Creates a memcpy node to copy to a symbol on the device and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of graph to add the created node to.
pDependencies – [in] - const pointer to the dependencies on the memcpy execution node.
numDependencies – [in] - Number of dependencies.
symbol – [in] - Device symbol address.
src – [in] - Pointer to memory address of the src.
count – [in] - Size of the memory to copy.
offset – [in] - Offset from start of symbol in bytes.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemcpyNodeSetParamsToSymbol(hipGraphNode_t node, const void *symbol, const void *src, size_t count, size_t offset, hipMemcpyKind kind)#
Sets a memcpy node’s parameters to copy to a symbol on the device.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set parameters of.
symbol – [in] - Device symbol address.
src – [in] - Pointer to memory address of the src.
count – [in] - Size of the memory to copy.
offset – [in] - Offset from start of symbol in bytes.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecMemcpyNodeSetParamsToSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, const void *symbol, const void *src, size_t count, size_t offset, hipMemcpyKind kind)#
Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the device.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - Instance of the executable graph with the node.
node – [in] - Instance of the node to set parameters of.
symbol – [in] - Device symbol address.
src – [in] - Pointer to memory address of the src.
count – [in] - Size of the memory to copy.
offset – [in] - Offset from start of symbol in bytes.
kind – [in] - Type of memory copy.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddMemsetNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipMemsetParams *pMemsetParams)#
Creates a memset node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of the graph to add the created node to.
pDependencies – [in] - const pointer to the dependencies on the memset execution node.
numDependencies – [in] - Number of dependencies.
pMemsetParams – [in] - const pointer to the parameters for the memory set.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams *pNodeParams)#
Gets a memset node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to get parameters of.
pNodeParams – [out] - Pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParams *pNodeParams)#
Sets a memset node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set parameters of.
pNodeParams – [in] - Pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipMemsetParams *pNodeParams)#
Sets the parameters for a memset node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - Instance of the executable graph with the node.
node – [in] - Instance of the node to set parameters of.
pNodeParams – [in] - Pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddHostNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipHostNodeParams *pNodeParams)#
Creates a host execution node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of the graph to add the created node to.
pDependencies – [in] - const pointer to the dependencies of the memset execution node.
numDependencies – [in] - Number of dependencies.
pNodeParams – [in] - Pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphHostNodeGetParams(hipGraphNode_t node, hipHostNodeParams *pNodeParams)#
Returns a host node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to get parameters of.
pNodeParams – [out] - Pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const hipHostNodeParams *pNodeParams)#
Sets a host node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set parameters of.
pNodeParams – [in] - Pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipHostNodeParams *pNodeParams)#
Sets the parameters for a host node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - Instance of the executable graph with the node.
node – [in] - Instance of the node to set parameters of.
pNodeParams – [in] - Pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddChildGraphNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, hipGraph_t childGraph)#
Creates a child graph node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of the graph to add the created node.
pDependencies – [in] - const pointer to the dependencies of the memset execution node.
numDependencies – [in] - Number of dependencies.
childGraph – [in] - Graph to clone into this node
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t *pGraph)#
Gets a handle to the embedded graph of a child graph node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to get child graph of.
pGraph – [out] - Pointer to get the graph.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, hipGraph_t childGraph)#
Updates node parameters in the child graph node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - instance of the executable graph with the node.
node – [in] - node from the graph which was used to instantiate graphExec.
childGraph – [in] - child graph with updated parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddEmptyNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies)#
Creates an empty node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of the graph the node is added to.
pDependencies – [in] - const pointer to the node dependencies.
numDependencies – [in] - Number of dependencies.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddEventRecordNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, hipEvent_t event)#
Creates an event record node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of the graph the node is added to.
pDependencies – [in] - const pointer to the node dependencies.
numDependencies – [in] - Number of dependencies.
event – [in] - Event of the node.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphEventRecordNodeGetEvent(hipGraphNode_t node, hipEvent_t *event_out)#
Returns the event associated with an event record node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to get event of.
event_out – [out] - Pointer to return the event.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event)#
Sets an event record node’s event.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set event to.
event – [in] - Pointer to the event.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event)#
Sets the event for an event record node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - instance of the executable graph with the node.
hNode – [in] - node from the graph which was used to instantiate graphExec.
event – [in] - pointer to the event.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddEventWaitNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, hipEvent_t event)#
Creates an event wait node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to graph node that is created.
graph – [in] - Instance of the graph the node to be added.
pDependencies – [in] - const pointer to the node dependencies.
numDependencies – [in] - Number of dependencies.
event – [in] - Event for the node.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t *event_out)#
Returns the event associated with an event wait node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to get event of.
event_out – [out] - Pointer to return the event.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event)#
Sets an event wait node’s event.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Instance of the node to set event of.
event – [in] - Pointer to the event.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event)#
Sets the event for an event record node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - instance of the executable graph with the node.
hNode – [in] - node from the graph which was used to instantiate graphExec.
event – [in] - pointer to the event.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddMemAllocNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, hipMemAllocNodeParams *pNodeParams)#
Creates a memory allocation node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to the graph node to create and add to the graph
graph – [in] - Instance of the graph node to be added
pDependencies – [in] - Const pointer to the node dependencies
numDependencies – [in] - The number of dependencies
pNodeParams – [inout] - Node parameters for memory allocation, returns a pointer to the allocated memory.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemAllocNodeGetParams(hipGraphNode_t node, hipMemAllocNodeParams *pNodeParams)#
Returns parameters for memory allocation node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Memory allocation node to query
pNodeParams – [out] - Parameters for the specified memory allocation node
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddMemFreeNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, void *dev_ptr)#
Creates a memory free node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - Pointer to the graph node to create and add to the graph
graph – [in] - Instance of the graph node to be added
pDependencies – [in] - Const pointer to the node dependencies
numDependencies – [in] - The number of dependencies
dev_ptr – [in] - Pointer to the memory to be freed
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphMemFreeNodeGetParams(hipGraphNode_t node, void *dev_ptr)#
Returns parameters for memory free node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
node – [in] - Memory free node to query
dev_ptr – [out] - Device pointer of the specified memory free node
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void *value)#
Get the mem attribute for graphs.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
device – [in] - Device to get attributes from
attr – [in] - Attribute type to be queried
value – [out] - Value of the queried attribute
- Returns:
hipSuccess, hipErrorInvalidDevice
-
hipError_t hipDeviceSetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void *value)#
Set the mem attribute for graphs.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
device – [in] - Device to set attribute of.
attr – [in] - Attribute type to be set.
value – [in] - Value of the attribute.
- Returns:
hipSuccess, hipErrorInvalidDevice
-
hipError_t hipDeviceGraphMemTrim(int device)#
Free unused memory reserved for graphs on a specific device and return it back to the OS.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
device – [in] - Device for which memory should be trimmed
- Returns:
hipSuccess, hipErrorInvalidDevice
-
hipError_t hipUserObjectCreate(hipUserObject_t *object_out, void *ptr, hipHostFn_t destroy, unsigned int initialRefcount, unsigned int flags)#
Create an instance of userObject to manage lifetime of a resource.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
object_out – [out] - pointer to instace of userobj.
ptr – [in] - pointer to pass to destroy function.
destroy – [in] - destroy callback to remove resource.
initialRefcount – [in] - reference to resource.
flags – [in] - flags passed to API.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipUserObjectRelease(hipUserObject_t object, unsigned int count)#
Release number of references to resource.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
object – [in] - pointer to instace of userobj.
count – [in] - reference to resource to be retained.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipUserObjectRetain(hipUserObject_t object, unsigned int count)#
Retain number of references to resource.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
object – [in] - pointer to instace of userobj.
count – [in] - reference to resource to be retained.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphRetainUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count, unsigned int flags)#
Retain user object for graphs.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - pointer to graph to retain the user object for.
object – [in] - pointer to instace of userobj.
count – [in] - reference to resource to be retained.
flags – [in] - flags passed to API.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphReleaseUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count)#
Release user object from graphs.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - pointer to graph to retain the user object for.
object – [in] - pointer to instace of userobj.
count – [in] - reference to resource to be retained.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphDebugDotPrint(hipGraph_t graph, const char *path, unsigned int flags)#
Write a DOT file describing graph structure.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
graph – [in] - graph object for which DOT file has to be generated.
path – [in] - path to write the DOT file.
flags – [in] - Flags from hipGraphDebugDotFlags to get additional node information.
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorOperatingSystem
-
hipError_t hipGraphKernelNodeCopyAttributes(hipGraphNode_t hSrc, hipGraphNode_t hDst)#
Copies attributes from source node to destination node.
Copies attributes from source node to destination node. Both node must have the same context.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hDst – [out] - Destination node.
hSrc – [in] - Source node. For list of attributes see hipKernelNodeAttrID.
- Returns:
hipSuccess, hipErrorInvalidContext
-
hipError_t hipGraphNodeSetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, unsigned int isEnabled)#
Enables or disables the specified node in the given graphExec.
Sets hNode to be either enabled or disabled. Disabled nodes are functionally equivalent to empty nodes until they are reenabled. Existing node parameters are not affected by disabling/enabling the node.
The node is identified by the corresponding hNode in the non-executable graph, from which the executable graph was instantiated.
hNode must not have been removed from the original graph.
Note
Currently only kernel, memset and memcpy nodes are supported.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - The executable graph in which to set the specified node.
hNode – [in] - Node from the graph from which graphExec was instantiated.
isEnabled – [in] - Node is enabled if != 0, otherwise the node is disabled.
- Returns:
hipSuccess, hipErrorInvalidValue,
-
hipError_t hipGraphNodeGetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, unsigned int *isEnabled)#
Query whether a node in the given graphExec is enabled.
Sets isEnabled to 1 if hNode is enabled, or 0 if it is disabled.
The node is identified by the corresponding node in the non-executable graph, from which the executable graph was instantiated.
hNode must not have been removed from the original graph.
Note
Currently only kernel, memset and memcpy nodes are supported.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - The executable graph in which to set the specified node.
hNode – [in] - Node from the graph from which graphExec was instantiated.
isEnabled – [out] - Location to return the enabled status of the node.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddExternalSemaphoresWaitNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipExternalSemaphoreWaitNodeParams *nodeParams)#
Creates a external semaphor wait node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - pointer to the graph node to create.
graph – [in] - instance of the graph to add the created node.
pDependencies – [in] - const pointer to the dependencies on the memset execution node.
numDependencies – [in] - the number of the dependencies.
nodeParams – [in] -pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphAddExternalSemaphoresSignalNode(hipGraphNode_t *pGraphNode, hipGraph_t graph, const hipGraphNode_t *pDependencies, size_t numDependencies, const hipExternalSemaphoreSignalNodeParams *nodeParams)#
Creates a external semaphor signal node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
pGraphNode – [out] - pointer to the graph node to create.
graph – [in] - instance of the graph to add the created node.
pDependencies – [in] - const pointer to the dependencies on the memset execution node.
numDependencies – [in] - the number of the dependencies.
nodeParams – [in] -pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExternalSemaphoresSignalNodeSetParams(hipGraphNode_t hNode, const hipExternalSemaphoreSignalNodeParams *nodeParams)#
Updates node parameters in the external semaphore signal node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - Node from the graph from which graphExec was instantiated.
nodeParams – [in] - Pointer to the params to be set.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExternalSemaphoresWaitNodeSetParams(hipGraphNode_t hNode, const hipExternalSemaphoreWaitNodeParams *nodeParams)#
Updates node parameters in the external semaphore wait node.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - Node from the graph from which graphExec was instantiated.
nodeParams – [in] - Pointer to the params to be set.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExternalSemaphoresSignalNodeGetParams(hipGraphNode_t hNode, hipExternalSemaphoreSignalNodeParams *params_out)#
Returns external semaphore signal node params.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - Node from the graph from which graphExec was instantiated.
params_out – [out] - Pointer to params.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExternalSemaphoresWaitNodeGetParams(hipGraphNode_t hNode, hipExternalSemaphoreWaitNodeParams *params_out)#
Returns external semaphore wait node params.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - Node from the graph from which graphExec was instantiated.
params_out – [out] - Pointer to params.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecExternalSemaphoresSignalNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const hipExternalSemaphoreSignalNodeParams *nodeParams)#
Updates node parameters in the external semaphore signal node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - The executable graph in which to set the specified node.
hNode – [in] - Node from the graph from which graphExec was instantiated.
nodeParams – [in] - Pointer to the params to be set.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipGraphExecExternalSemaphoresWaitNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const hipExternalSemaphoreWaitNodeParams *nodeParams)#
Updates node parameters in the external semaphore wait node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - The executable graph in which to set the specified node.
hNode – [in] - Node from the graph from which graphExec was instantiated.
nodeParams – [in] - Pointer to the params to be set.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGraphMemcpyNodeGetParams(hipGraphNode_t hNode, HIP_MEMCPY3D *nodeParams)#
Gets a memcpy node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - instance of the node to get parameters from.
nodeParams – [out] - pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGraphMemcpyNodeSetParams(hipGraphNode_t hNode, const HIP_MEMCPY3D *nodeParams)#
Sets a memcpy node’s parameters.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hNode – [in] - instance of the node to Set parameters for.
nodeParams – [out] - pointer to the parameters.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGraphAddMemsetNode(hipGraphNode_t *phGraphNode, hipGraph_t hGraph, const hipGraphNode_t *dependencies, size_t numDependencies, const HIP_MEMSET_NODE_PARAMS *memsetParams, hipCtx_t ctx)#
Creates a memset node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
phGraphNode – [out] - pointer to graph node to create.
hGraph – [in] - instance of graph to add the created node to.
dependencies – [in] - const pointer to the dependencies on the memset execution node.
numDependencies – [in] - number of the dependencies.
memsetParams – [in] - const pointer to the parameters for the memory set.
ctx – [in] - cotext related to current device.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGraphAddMemFreeNode(hipGraphNode_t *phGraphNode, hipGraph_t hGraph, const hipGraphNode_t *dependencies, size_t numDependencies, hipDeviceptr_t dptr)#
Creates a memory free node and adds it to a graph.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
phGraphNode – [out] - Pointer to the graph node to create and add to the graph
hGraph – [in] - Instance of the graph the node to be added
dependencies – [in] - Const pointer to the node dependencies
numDependencies – [in] - The number of dependencies
dptr – [in] - Pointer to the memory to be freed
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const HIP_MEMCPY3D *copyParams, hipCtx_t ctx)#
Sets the parameters for a memcpy node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - instance of the executable graph with the node.
hNode – [in] - instance of the node to set parameters to.
copyParams – [in] - const pointer to the memcpy node params.
ctx – [in] - cotext related to current device.
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const HIP_MEMSET_NODE_PARAMS *memsetParams, hipCtx_t ctx)#
Sets the parameters for a memset node in the given graphExec.
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Parameters:
hGraphExec – [in] - instance of the executable graph with the node.
hNode – [in] - instance of the node to set parameters to.
memsetParams – [in] - pointer to the parameters.
ctx – [in] - cotext related to current device.
- Returns:
hipSuccess, hipErrorInvalidValue