NVIDIA / NVIDIA/cutlass

[BUG] Disordered header files: detail::is_prefetch used before declaration.

Open
#1,484 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug inactive-30d inactive-90d
Dominant language
C++
Stars
10.5k
Forks
2.1k
Avg merge
3d 11h
Merged PRs (30d)
7

Description

Describe the bug
Disordered header files (use before declaration) in latest CUTLASS version.
If cute/algorithm/prefetch.hpp was included, eventually it will include cutlass/include/cute/arch/copy_sm90_tma.hpp.
This included file uses detail::is_prefetch<CopyOp> while detail::is_prefetch is defined in cute/algorithm/prefetch.hpp but not included yet.

Including link:
cute/algorithm/prefetch.hpp
-> cute/tensor.hpp
-> cute/algorithm/copy.hpp
-> cutlass/include/cute/atom/copy_atom.hpp
-> cutlass/include/cute/atom/copy_traits_sm90_tma.hpp

Steps/Code to reproduce bug
Add

#include "cute/algorithm/prefetch.hpp"

to any example file.
For example, in 57_hopper_grouped_gemm:
bug

Expected behavior
Compilation error occurs:
error

Environment details (please complete the following information):

  • CUTLASS: 7d49e6c7e2f8896c47f586706e67e1fb215529dc
  • CUDA 12.4
  • GCC 11.4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the include chain from cute/algorithm/prefetch.hpp through cute/tensor.hpp, cute/algorithm/copy.hpp, and the listed atom headers, then inspect the use in copy_sm90_tma.hpp against the declaration in prefetch.hpp. Reproduce by adding the include to 57_hopper_grouped_gemm; done means the example compiles without the declaration error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.