Commit 653f9515 authored by Rostyslav Geyyer's avatar Rostyslav Geyyer
Browse files

Format

parent 4ddb62bd
...@@ -1183,8 +1183,8 @@ inline __host__ __device__ f8_t fp8_convert_sr<f8_t, float>(float x) ...@@ -1183,8 +1183,8 @@ inline __host__ __device__ f8_t fp8_convert_sr<f8_t, float>(float x)
constexpr bool negative_zero_nan = true; constexpr bool negative_zero_nan = true;
constexpr bool clip = true; constexpr bool clip = true;
constexpr f8_rounding_mode rm = f8_rounding_mode::stochastic; constexpr f8_rounding_mode rm = f8_rounding_mode::stochastic;
constexpr int seed = 42; constexpr int seed = 42;
uint32_t rng = prand_generator<float, seed>(get_thread_global_1d_id(), x); uint32_t rng = prand_generator<float, seed>(get_thread_global_1d_id(), x);
return cast_to_f8<negative_zero_nan, clip, (rm == f8_rounding_mode::stochastic)>(x, rng); return cast_to_f8<negative_zero_nan, clip, (rm == f8_rounding_mode::stochastic)>(x, rng);
} }
...@@ -1192,7 +1192,7 @@ inline __host__ __device__ f8_t fp8_convert_sr<f8_t, float>(float x) ...@@ -1192,7 +1192,7 @@ inline __host__ __device__ f8_t fp8_convert_sr<f8_t, float>(float x)
template <> template <>
inline __host__ __device__ float fp8_convert_sr<float, f8_t>(f8_t x) inline __host__ __device__ float fp8_convert_sr<float, f8_t>(f8_t x)
{ {
return type_convert<float>(x); return type_convert<float>(x);
} }
template <typename T> template <typename T>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment