Let hipHostMalloc always share/map pinned host ptr
This commit is contained in:
@@ -357,7 +357,7 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags) {
|
|||||||
|
|
||||||
*ptr = hip_internal::allocAndSharePtr(
|
*ptr = hip_internal::allocAndSharePtr(
|
||||||
(amFlags & amHostCoherent) ? "finegrained_host" : "pinned_host", sizeBytes, ctx,
|
(amFlags & amHostCoherent) ? "finegrained_host" : "pinned_host", sizeBytes, ctx,
|
||||||
(trueFlags & hipHostMallocPortable) /*shareWithAll*/, amFlags, flags, 0);
|
true /*shareWithAll*/, amFlags, flags, 0);
|
||||||
|
|
||||||
if (sizeBytes && (*ptr == NULL)) {
|
if (sizeBytes && (*ptr == NULL)) {
|
||||||
hip_status = hipErrorMemoryAllocation;
|
hip_status = hipErrorMemoryAllocation;
|
||||||
|
|||||||
Reference in New Issue
Block a user