mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-03 13:11:25 +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
This commit is contained in:
@@ -56,8 +56,8 @@ class SimpleAppArgs
|
||||
int option_index = 0;
|
||||
|
||||
public:
|
||||
std::vector<size_t> inLengths = {8, 128, 2048};
|
||||
std::vector<AccDataType> scales = {2.0f, 2.0f};
|
||||
std::vector<size_t> inLengths = {8, 128, 2048};
|
||||
std::vector<double> scales = {2.0, 2.0};
|
||||
|
||||
bool do_verification = true;
|
||||
int init_method = 2;
|
||||
@@ -151,8 +151,8 @@ int main(int argc, char* argv[])
|
||||
auto inStrides = in.mDesc.GetStrides();
|
||||
auto outStrides = out.mDesc.GetStrides();
|
||||
|
||||
AccDataType alpha = args.scales[0];
|
||||
AccDataType beta = args.scales[1];
|
||||
double alpha = args.scales[0];
|
||||
double beta = args.scales[1];
|
||||
|
||||
std::cout << "in: " << in.mDesc << std::endl;
|
||||
std::cout << "out: " << out.mDesc << std::endl;
|
||||
@@ -221,8 +221,8 @@ int main(int argc, char* argv[])
|
||||
auto argument_ptr = device_instance.MakeArgumentPointer(i_inLengths,
|
||||
i_inStrides,
|
||||
reduceDims,
|
||||
&alpha,
|
||||
&beta,
|
||||
alpha,
|
||||
beta,
|
||||
in_dev.GetDeviceBuffer(),
|
||||
out_dev.GetDeviceBuffer(),
|
||||
PassThrough{},
|
||||
|
||||
Reference in New Issue
Block a user