mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 06:49:15 +00:00
Extend available elementwise operations with conv examples (#995)
* Extend available elementwise operations with conv examples * Fixes * Remove not needed convert * Update CMakeFile and dir name
This commit is contained in:
@@ -150,28 +150,6 @@ __host__ __device__ constexpr T clamp(const T& x, const T& lowerbound, const T&
|
||||
return min(max(x, lowerbound), upperbound);
|
||||
}
|
||||
|
||||
// disallow implicit type casting
|
||||
template <typename T>
|
||||
__device__ T exp(T x);
|
||||
|
||||
// TODO: add f16 support using v_exp_f16
|
||||
|
||||
template <>
|
||||
__device__ float exp<float>(float x)
|
||||
{
|
||||
return __expf(x);
|
||||
}
|
||||
|
||||
template <>
|
||||
__device__ double exp<double>(double x)
|
||||
{
|
||||
return exp(x);
|
||||
}
|
||||
|
||||
static inline __host__ float exp(float x) { return std::expf(x); }
|
||||
|
||||
static inline __host__ double exp(double x) { return std::exp(x); }
|
||||
|
||||
// greatest common divisor, aka highest common factor
|
||||
__host__ __device__ constexpr index_t gcd(index_t x, index_t y)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user