SWDEV-387383 - Changed error message in hipDevice[Get/Set]GraphMemAttribute to match cuda
Change-Id: I34a9f3d8572e004ae3d25ef25a4d404bea6d9597
[ROCm/clr commit: 9e1e3035ec]
This commit is contained in:
committato da
Rahul Garg
parent
55c387ca23
commit
41174e6244
@@ -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:
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user