SWDEV-421021 - add hipDrvGraphAddMemsetNode

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Id3fbfc0d9b663f74ed1b76f5aa32dea904b1eec6


[ROCm/hip commit: ffefac3a8d]
This commit is contained in:
sdashmiz
2023-10-02 10:37:41 -04:00
committed by Shadi Dashmiz
vanhempi df0de2458f
commit 8a1939c80f
@@ -1203,6 +1203,18 @@ typedef union hipKernelNodeAttrValue {
int cooperative;
} hipKernelNodeAttrValue;
/**
* Memset node params
*/
typedef struct HIP_MEMSET_NODE_PARAMS {
hipDeviceptr_t dst; ///< Destination pointer on device
size_t pitch; ///< Destination device pointer pitch. Unused if height equals 1
unsigned int value; ///< Value of memset to be set
unsigned int elementSize; ///< Element in bytes. Must be 1, 2, or 4.
size_t width; ///< Width of a row
size_t height; ///< Number of rows
} HIP_MEMSET_NODE_PARAMS;
/**
* Graph execution update result
*/
@@ -7613,6 +7625,24 @@ hipError_t hipDrvGraphMemcpyNodeGetParams(hipGraphNode_t hNode, HIP_MEMCPY3D* no
* it is still open to changes and may have outstanding issues.
*/
hipError_t hipDrvGraphMemcpyNodeSetParams(hipGraphNode_t hNode, const HIP_MEMCPY3D* nodeParams);
/**
* @brief Creates a memset node and adds it to a graph.
*
* @param [out] phGraphNode - pointer to graph node to create.
* @param [in] hGraph - instance of graph to add the created node to.
* @param [in] dependencies - const pointer to the dependencies on the memset execution node.
* @param [in] numDependencies - number of the dependencies.
* @param [in] memsetParams - const pointer to the parameters for the memory set.
* @param [in] ctx - cotext related to current device.
* @returns #hipSuccess, #hipErrorInvalidValue
* @warning : This API is marked as beta, meaning, while this is feature complete,
* it is still open to changes and may have outstanding issues.
*/
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);
// doxygen end graph API
/**
* @}