@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d20e261199
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 15, 18:30 UTC

Fix non-contiguous input passed to Marlin kernel (#15319)

Qubitium-ModelCloud committed Mar 24, 2025 at 11:09 UTC d20e261199d3e4bffe9ee0e495ba7f7454229f11
1 file changed +4
vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py
+4
@@ -115,6 +115,10 @@ class MarlinLinearKernel(MPLinearKernel):
115 layer: torch.nn.Module,
116 x: torch.Tensor,
117 bias: Optional[torch.Tensor] = None) -> torch.Tensor:
118 + # marlin requires contiguous memory layout
119 + # prefix caching may cause x to be non-contiguous
120 + x = x.contiguous() # no-op if already contiguous
121 +
122 c = self.config
123 w_q, w_s, w_zp, w_gidx = self._get_weight_params(layer)
124