mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-01-25 18:04:30 +08:00
Use narrow over indexing in hadacore_transform to prep for ABI stable (#28756)
Signed-off-by: Jane Xu <janeyx@meta.com>
This commit is contained in:
parent
dd6ac1c2bb
commit
74b5267d3a
@ -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()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user