Skip to content

fix: DataLoader zero-copy contract violation #156

Description

@ulises-jeremias

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions