SWDEV-401231 - getMemoryObject returns nullptr for host system memory as arena is disabled for XNACK.
Change-Id: I84348e0ba2debf69f65c0e85179dad7827d30806
[ROCm/clr commit: b07a44c253]
This commit is contained in:
committed by
Jaydeepkumar Patel
parent
849bfd9196
commit
0a6fe33ab7
@@ -147,11 +147,7 @@ hipError_t hipMemAdvise(const void* dev_ptr, size_t count, hipMemoryAdvise advic
|
|||||||
|
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
amd::Memory* memObj = getMemoryObject(dev_ptr, offset);
|
amd::Memory* memObj = getMemoryObject(dev_ptr, offset);
|
||||||
if (memObj == nullptr) {
|
if (memObj && count > (memObj->getSize() - offset)) {
|
||||||
HIP_RETURN(hipErrorMemoryAllocation);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count > (memObj->getSize() - offset)) {
|
|
||||||
HIP_RETURN(hipErrorInvalidValue);
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user