[BUG][CuTeDSL] Incorrect error messages in right_inverse and left_inverse functions
Describe the bug
The error messages in the right_inverse and left_inverse functions incorrectly display <class 'nanobind.nb_type_0'> instead of the actual type of the received input, which makes debugging difficult.
Steps/Code to reproduce bug
import cutlass.cute as cute
@cute.jit
def error():
cute.right_inverse(1)
error()
The error message: TypeError: expects input of type Layout, but got <class 'nanobind.nb_type_0'>
Expected behavior
Error message: TypeError: expects input of type Layout, but got <class 'int'>
Environment details : CuTe DSL version: nvidia-cutlass-dsl 4.0.0
Additional context
The fix is to replace type(Layout) with type(input) in cute/core.py:
https://github.com/NVIDIA/cutlass/blob/8bdbfca68287232e5bf5793145f987569ecd312e/python/CuTeDSL/cutlass/cute/core.py#L3876-L3887
thanks for the report!
Thanks for report and recommended fix.
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
This was fixed in 4.2. Closing.