Skip to content

Commit 3cde845

Browse files
authored
[None][fix] Make the sliced nvfp4 output contiguous (#9123)
Signed-off-by: jiant <107457950+JadoTu@users.noreply.github.com>
1 parent 64cd91a commit 3cde845

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorrt_llm/_torch/modules/linear.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,9 +824,9 @@ def apply(self, module: Linear, input: torch.Tensor,
824824
act_sf,
825825
module.weight_scale,
826826
module.alpha, module.dtype)
827-
# Take the dim of out_features if padded.
827+
# Take the dim of out_features if padded. Make sure the output is contiguous
828828
if output.shape[-1] > module.out_features:
829-
output = output[..., :module.out_features]
829+
output = output[..., :module.out_features].contiguous()
830830

831831
if bias is not None:
832832
output = output + bias

0 commit comments

Comments
 (0)