#16223·Speech

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:

  1. subsampling_conv_chunking_factor=-1 — the documented "no chunking" value (class docstring, and change_subsampling_conv_chunking_factor validates it) — raises TypeError: MaskedConvSequential.forward() missing 1 required positional argument: 'lengths'
  2. striding_conv1d / dw_striding_conv1d — unusable entirely: with conv2d_subsampling=False the forward always takes the branch that calls self.conv(x) without lengths, same TypeError on every invocation (both default and -1 chunking)
  3. every vggnet forward raises TypeError: 'int' object is not subscriptableMaskedConvSequential._layer_padding assumes Conv2d-style tuple attributes, but nn.MaxPool2d stores the int kernel_size/stride/padding it was constructed with; floor-mode length calc also ignores ceil_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

python
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 subscriptable

Expected 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