@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 74b5267d3a
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 13, 03:15 UTC

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

Signed-off-by: Jane Xu <janeyx@meta.com>

Jane (Yuan) Xu committed Nov 15, 2025 at 04:10 UTC 74b5267d3a2d49be548e488650d1504be0b3e3fe
1 file changed +1 -1
csrc/quantization/hadamard/hadacore/hadamard_transform_cuda.cu
+1 -1
@@ -802,7 +802,7 @@ torch::Tensor hadacore_transform(torch::Tensor& x, bool inplace) {
802 });
803
804 if (numel % 256 != 0) {
805 - out = out.index({torch::indexing::Slice(0, numel / had_size)});
805 + out = out.narrow(0, 0, numel / had_size);
806 }
807
808 if (inplace && out.data_ptr() != x.data_ptr()) {