datasets/dataloader.v docstring claims "Zero-copy: batch extraction uses tensor.slice()
which returns a view", but batch() only uses the view path when batch_indices.len == 1.
When len > 1 it allocates vtl.zeros and copies element-by-element — directly
contradicting the documented design.
Task
Implement true strided batching via slice() + stack() or update the documentation
to accurately describe the current behavior.
Files
datasets/dataloader.v:33-58
datasets/dataloader.vdocstring claims "Zero-copy: batch extraction usestensor.slice()which returns a view", but
batch()only uses the view path whenbatch_indices.len == 1.When
len > 1it allocatesvtl.zerosand copies element-by-element — directlycontradicting the documented design.
Task
Implement true strided batching via
slice()+stack()or update the documentationto accurately describe the current behavior.
Files
datasets/dataloader.v:33-58