ConvSubsampling forward broken: chunking=-1, striding_conv1d/dw_striding_conv1d, and vggnet all raise TypeError
Author: ManoharPaturiCreated Sep 7, 2026Updated Sep 17, 2026
Labelscommunity-requestwaiting-on-maintainers
Description
The MaskedConvSequential refactor (#13827) left three ConvSubsampling forward paths broken on current main:
subsampling_conv_chunking_factor=-1— the documented "no chunking" value (class docstring, andchange_subsampling_conv_chunking_factorvalidates it) — raisesTypeError: MaskedConvSequential.forward() missing 1 required positional argument: 'lengths'striding_conv1d/dw_striding_conv1d— unusable entirely: withconv2d_subsampling=Falsethe forward always takes the branch that callsself.conv(x)without lengths, same TypeError on every invocation (both default and -1 chunking)- every
vggnetforward raisesTypeError: 'int' object is not subscriptable—MaskedConvSequential._layer_paddingassumes Conv2d-style tuple attributes, butnn.MaxPool2dstores theintkernel_size/stride/padding it was constructed with; floor-mode length calc also ignoresceil_mode=True
These escaped the test suite because the existing tests in tests/collections/asr/test_asr_subsampling.py require model downloads or CUDA.
Steps to reproduce
import torch
from nemo.collections.asr.parts.submodules.subsampling import ConvSubsampling
x = torch.randn(2, 80, 100)
lengths = torch.tensor([100, 90])
ConvSubsampling('striding', 4, 80, 128, 64, subsampling_conv_chunking_factor=-1)(x, lengths)
# TypeError: MaskedConvSequential.forward() missing 1 required positional argument: 'lengths'
ConvSubsampling('striding_conv1d', 4, 80, 128, 64)(x, lengths) # same TypeError
ConvSubsampling('vggnet', 4, 80, 128, 64)(x, lengths)
# TypeError: 'int' object is not subscriptableExpected behavior
All three run: -1 means no chunking (same output as the default path), conv1d stacks work with their default settings, vggnet forwards compute.
Environment
NeMo main (de26b36), CPU, torch 2.14
Source: NVIDIA-NeMo/Speech