cutlass icon indicating copy to clipboard operation
cutlass copied to clipboard

[BUG] "smem_ptr_flag_bits" is not declared in print_tensor.hpp which causes compilation failed.

Open diantaowang opened this issue 1 year ago • 2 comments

Which component has the problem?

CUTLASS C++

Bug Report

Describe the bug

When I try to print a Layout to learn how to use CuTe, the compiler report the follow error: "/.../cutlass/include/cute/util/print_tensor.hpp(84): error: smem_ptr_flag_bits is not a template print_layout(ComposedLayout<SwizzleFn,smem_ptr_flag_bits,Layout> const& layout)".

The reason caused this error is that "smem_ptr_flag_bits" is not declared before use it in print_tensor.hpp.

Steps/Code to reproduce bug

#include "cute/layout.hpp"
#include "cute/util/print_tensor.hpp"
using namespace cute;
int main() {
    auto A = make_layout(make_shape(_2{}, _5{}), make_stride(_5{}, _1{}));
    print_layout(A);
    return 0;
}

Expected behavior

"smem_ptr_flag_bits" is not declared before use it in print_tensor.hpp.

Environment details (please complete the following information):

  • Bare-metal
  • Ubuntu 22.04.3 LTS, cuda_12.1.r12.1
  • cutlass: 56f0718a977454920a70b415343531e979ebf1ba

Additional context

diantaowang avatar Sep 15 '25 10:09 diantaowang

same question, have you solved yet ?

Rhys-Q avatar Oct 16 '25 00:10 Rhys-Q

same question, have you solved yet ?

you have to import tensor.hpp to make use of print_tensor #include <cute/tensor.hpp>

mani-builds avatar May 22 '26 02:05 mani-builds