Provide ldexp float overload for HIP, it's missing in their headers.
PiperOrigin-RevId: 318607361 Change-Id: Id4d3058d3960484e9f2136de7dc72b055c1a3fad
This commit is contained in:
parent
b928c4c5ec
commit
655ce09f67
@ -30,6 +30,12 @@ limitations under the License.
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
|
||||
#ifdef __HIP_DEVICE_COMPILE__
|
||||
// Provide ldexp float overload for HIP, it's missing in their headers.
|
||||
__device__ inline float ldexp(float x, int exp) { return ldexpf(x, exp); }
|
||||
#endif
|
||||
|
||||
namespace tensorflow {
|
||||
namespace functor {
|
||||
|
||||
|
@ -25,6 +25,11 @@ limitations under the License.
|
||||
#include "tensorflow/core/kernels/eigen_contraction_kernel.h"
|
||||
#endif
|
||||
|
||||
#ifdef __HIP_DEVICE_COMPILE__
|
||||
// Provide ldexp float overload for HIP, it's missing in their headers.
|
||||
__device__ inline float ldexp(float x, int exp) { return ldexpf(x, exp); }
|
||||
#endif
|
||||
|
||||
namespace tensorflow {
|
||||
class OpKernelContext;
|
||||
namespace functor {
|
||||
|
Loading…
Reference in New Issue
Block a user