SWDEV-318833 - Get and Set attribute for kernel nodes

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ie51aa4b56661cbb8c5b4eb1dbaad327377084ffb
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
This commit is contained in:
sdashmiz
2022-01-10 11:02:49 -05:00
committed by Shadi Dashmiz
parent 43c650cf48
commit efd2d55e9d
6 changed files with 80 additions and 1 deletions
+24
View File
@@ -1113,6 +1113,30 @@ hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms* pN
HIP_RETURN(hipSuccess);
}
hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr,
const hipKernelNodeAttrValue* value) {
HIP_INIT_API(hipGraphKernelNodeSetAttribute, hNode, attr, value);
if (hNode == nullptr || value == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
if (attr != hipKernelNodeAttributeAccessPolicyWindow && attr != hipKernelNodeAttributeCooperative ) {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(reinterpret_cast<hipGraphKernelNode*>(hNode)->SetAttrParams(attr, value));
}
hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr,
hipKernelNodeAttrValue* value) {
HIP_INIT_API(hipGraphKernelNodeGetAttribute, hNode, attr, value);
if (hNode == nullptr || value == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
if (attr != hipKernelNodeAttributeAccessPolicyWindow && attr != hipKernelNodeAttributeCooperative ) {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(reinterpret_cast<hipGraphKernelNode*>(hNode)->GetAttrParams(attr, value));
}
hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms* pNodeParams) {
HIP_INIT_API(hipGraphMemcpyNodeSetParams, node, pNodeParams);
if (node == nullptr || pNodeParams == nullptr) {