P4 to Git Change 1593706 by skudchad@skudchad_test2_win_opencl on 2018/08/14 18:44:29
SWDEV-145570 - [HIP] Implement hipError* ReviewBoardURL = http://ocltc.amd.com/reviews/r/15619/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#13 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_device.cpp#14 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#11 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_error.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#5 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#13 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#41 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#17 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_peer.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#17 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_profile.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#12 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_surface.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#9 edit
Этот коммит содержится в:
@@ -252,7 +252,7 @@ extern "C" hipError_t hipConfigureCall(
|
||||
|
||||
PlatformState::instance().configureCall(gridDim, blockDim, sharedMem, stream);
|
||||
|
||||
return hipSuccess;
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
extern "C" hipError_t hipSetupArgument(
|
||||
@@ -264,7 +264,7 @@ extern "C" hipError_t hipSetupArgument(
|
||||
|
||||
PlatformState::instance().setupArgument(arg, size, offset);
|
||||
|
||||
return hipSuccess;
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
extern "C" hipError_t hipLaunchByPtr(const void *hostFunction)
|
||||
@@ -272,8 +272,9 @@ extern "C" hipError_t hipLaunchByPtr(const void *hostFunction)
|
||||
HIP_INIT_API(hostFunction);
|
||||
|
||||
hipFunction_t func = PlatformState::instance().getFunc(hostFunction);
|
||||
if (func == nullptr)
|
||||
return hipErrorUnknown;
|
||||
if (func == nullptr) {
|
||||
HIP_RETURN(hipErrorUnknown);
|
||||
}
|
||||
|
||||
ihipExec_t exec;
|
||||
PlatformState::instance().popExec(exec);
|
||||
@@ -284,10 +285,10 @@ extern "C" hipError_t hipLaunchByPtr(const void *hostFunction)
|
||||
HIP_LAUNCH_PARAM_END
|
||||
};
|
||||
|
||||
return hipModuleLaunchKernel(func,
|
||||
HIP_RETURN(hipModuleLaunchKernel(func,
|
||||
exec.gridDim_.x, exec.gridDim_.y, exec.gridDim_.z,
|
||||
exec.blockDim_.x, exec.blockDim_.y, exec.blockDim_.z,
|
||||
exec.sharedMem_, exec.hStream_, nullptr, extra);
|
||||
exec.sharedMem_, exec.hStream_, nullptr, extra));
|
||||
}
|
||||
|
||||
#if defined(ATI_OS_LINUX)
|
||||
@@ -514,7 +515,7 @@ static inline std::uint32_t f32_as_u32(float f) { union { float f; std::uint32_t
|
||||
static inline float u32_as_f32(std::uint32_t u) { union { float f; std::uint32_t u; } v; v.u = u; return v.f; }
|
||||
static inline int clamp_int(int i, int l, int h) { return std::min(std::max(i, l), h); }
|
||||
|
||||
// half � float, the f16 is in the low 16 bits of the input argument �a�
|
||||
// half float, the f16 is in the low 16 bits of the input argument
|
||||
static inline float __convert_half_to_float(std::uint32_t a) noexcept {
|
||||
std::uint32_t u = ((a << 13) + 0x70000000U) & 0x8fffe000U;
|
||||
std::uint32_t v = f32_as_u32(u32_as_f32(u) * 0x1.0p+112f) + 0x38000000U;
|
||||
@@ -522,7 +523,7 @@ static inline float __convert_half_to_float(std::uint32_t a) noexcept {
|
||||
return u32_as_f32(u) * 0x1.0p-112f;
|
||||
}
|
||||
|
||||
// float � half with nearest even rounding
|
||||
// float half with nearest even rounding
|
||||
// The lower 16 bits of the result is the bit pattern for the f16
|
||||
static inline std::uint32_t __convert_float_to_half(float a) noexcept {
|
||||
std::uint32_t u = f32_as_u32(a);
|
||||
|
||||
Ссылка в новой задаче
Block a user