Skip to content

[CuTeDSL] Support type checking w/ Constexpr and layout/tensor __repr__#3063

Open
Alkaid-Benetnash wants to merge 2 commits intoNVIDIA:mainfrom
Alkaid-Benetnash:cutedsl-misc-improvements
Open

[CuTeDSL] Support type checking w/ Constexpr and layout/tensor __repr__#3063
Alkaid-Benetnash wants to merge 2 commits intoNVIDIA:mainfrom
Alkaid-Benetnash:cutedsl-misc-improvements

Conversation

@Alkaid-Benetnash
Copy link
Copy Markdown

  • Let python type checking treat cutlass.Constexpr[T] transparently as type T.
  • Support python debug-style formatting (e.g., f"{layout=}") for Layout and Tensor classes, similar to what SymInt already supported.

Existing `param: cutlass.Constexpr[int]` does not allow python type
checker to infer `param` having type `int`.
Introduce TYPE_CHECKING specific code path for Constexpr to propogate
typing properly.
Add __repr__ methods to Layout and Tensor classes, following the
existing pattern in SymInt. This enables Python debug-style formatting
such as f"{layout=}".
@github-actions
Copy link
Copy Markdown

This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant