SWDEV-384184 - hipGraphKernelNodeSetAttribute negative scenarios
Hardcoding check for accessPolicyMaxWindowSize since its returned from Hardware thats not available yet Change-Id: I3a09fc9ace3027c7d5533bbbc7da5e18f43591ec
Esse commit está contido em:
@@ -986,17 +986,27 @@ class hipGraphKernelNode : public hipGraphNode {
|
||||
}
|
||||
|
||||
hipError_t SetAttrParams(hipKernelNodeAttrID attr, const hipKernelNodeAttrValue* params) {
|
||||
constexpr int accessPolicyMaxWindowSize = 1024;
|
||||
// updates kernel attr params
|
||||
if (attr == hipKernelNodeAttributeAccessPolicyWindow) {
|
||||
if (params->accessPolicyWindow.hitRatio > 1) {
|
||||
if (params->accessPolicyWindow.hitRatio > 1 ||
|
||||
params->accessPolicyWindow.hitRatio < 0) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
if (params->accessPolicyWindow.missProp == hipAccessPropertyPersisting) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
if (params->accessPolicyWindow.num_bytes > 0 && params->accessPolicyWindow.hitRatio == 0) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
// need to check against accessPolicyMaxWindowSize from device
|
||||
// accessPolicyMaxWindowSize not implemented on the device side yet
|
||||
if (params->accessPolicyWindow.num_bytes >= accessPolicyMaxWindowSize) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
kernelAttr_.accessPolicyWindow.base_ptr = params->accessPolicyWindow.base_ptr;
|
||||
kernelAttr_.accessPolicyWindow.hitProp = params->accessPolicyWindow.hitProp;
|
||||
kernelAttr_.accessPolicyWindow.hitRatio = params->accessPolicyWindow.hitRatio;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário