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)
return false;
}
std::vector<DataType> extended_b(reinterpret_cast<DataType*>(data(b.mData)),
reinterpret_cast<DataType*>(data(b.mData)) +
b.mDesc.GetElementSpaceSize() * NUM_ELEMS_IN_BUNDLE);
return ck::utils::check_err(extended_b,
extended_host_b.mData,
return ck::utils::check_err(
ck::span<const DataType>{reinterpret_cast<DataType*>(data(b.mData)),
b.mDesc.GetElementSpaceSize() * NUM_ELEMS_IN_BUNDLE},
ck::span<const DataType>{extended_host_b.mData},
"Error: incorrect results in output tensor",
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