Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Revert "SWDEV-362611 - Added hmax and hmin"
Browse files Browse the repository at this point in the history
This reverts commit 84bd5f3.

Reason for revert: This patch breaks release build #34 in rocprim.

Change-Id: Iadba082e987c2e7564cd8f5a3aba49d4eb3ea250
  • Loading branch information
zhang2amd committed Nov 4, 2022
1 parent 84bd5f3 commit dbcca1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 deletions.
32 changes: 0 additions & 32 deletions include/hip/amd_detail/amd_hip_fp16.h
Original file line number Diff line number Diff line change
Expand Up @@ -1250,38 +1250,6 @@ THE SOFTWARE.
inline
__HOST_DEVICE__
bool __hbgtu2(__half2 x, __half2 y) { return __hbgt2(x, y); }
inline
__device__
__half __hmax(const __half x, const __half y) {
return __half_raw{__ocml_fmax_f16(static_cast<__half_raw>(x).data,
static_cast<__half_raw>(y).data)};
}
inline
__device__
__half __hmax_nan(const __half x, const __half y) {
if(__ocml_isnan_f16(x)) {
return x;
} else if (__ocml_isnan_f16(y)) {
return y;
}
return __hmax(x, y);
}
inline
__device__
__half __hmin(const __half x, const __half y) {
return __half_raw{__ocml_fmin_f16(static_cast<__half_raw>(x).data,
static_cast<__half_raw>(y).data)};
}
inline
__device__
__half __hmin_nan(const __half x, const __half y) {
if(__ocml_isnan_f16(x)) {
return x;
} else if (__ocml_isnan_f16(y)) {
return y;
}
return __hmin(x, y);
}

// Arithmetic
inline
Expand Down
8 changes: 1 addition & 7 deletions include/hip/amd_detail/hip_fp16_math_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ THE SOFTWARE.
// /*
// Half Math Functions
// */

#include "host_defines.h"
#if !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
extern "C"
Expand All @@ -50,8 +51,6 @@ extern "C"
__device__ _Float16 __ocml_sin_f16(_Float16);
__device__ __attribute__((const)) _Float16 __ocml_sqrt_f16(_Float16);
__device__ __attribute__((const)) _Float16 __ocml_trunc_f16(_Float16);
__device__ __attribute__((const)) _Float16 __ocml_fmax_f16(_Float16, _Float16);
__device__ __attribute__((const)) _Float16 __ocml_fmin_f16(_Float16, _Float16);

typedef _Float16 __2f16 __attribute__((ext_vector_type(2)));
typedef short __2i16 __attribute__((ext_vector_type(2)));
Expand Down Expand Up @@ -85,8 +84,3 @@ extern "C"
__device__ __attribute__((const)) __2f16 __ocml_trunc_2f16(__2f16);
}
#endif // !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
//TODO: remove these after they get into clang header __clang_hip_libdevice_declares.h'
extern "C" {
__device__ __attribute__((const)) _Float16 __ocml_fmax_f16(_Float16, _Float16);
__device__ __attribute__((const)) _Float16 __ocml_fmin_f16(_Float16, _Float16);
}

0 comments on commit dbcca1d

Please sign in to comment.