Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve debug formatting of tensors #377

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Improve debug formatting of tensors #377

merged 2 commits into from
Oct 11, 2024

Commits on Oct 11, 2024

  1. Eliminate unnecessary T: Clone bounds on tensor iterators

    Replace derived `Clone` impls for tensor iterators with manual implementations
    to remove the unnecessary `T: Clone` bound that the derived impl adds.
    
    See also rust-lang/rust#26925.
    robertknight committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    0259c7e View commit details
    Browse the repository at this point in the history
  2. Add custom Debug impl for TensorBase

    Add a `Debug` impl for TensorBase that outputs the data in logical order, elided
    if sufficiently long, followed by shape and stride info.
    
    The main `tensor.rs` module is growing very long (~3.8K lines, of which 40% are
    tests), so start the process of moving some impls and their tests into separate
    modules.
    robertknight committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    dc95293 View commit details
    Browse the repository at this point in the history