Commit 8a1ccdd4 authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Use more strict input

parent 58945ac2
......@@ -6,6 +6,8 @@
#include <cstddef>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <numeric>
#include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/element/binary_element_wise_operation.hpp"
......
......@@ -30,7 +30,7 @@ bool run_elementwise_permute(const ExecutionConfig& config, const Problem& probl
Tensor<ADataType> a(nchw);
Tensor<BDataType> b(nhwc);
a.GenerateTensorValue(GeneratorTensor_3<ADataType>{0.0, 1.0});
std::iota(begin(a.mData), end(a.mData), 0);
DeviceMem a_device_buf(sizeof(ADataType) * a.mDesc.GetElementSpaceSize());
DeviceMem b_device_buf(sizeof(BDataType) * b.mDesc.GetElementSpaceSize());
......@@ -72,7 +72,7 @@ bool run_elementwise_permute(const ExecutionConfig& config, const Problem& probl
host_b, a, nhwc, PassThrough{});
return ck::utils::check_err(
b.mData, host_b.mData, "Error: Incorrect results b", 1e-3, 1e-3);
b.mData, host_b.mData, "Error: incorrect results in tensor B", 1e-10, 1e-10);
}
return true;
......
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