Unverified Commit 74b5267d authored by Jane (Yuan) Xu's avatar Jane (Yuan) Xu Committed by GitHub
Browse files

Use narrow over indexing in `hadacore_transform` to prep for ABI stable (#28756)


Signed-off-by: default avatarJane Xu <janeyx@meta.com>
parent dd6ac1c2
......@@ -802,7 +802,7 @@ torch::Tensor hadacore_transform(torch::Tensor& x, bool inplace) {
});
if (numel % 256 != 0) {
out = out.index({torch::indexing::Slice(0, numel / had_size)});
out = out.narrow(0, 0, numel / had_size);
}
if (inplace && out.data_ptr() != x.data_ptr()) {
......
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