P4 to Git Change 2051060 by michliao@hliao-dev-00-hip.rocm-workspace on 2019/12/30 16:42:07
SWDEV-145570 - Clean up after `hipError_t` unification. - Replace deprecated `hipError_t` enums. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#24 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_error.cpp#4 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#19 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#94 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#52 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#27 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#32 edit ... //depot/stg/opencl/drivers/opencl/api/hip/trace_helper.h#5 edit
Этот коммит содержится в:
@@ -70,11 +70,11 @@ hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
|
||||
hip::host_context : hip::getCurrentContext();
|
||||
|
||||
if (amdContext == nullptr) {
|
||||
return hipErrorMemoryAllocation;
|
||||
return hipErrorOutOfMemory;
|
||||
}
|
||||
|
||||
if (amdContext->devices()[0]->info().maxMemAllocSize_ < sizeBytes) {
|
||||
return hipErrorMemoryAllocation;
|
||||
return hipErrorOutOfMemory;
|
||||
}
|
||||
|
||||
*ptr = amd::SvmBuffer::malloc(*amdContext, flags, sizeBytes, amdContext->devices()[0]->info().memBaseAddrAlign_);
|
||||
@@ -347,7 +347,7 @@ hipError_t ihipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t heigh
|
||||
device->info().memBaseAddrAlign_);
|
||||
|
||||
if (*ptr == nullptr) {
|
||||
return hipErrorMemoryAllocation;
|
||||
return hipErrorOutOfMemory;
|
||||
}
|
||||
|
||||
return hipSuccess;
|
||||
@@ -552,7 +552,7 @@ hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags)
|
||||
constexpr bool forceAlloc = true;
|
||||
if (!mem->create(hostPtr, sysMemAlloc, skipAlloc, forceAlloc)) {
|
||||
mem->release();
|
||||
HIP_RETURN(hipErrorMemoryAllocation);
|
||||
HIP_RETURN(hipErrorOutOfMemory);
|
||||
}
|
||||
|
||||
for (const auto& device: hip::getCurrentContext()->devices()) {
|
||||
|
||||
Ссылка в новой задаче
Block a user