SWDEV-446219 - Validate option value.
Change-Id: Ifccdddfc8ac71585f6ba045578e5bbb7e3cd1649
[ROCm/clr commit: 66f6a3e255]
Este commit está contenido en:
cometido por
Jaydeepkumar Patel
padre
41ec66ff67
commit
79a57a6fc1
@@ -168,7 +168,9 @@ hipError_t hipMemGetAllocationGranularity(size_t* granularity, const hipMemAlloc
|
||||
HIP_INIT_API(hipMemGetAllocationGranularity, granularity, prop, option);
|
||||
|
||||
if (granularity == nullptr || prop == nullptr || prop->type != hipMemAllocationTypePinned ||
|
||||
prop->location.type != hipMemLocationTypeDevice || prop->location.id >= g_devices.size()) {
|
||||
prop->location.type != hipMemLocationTypeDevice || prop->location.id >= g_devices.size() ||
|
||||
(option != hipMemAllocationGranularityMinimum &&
|
||||
option != hipMemAllocationGranularityRecommended)) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
|
||||
|
||||
Referencia en una nueva incidencia
Block a user