"git@developer.sourcefind.cn:wqshmzh/ktransformers.git" did not exist on "c6c83a62ef80e88ad089f4f0afef9c71b3f82215"
Commit 1670bba9 authored by chenjun's avatar chenjun
Browse files

clang-format-12

parent 09852d3b
...@@ -307,15 +307,15 @@ float launch_and_time_kernel_with_preprocess(const StreamConfig& stream_config, ...@@ -307,15 +307,15 @@ float launch_and_time_kernel_with_preprocess(const StreamConfig& stream_config,
hip_check_error(hipGetLastError()); hip_check_error(hipGetLastError());
// end real kernel // end real kernel
// hip_check_error(hipEventRecord(stop, stream_config.stream_id_)); // hip_check_error(hipEventRecord(stop, stream_config.stream_id_));
// hip_check_error(hipEventSynchronize(stop)); // hip_check_error(hipEventSynchronize(stop));
// float cur_time = 0; // float cur_time = 0;
// hip_check_error(hipEventElapsedTime(&cur_time, start, stop)); // hip_check_error(hipEventElapsedTime(&cur_time, start, stop));
// #if MEDIAN // #if MEDIAN
// times.insert(cur_time); // times.insert(cur_time);
// #else // #else
// total_time += cur_time; // total_time += cur_time;
// #endif // #endif
if(ck::EnvIsEnabled(CK_ENV(CK_LOGGING))) if(ck::EnvIsEnabled(CK_ENV(CK_LOGGING)))
{ {
...@@ -351,7 +351,7 @@ float launch_and_time_kernel_with_preprocess(const StreamConfig& stream_config, ...@@ -351,7 +351,7 @@ float launch_and_time_kernel_with_preprocess(const StreamConfig& stream_config,
} }
#else #else
// return total_time / nrepeat; // return total_time / nrepeat;
return (total_time - 0.01*nrepeat) / nrepeat; return (total_time - 0.01 * nrepeat) / nrepeat;
#endif #endif
} }
else else
......
...@@ -277,7 +277,8 @@ struct MultiplyMultiply ...@@ -277,7 +277,8 @@ struct MultiplyMultiply
__host__ __device__ constexpr void operator()<ck::half_t, int, ck::half_t, ck::half_t>( __host__ __device__ constexpr void operator()<ck::half_t, int, ck::half_t, ck::half_t>(
ck::half_t& e, const int& c, const ck::half_t& d0, const ck::half_t& d1) const ck::half_t& e, const int& c, const ck::half_t& d0, const ck::half_t& d1) const
{ {
const float x0_f = ck::type_convert<float>(c) * ck::type_convert<float>(d0) * ck::type_convert<float>(d1); const float x0_f =
ck::type_convert<float>(c) * ck::type_convert<float>(d0) * ck::type_convert<float>(d1);
e = ck::type_convert<ck::half_t>(x0_f); e = ck::type_convert<ck::half_t>(x0_f);
} }
...@@ -286,7 +287,8 @@ struct MultiplyMultiply ...@@ -286,7 +287,8 @@ struct MultiplyMultiply
__host__ __device__ constexpr void operator()<ck::bhalf_t, int, float, float>( __host__ __device__ constexpr void operator()<ck::bhalf_t, int, float, float>(
ck::bhalf_t& e, const int& c, const float& d0, const float& d1) const ck::bhalf_t& e, const int& c, const float& d0, const float& d1) const
{ {
const float x0_f = ck::type_convert<float>(c) * ck::type_convert<float>(d0) * ck::type_convert<float>(d1); const float x0_f =
ck::type_convert<float>(c) * ck::type_convert<float>(d0) * ck::type_convert<float>(d1);
e = ck::type_convert<ck::bhalf_t>(x0_f); e = ck::type_convert<ck::bhalf_t>(x0_f);
} }
......
...@@ -274,8 +274,9 @@ bool profile_gemm_multiply_multiply_impl(int do_verification, ...@@ -274,8 +274,9 @@ bool profile_gemm_multiply_multiply_impl(int do_verification,
#if defined CK_ENABLE_FP8 || defined CK_ENABLE_INT8 #if defined CK_ENABLE_FP8 || defined CK_ENABLE_INT8
// set softer tolerances for fp8 // set softer tolerances for fp8
if constexpr((is_same_v<ADataType, f8_t> || is_same_v<BDataType, f8_t> || if constexpr((is_same_v<ADataType, f8_t> || is_same_v<BDataType, f8_t> ||
is_same_v<EDataType, f8_t>) || (is_same_v<ADataType, int8_t> || is_same_v<EDataType, f8_t>) ||
is_same_v<BDataType, int8_t> || is_same_v<EDataType, int8_t>)) (is_same_v<ADataType, int8_t> || is_same_v<BDataType, int8_t> ||
is_same_v<EDataType, int8_t>))
{ {
std::string msg = "Error: Incorrect results!"; std::string msg = "Error: Incorrect results!";
double rtol = 1e-1; double rtol = 1e-1;
......
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