NVIDIA / NVIDIA/cutlass

[QST] error: non-type template parameters of class type only available with ‘-std=c++20’ or ‘-std=gnu++20’

Open
#2,206 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:23:50_PST_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_0

uname -a
Linux u24 6.14.0-061400-generic #202503241442 SMP PREEMPT_DYNAMIC Mon Mar 24 15:06:01 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

 g++ --version
g++ (GCC) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc --version
gcc (GCC) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


git pull
git rev-parse HEAD
62750a2b75c802660e4894434dc55e839f322277

mkdir build
cd build

cmake .. -DCMAKE_CXX_FLAGS="-std=c++20" -DCUTLASS_NVCC_ARCHS="89;120" -DCUTLASS_LIBRARY_KERNELS=all -DCUTLASS_ENABLE_CUBLAS=ON -DCUTLASS_ENABLE_CUDNN=ON -DCMAKE_CUDA_FLAGS="--diag-suppress=1444"

make cutlass_examples -j23
/home/edison/Downloads/cutlass/examples/63_hopper_gemm_with_weight_prefetch/63_hopper_gemm_with_weight_prefetch.cu:199:0:   required from here
  199 | using EpilogueOutputOp  = typename Gemm::EpilogueOutputOp;
/home/edison/Downloads/cutlass/examples/63_hopper_gemm_with_weight_prefetch/collective/sm90_mma_tma_gmma_ss_warpspecialized_with_prefetch.hpp:160:63: error: non-type template parameters of class type only available with ‘-std=c++20’ or ‘-std=gnu++20’
  160 |   using PrefetchSmemLayoutA = decltype(make_layout(make_shape(
      |                                                     ~~~~~~~~~~^
/home/edison/Downloads/cutlass/examples/63_hopper_gemm_with_weight_prefetch/collective/sm90_mma_tma_gmma_ss_warpspecialized_with_prefetch.hpp:160:63: error: non-type template parameters of class type only available with ‘-std=c++20’ or ‘-std=gnu++20’
make[3]: *** [examples/63_hopper_gemm_with_weight_prefetch/CMakeFiles/63_hopper_gemm_with_weight_prefetch.dir/build.make:77: examples/63_hopper_gemm_with_weight_prefetch/CMakeFiles/63_hopper_gemm_with_weight_prefetch.dir/63_hopper_gemm_with_weight_prefetch.cu.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:46639: examples/63_hopper_gemm_with_weight_prefetch/CMakeFiles/63_hopper_gemm_with_weight_prefetch.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:39741: examples/CMakeFiles/cutlass_examples.dir/rule] Error 2
make: *** [Makefile:16450: cutlass_examples] Error 2

I had tried modifed the cmakelist.txt:

#
# CUTLASS 3.x requires C++17
#
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

but still same.

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 build command and the CMake standard settings, then inspect examples/63_hopper_gemm_with_weight_prefetch/63_hopper_gemm_with_weight_prefetch.cu and its collective/sm90_mma_tma_gmma_ss_warpspecialized_with_prefetch.hpp header around line 160. Reproduce the cutlass_examples build and trace which flags reach nvcc. Done means the reported example builds successfully with the stated configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.