SWDEV-455869 - Revert "SWDEV-410751 - Consider null amd::memory is invalid."

This reverts commit a9ff2c5a43.

Change-Id: I26c4b3c74b2861afc17f979492d025b59d4388ab
このコミットが含まれているのは:
Anusha GodavarthySurya authored and Anusha Godavarthy Surya committed 2024-04-19 00:54:26 -04:00
1 親 56ebf5157a
コミット e829ef68e4
1ファイル変更
+1 -1
+1 -1
ファイルの表示
@@ -89,7 +89,7 @@ hipError_t hipMemPrefetchAsync(const void* dev_ptr, size_t count, int device,
size_t offset = 0;
amd::Memory* memObj = getMemoryObject(dev_ptr, offset);
if (memObj == nullptr || (memObj && count > (memObj->getSize() - offset))) {
if ((memObj != nullptr) && (count > (memObj->getSize() - offset))) {
HIP_RETURN(hipErrorInvalidValue);
}
if (device != hipCpuDeviceId && (static_cast<size_t>(device) >= g_devices.size())) {