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

Avoid create necessary objects

parent f629397b
...@@ -102,12 +102,10 @@ bool run_permute(const ExecutionConfig& config, const Problem& problem) ...@@ -102,12 +102,10 @@ bool run_permute(const ExecutionConfig& config, const Problem& problem)
return false; return false;
} }
std::vector<DataType> extended_b(reinterpret_cast<DataType*>(data(b.mData)), return ck::utils::check_err(
reinterpret_cast<DataType*>(data(b.mData)) + ck::span<const DataType>{reinterpret_cast<DataType*>(data(b.mData)),
b.mDesc.GetElementSpaceSize() * NUM_ELEMS_IN_BUNDLE); b.mDesc.GetElementSpaceSize() * NUM_ELEMS_IN_BUNDLE},
ck::span<const DataType>{extended_host_b.mData},
return ck::utils::check_err(extended_b,
extended_host_b.mData,
"Error: incorrect results in output tensor", "Error: incorrect results in output tensor",
1e-10, 1e-10,
1e-10); 1e-10);
......
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