mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-19 22:39:03 +00:00
upgrade from clang-format-12 to clang-format-18 (#2568)
* upgrade to clang-format-18 * update to clang-format-18 in pre-commit-config
This commit is contained in:
@@ -260,9 +260,9 @@ bool profile_conv_bwd_data_impl(int do_verification,
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops
|
||||
<< "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -233,9 +233,9 @@ bool profile_conv_fwd_impl(int do_verification,
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops
|
||||
<< "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -288,9 +288,8 @@ bool profile_conv_tensor_rearrange_impl(int do_verification,
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
|
||||
return is_supporting_instance && pass;
|
||||
}
|
||||
|
||||
@@ -287,10 +287,9 @@ bool profile_grouped_conv_bwd_data_impl(int do_verification,
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << ", SplitK "
|
||||
<< best_split_k << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops
|
||||
<< "\nGB/s: " << best_gb_per_sec << ", SplitK " << best_split_k << std::endl;
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -92,12 +92,12 @@ bool profile_grouped_conv_bwd_weight_impl(int do_verification,
|
||||
if(do_verification)
|
||||
{
|
||||
auto ref_conv = ck::tensor_operation::host::ReferenceConvBwdWeight<NDimSpatial,
|
||||
InDataType,
|
||||
WeiDataType,
|
||||
OutDataType,
|
||||
InElementOp,
|
||||
WeiElementOp,
|
||||
OutElementOp>{};
|
||||
InDataType,
|
||||
WeiDataType,
|
||||
OutDataType,
|
||||
InElementOp,
|
||||
WeiElementOp,
|
||||
OutElementOp>{};
|
||||
auto ref_invoker = ref_conv.MakeInvoker();
|
||||
auto ref_argument = ref_conv.MakeArgument(input,
|
||||
weight_host_result,
|
||||
@@ -302,10 +302,9 @@ bool profile_grouped_conv_bwd_weight_impl(int do_verification,
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << ", SplitK "
|
||||
<< best_split_k << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops
|
||||
<< "\nGB/s: " << best_gb_per_sec << ", SplitK " << best_split_k << std::endl;
|
||||
|
||||
return all_pass;
|
||||
}
|
||||
|
||||
@@ -178,8 +178,8 @@ bool profile_grouped_conv_fwd_bias_clamp_impl(int do_verification,
|
||||
in_element_op,
|
||||
wei_element_op,
|
||||
out_element_op,
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
d_tensors);
|
||||
|
||||
// init host output to zero
|
||||
@@ -312,9 +312,9 @@ bool profile_grouped_conv_fwd_bias_clamp_impl(int do_verification,
|
||||
run_impl(op_ptr, argument_ptr);
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops
|
||||
<< "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -250,9 +250,9 @@ bool profile_grouped_conv_fwd_impl(int do_verification,
|
||||
run_impl(op_ptr, argument_ptr);
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops
|
||||
<< "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -342,9 +342,9 @@ bool profile_grouped_conv_fwd_outelementop_impl(int do_verification,
|
||||
run_impl(op_ptr, argument_ptr);
|
||||
}
|
||||
|
||||
std::cout << "Best configuration parameters:"
|
||||
<< "\nname: " << best_op_name << "\navg_time: " << best_avg_time
|
||||
<< "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
std::cout << "Best configuration parameters:" << "\nname: " << best_op_name
|
||||
<< "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops
|
||||
<< "\nGB/s: " << best_gb_per_sec << std::endl;
|
||||
return pass;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,12 +103,12 @@ bool profile_softmax_impl(int do_verification,
|
||||
// add device softmax instances
|
||||
using PassThrough = ck::tensor_operation::element_wise::PassThrough;
|
||||
using DeviceOp = tensor_operation::device::DeviceSoftmax<InDataType,
|
||||
AccDataType,
|
||||
OutDataType,
|
||||
PassThrough,
|
||||
PassThrough,
|
||||
Rank,
|
||||
NumReduceDim>;
|
||||
AccDataType,
|
||||
OutDataType,
|
||||
PassThrough,
|
||||
PassThrough,
|
||||
Rank,
|
||||
NumReduceDim>;
|
||||
|
||||
// get device op instances
|
||||
const auto instances = tensor_operation::device::instance::DeviceOperationInstanceFactory<
|
||||
@@ -141,8 +141,7 @@ bool profile_softmax_impl(int do_verification,
|
||||
{
|
||||
std::cout << inst_ptr->GetTypeString() << " skipped due to unsupported argument: ";
|
||||
LogRange(std::cout << "input lengths = [", in_length, ", ")
|
||||
<< "], "
|
||||
<< "scaler = [" << alpha << ", " << beta << "]";
|
||||
<< "], " << "scaler = [" << alpha << ", " << beta << "]";
|
||||
LogRange(std::cout << ", reduce dims = [", reduce_dims, ", ") << "]." << std::endl;
|
||||
instance_pass.push_back(true);
|
||||
continue;
|
||||
@@ -202,8 +201,7 @@ bool profile_softmax_impl(int do_verification,
|
||||
{
|
||||
std::cout << inst_ptr->GetTypeString() << " failed verification: ";
|
||||
LogRange(std::cout << "input lengths = [", in_length, ", ")
|
||||
<< "], "
|
||||
<< "scaler = [" << alpha << ", " << beta << "]." << std::endl;
|
||||
<< "], " << "scaler = [" << alpha << ", " << beta << "]." << std::endl;
|
||||
}
|
||||
instance_pass.push_back(pass);
|
||||
}
|
||||
@@ -215,9 +213,8 @@ bool profile_softmax_impl(int do_verification,
|
||||
LogRange(std::cout << "length = ", in_tensor_lengths, ",") << ", ";
|
||||
LogRange(std::cout << "stride = ", in_tensor_strides, ",") << ", ";
|
||||
LogRange(std::cout << "reduce dims ", reduce_dims, ",") << ", ";
|
||||
std::cout << "alpha = " << alpha << ", "
|
||||
<< "beta = " << beta << ", " << best_avg_time << " ms, " << best_gb_per_sec
|
||||
<< " GB/s, " << best_instance_name << std::endl;
|
||||
std::cout << "alpha = " << alpha << ", " << "beta = " << beta << ", " << best_avg_time
|
||||
<< " ms, " << best_gb_per_sec << " GB/s, " << best_instance_name << std::endl;
|
||||
}
|
||||
return std::all_of(
|
||||
std::begin(instance_pass), std::end(instance_pass), [](bool p) { return p; });
|
||||
|
||||
Reference in New Issue
Block a user