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

  • 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=}".
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.

1 participant