diff --git a/rocclr/hip_memory.cpp b/rocclr/hip_memory.cpp index b7b8d77592..be3c6168de 100755 --- a/rocclr/hip_memory.cpp +++ b/rocclr/hip_memory.cpp @@ -761,7 +761,7 @@ hipError_t hipMemcpyToSymbol(const void* symbol, const void* src, size_t sizeByt if ((offset + sizeBytes) > sym_size) { DevLogPrintfError("Trying to access out of bounds, offset: %u sizeBytes: %u sym_size: %u \n", offset, sizeBytes, sym_size); - return HIP_RETURN(hipErrorInvalidDevicePointer); + HIP_RETURN(hipErrorInvalidDevicePointer); } device_ptr = reinterpret_cast
(device_ptr) + offset; @@ -794,7 +794,7 @@ hipError_t hipMemcpyFromSymbol(void* dst, const void* symbol, size_t sizeBytes, if ((offset + sizeBytes) > sym_size) { DevLogPrintfError("Trying to access out of bounds, offset: %u sizeBytes: %u sym_size: %u \n", offset, sizeBytes, sym_size); - return HIP_RETURN(hipErrorInvalidDevicePointer); + HIP_RETURN(hipErrorInvalidDevicePointer); } device_ptr = reinterpret_cast
(device_ptr) + offset; @@ -827,7 +827,7 @@ hipError_t hipMemcpyToSymbolAsync(const void* symbol, const void* src, size_t si if ((offset + sizeBytes) > sym_size) { DevLogPrintfError("Trying to access out of bounds, offset: %u sizeBytes: %u sym_size: %u \n", offset, sizeBytes, sym_size); - return HIP_RETURN(hipErrorInvalidDevicePointer); + HIP_RETURN(hipErrorInvalidDevicePointer); } device_ptr = reinterpret_cast
(device_ptr) + offset; @@ -860,7 +860,7 @@ hipError_t hipMemcpyFromSymbolAsync(void* dst, const void* symbol, size_t sizeBy if ((offset + sizeBytes) > sym_size) { DevLogPrintfError("Trying to access out of bounds, offset: %u sizeBytes: %u sym_size: %u \n", offset, sizeBytes, sym_size); - return HIP_RETURN(hipErrorInvalidDevicePointer); + HIP_RETURN(hipErrorInvalidDevicePointer); } device_ptr = reinterpret_cast
(device_ptr) + offset; diff --git a/rocclr/hip_platform.cpp b/rocclr/hip_platform.cpp index c463cbd4a4..d23197bd9e 100755 --- a/rocclr/hip_platform.cpp +++ b/rocclr/hip_platform.cpp @@ -951,11 +951,11 @@ hipError_t hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, { HIP_INIT_API(hipOccupancyMaxPotentialBlockSize, f, dynSharedMemPerBlk, blockSizeLimit); if ((gridSize == nullptr) || (blockSize == nullptr)) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } hipFunction_t func = PlatformState::instance().getFunc(f, ihipGetDevice()); if (func == nullptr) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } const amd::Device& device = *hip::getCurrentDevice()->devices()[0]; int max_blocks_per_grid = 0; @@ -976,7 +976,7 @@ hipError_t hipModuleOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize { HIP_INIT_API(hipModuleOccupancyMaxPotentialBlockSize, f, dynSharedMemPerBlk, blockSizeLimit); if ((gridSize == nullptr) || (blockSize == nullptr)) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } const amd::Device& device = *hip::getCurrentDevice()->devices()[0]; int max_blocks_per_grid = 0; @@ -997,7 +997,7 @@ hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize, int* { HIP_INIT_API(hipModuleOccupancyMaxPotentialBlockSizeWithFlags, f, dynSharedMemPerBlk, blockSizeLimit, flags); if ((gridSize == nullptr) || (blockSize == nullptr)) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } const amd::Device& device = *hip::getCurrentDevice()->devices()[0]; int max_blocks_per_grid = 0; @@ -1017,7 +1017,7 @@ hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, { HIP_INIT_API(hipModuleOccupancyMaxActiveBlocksPerMultiprocessor, f, blockSize, dynSharedMemPerBlk); if (numBlocks == nullptr) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } const amd::Device& device = *hip::getCurrentDevice()->devices()[0]; @@ -1036,7 +1036,7 @@ hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numB { HIP_INIT_API(hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, f, blockSize, dynSharedMemPerBlk, flags); if (numBlocks == nullptr) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } const amd::Device& device = *hip::getCurrentDevice()->devices()[0]; @@ -1054,12 +1054,12 @@ hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, { HIP_INIT_API(hipOccupancyMaxActiveBlocksPerMultiprocessor, f, blockSize, dynamicSMemSize); if (numBlocks == nullptr) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } hipFunction_t func = PlatformState::instance().getFunc(f, ihipGetDevice()); if (func == nullptr) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } const amd::Device& device = *hip::getCurrentDevice()->devices()[0]; @@ -1079,12 +1079,12 @@ hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, { HIP_INIT_API(hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, f, blockSize, dynamicSMemSize, flags); if (numBlocks == nullptr) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } hipFunction_t func = PlatformState::instance().getFunc(f, ihipGetDevice()); if (func == nullptr) { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } const amd::Device& device = *hip::getCurrentDevice()->devices()[0]; diff --git a/rocclr/hip_stream.cpp b/rocclr/hip_stream.cpp old mode 100644 new mode 100755 index 0f9b782066..bfe80cd6bb --- a/rocclr/hip_stream.cpp +++ b/rocclr/hip_stream.cpp @@ -208,7 +208,7 @@ hipError_t hipStreamCreateWithPriority(hipStream_t* stream, unsigned int flags, priority = static_cast(amd::CommandQueue::Priority::Normal); } - return HIP_RETURN(ihipStreamCreate(stream, flags, static_cast(priority))); + HIP_RETURN(ihipStreamCreate(stream, flags, static_cast(priority))); } // ================================================================================================ @@ -222,7 +222,7 @@ hipError_t hipDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPrio // Only report one kind of priority for now. *greatestPriority = static_cast(amd::CommandQueue::Priority::Normal); } - return HIP_RETURN(hipSuccess); + HIP_RETURN(hipSuccess); } // ================================================================================================ diff --git a/rocclr/hip_texture.cpp b/rocclr/hip_texture.cpp index a9121f183b..9d16e3da01 100755 --- a/rocclr/hip_texture.cpp +++ b/rocclr/hip_texture.cpp @@ -772,7 +772,7 @@ hipError_t hipTexRefGetArray(hipArray_t* pArray, // TODO use ihipGetTextureObjectResourceDesc() to not pollute the API trace. hipError_t error = hipGetTextureObjectResourceDesc(&resDesc, texRef->textureObject); if (error != hipSuccess) { - return HIP_RETURN(error); + HIP_RETURN(error); } switch (resDesc.resType) { @@ -848,7 +848,7 @@ hipError_t hipTexRefGetAddress(hipDeviceptr_t* dptr, if (error != hipSuccess) { DevLogPrintfError("hipGetTextureObjectResourceDesc failed with error code: %s \n", hipGetErrorName(error)); - return HIP_RETURN(error); + HIP_RETURN(error); } switch (resDesc.resType) { @@ -903,7 +903,7 @@ hipError_t hipTexRefSetAddress(size_t* ByteOffset, // Align the user ptr to HW requirments. resDesc.res.linear.devPtr = static_cast(dptr) - *ByteOffset; } else { - return HIP_RETURN(hipErrorInvalidValue); + HIP_RETURN(hipErrorInvalidValue); } hipTextureDesc texDesc = hip::getTextureDesc(texRef); @@ -1108,7 +1108,7 @@ hipError_t hipTexRefGetMipmappedArray(hipMipmappedArray_t* pArray, // TODO use ihipGetTextureObjectResourceDesc() to not pollute the API trace. hipError_t error = hipGetTextureObjectResourceDesc(&resDesc, texRef->textureObject); if (error != hipSuccess) { - return HIP_RETURN(error); + HIP_RETURN(error); } switch (resDesc.resType) {