Skip to content

Commit

Permalink
Fixed UB in ttml
Browse files Browse the repository at this point in the history
  • Loading branch information
omilyutin-tt committed Dec 13, 2024
1 parent 3023d52 commit 19360ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tt-train/sources/ttml/core/tt_tensor_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ template <class T = float>
auto vec = to_vector<T>(tensor);
const auto& shape = tensor.get_shape().logical_shape();
std::vector<size_t> shape_vec(shape.cbegin(), shape.cend());
return xt::adapt(vec.data(), vec.size(), xt::acquire_ownership(), shape_vec);
return xt::adapt(std::move(vec), shape_vec);
}

template <class T = float>
Expand Down

0 comments on commit 19360ce

Please sign in to comment.