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>
此提交包含在:
sdashmiz
2022-01-10 11:02:49 -05:00
提交者 Shadi Dashmiz
父節點 43c650cf48
當前提交 efd2d55e9d
共有 6 個檔案被更改,包括 80 行新增1 行删除
+24
查看文件
@@ -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) {