SWDEV-387383 - Changed error message in hipDevice[Get/Set]GraphMemAttribute to match cuda

Change-Id: I34a9f3d8572e004ae3d25ef25a4d404bea6d9597
Этот коммит содержится в:
Ioannis Assiouras
2023-03-08 16:46:04 +00:00
коммит произвёл Rahul Garg
родитель 1d6c40b569
Коммит 9e1e3035ec
+8 -2
Просмотреть файл
@@ -2224,9 +2224,12 @@ hipError_t hipGraphMemFreeNodeGetParams(hipGraphNode_t node, void* dev_ptr) {
// ================================================================================================
hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value) {
HIP_INIT_API(hipDeviceGetGraphMemAttribute, device, attr, value);
if ((static_cast<size_t>(device) >= g_devices.size()) || device < 0 || value == nullptr) {
if ((static_cast<size_t>(device) >= g_devices.size()) || device < 0) {
HIP_RETURN(hipErrorInvalidDevice);
}
if (value == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
hipError_t result = hipErrorInvalidValue;
switch (attr) {
case hipGraphMemAttrUsedMemCurrent:
@@ -2254,9 +2257,12 @@ hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType at
// ================================================================================================
hipError_t hipDeviceSetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value) {
HIP_INIT_API(hipDeviceSetGraphMemAttribute, device, attr, value);
if ((static_cast<size_t>(device) >= g_devices.size()) || device < 0 || value == nullptr) {
if ((static_cast<size_t>(device) >= g_devices.size()) || device < 0) {
HIP_RETURN(hipErrorInvalidDevice);
}
if (value == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
hipError_t result = hipErrorInvalidValue;
switch (attr) {
case hipGraphMemAttrUsedMemHigh: