mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-19 04:19:36 +00:00
Use double for all scaling values and float-point constant values at the Device Op API (#557)
* Use double as alpha/beta values type in reduce device op api
* Use double as alpha/beta values type in softmax device op api
* Use double as alpha/beta values type in multiple-reduce device op api
* Use double as epsilon value type in normalization/elementwise-normalization device op api
[ROCm/composable_kernel commit: 52abc2f371]
This commit is contained in:
@@ -217,8 +217,8 @@ int mean_meansquare_dual_reduce_test(size_t n,
|
||||
size_t invariant_total_length = n;
|
||||
size_t reduce_total_length = h * w * c;
|
||||
|
||||
const AccDataType alpha = ck::type_convert<AccDataType>(1.0f);
|
||||
const AccDataType beta = ck::type_convert<AccDataType>(0.0f);
|
||||
const double alpha = 1.0f;
|
||||
const double beta = 0.0f;
|
||||
|
||||
std::size_t num_thread = 1;
|
||||
|
||||
@@ -267,8 +267,8 @@ int mean_meansquare_dual_reduce_test(size_t n,
|
||||
i_outLengths,
|
||||
{i_outStrides, i_outStrides},
|
||||
reduceDims,
|
||||
{&alpha, &alpha},
|
||||
{&beta, &beta},
|
||||
{alpha, alpha},
|
||||
{beta, beta},
|
||||
in_dev.GetDeviceBuffer(),
|
||||
{mean_dev.GetDeviceBuffer(), meansquare_dev.GetDeviceBuffer()},
|
||||
ck::make_tuple(InElementwiseOperation_Mean{}, InElementwiseOperation_Meansquare{}),
|
||||
|
||||
Reference in New Issue
Block a user