fix: Cold self-review found the libinfo.py fix duplicated an existing#20033
fix: Cold self-review found the libinfo.py fix duplicated an existing#20033singlaamitesh wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request fixes issues with CUTLASS template instantiation and build flag detection. Specifically, it corrects an undefined template variable (${A_arg} to ${lhs_arg}) in gemm_operation.py, adds the missing tvm/ffi/container/tensor.h header in gen_tensor_op.py, and dynamically detects whether USE_CUTLASS is enabled by probing for the registered native global function instead of hardcoding it to OFF. Unit tests have been added to verify these fixes. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Fixes #20031
Summary
Cold self-review found the libinfo.py fix duplicated an existing mechanism (tvm.contrib.cutlass.has_cutlass(), which already probes the 'relax.ext.cutlass' global function registered only under USE_CUTLASS=ON) using a different, less-canonical symbol, and was missing the codebase's standard import-outside-toplevel pylint-disable on a local import. Aligned libinfo() to check the same 'relax.ext.cutlass' symbol as has_cutlass(), and updated both regression tests to call has_cutlass() directly instead of re-deriving the check. The GEMM ${A_arg}->${lhs_arg} template fix and the missing tvm/ffi/container/tensor.h header fix were re-verified unchanged and correct.
Changes
python/tvm/support/libinfo.pypython/tvm/contrib/cutlass/gemm_operation.pypython/tvm/contrib/cutlass/gen_tensor_op.pytests/python/support/test_libinfo.pytests/python/testing/test_env.pytests/python/contrib/test_cutlass_gemm.pyHow this was tested
Ran
tests/locally.