diff --git a/projects/clr/hipamd/src/hip_graph_internal.hpp b/projects/clr/hipamd/src/hip_graph_internal.hpp index 80f976aff8..2437ec5333 100644 --- a/projects/clr/hipamd/src/hip_graph_internal.hpp +++ b/projects/clr/hipamd/src/hip_graph_internal.hpp @@ -771,6 +771,15 @@ class hipGraphKernelNode : public hipGraphNode { hipError_t SetAttrParams(hipKernelNodeAttrID attr, const hipKernelNodeAttrValue* params) { // updates kernel attr params if (attr == hipKernelNodeAttributeAccessPolicyWindow) { + if (params->accessPolicyWindow.hitRatio > 1) { + return hipErrorInvalidValue; + } + if (params->accessPolicyWindow.missProp == hipAccessPropertyPersisting) { + return hipErrorInvalidValue; + } + if (params->accessPolicyWindow.num_bytes > 0 && params->accessPolicyWindow.hitRatio == 0) { + return hipErrorInvalidValue; + } kernelAttr_.accessPolicyWindow.base_ptr = params->accessPolicyWindow.base_ptr; kernelAttr_.accessPolicyWindow.hitProp = params->accessPolicyWindow.hitProp; kernelAttr_.accessPolicyWindow.hitRatio = params->accessPolicyWindow.hitRatio;