Fix improper Min/Max operands.

Operands were relying on implicit type conversion which may result
in range errors.

Change-Id: I4b35ef92dcaf8b547aed02fea36aed75d392c6af
This commit is contained in:
Sean Keely
2020-06-08 22:22:04 -05:00
parent 8485a48756
commit 99e2942949
3 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -808,7 +808,7 @@ hsa_status_t Runtime::PtrInfo(void* ptr, hsa_amd_pointer_info_t* info, void* (*a
}
} // end lock scope
retInfo.size = Min(info->size, sizeof(hsa_amd_pointer_info_t));
retInfo.size = Min(size_t(info->size), sizeof(hsa_amd_pointer_info_t));
// IPC and Graphics memory may come from a node that does not have an agent in this process.
// Ex. ROCR_VISIBLE_DEVICES or peer GPU is not supported by ROCm.