Skip to content

Conversation

@aartbik
Copy link
Collaborator

@aartbik aartbik commented Jun 18, 2025

even though this is not used anywhere yet, the DIA formats require
this correction for the proper inverse (restricted to proper
compressed-range pairs for now)

    even though this is not used anywhere yet, the DIA formats require
    this correction for the proper inverse (restricted to proper
    compressed-range pairs for now)
@aartbik aartbik requested review from cliffburdick and Copilot June 18, 2025 23:50
@copy-pr-bot
Copy link

copy-pr-bot bot commented Jun 18, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR corrects the inverse mapping from levels to dimensions for LvlOp::Add and LvlOp::Sub, ensuring proper handling of compressed-range pairs even if not yet used by existing code.

  • Adds compile-time checks for the next level specifier to be an identity range
  • Implements conditional assignments to recover original dimensions in both Add and Sub cases
Comments suppressed due to low confidence (2)

include/matx/core/sparse_tensor_format.h:259

  • The new inversion logic for Add/Sub introduces two distinct branches. Add unit tests to cover both cases where ftype::Expr::cj == ntype::Expr::di and ftype::Expr::di == ntype::Expr::di.
        using ntype = cuda::std::tuple_element_t<L + 1, LvlSpecs>;

include/matx/core/sparse_tensor_format.h:259

  • [nitpick] Consider adding a brief comment explaining the mathematical rationale behind these inverse computations for LvlOp::Add and LvlOp::Sub to aid future maintainers.
        using ntype = cuda::std::tuple_element_t<L + 1, LvlSpecs>;

@cliffburdick
Copy link
Collaborator

/build

@aartbik aartbik merged commit e3c6106 into NVIDIA:main Jun 24, 2025
1 check passed
@aartbik aartbik deleted the bik branch June 24, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants