[Issue]: static_assert in streamk_gemm_kernel.hpp never fires due to string-to-bool conversion

未關閉
#3,743 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
cpp
領域
compilers

研究方向

Read include/ck_tile/ops/gemm/kernel/streamk_gemm/streamk_gemm_kernel.hpp and inspect the else branch for unsupported ReductionStrategy values. Compare the intended compile-time failure with the fix described in pull request #3742; done means unsupported strategies trigger the assertion rather than compiling silently.

由索引模型根據 Issue 內容生成。

描述

Problem Description

Hi experts, I want to confirm with an usage of static_assert in the repo:

In include/ck_tile/ops/gemm/kernel/streamk_gemm/streamk_gemm_kernel.hpp, the else branch for unsupported reduction strategies uses:

static_assert("An implementation does not exist for the chosen reduction strategy.");

This is the single-argument form of static_assert, where the string literal is the condition, not the message. Since a string literal is a non-null pointer, it implicitly converts to true, so the assertion never fires — even when an unsupported ReductionStrategy is instantiated.

I've submitted a fix in #3742 that changes it to the two-argument form:

static_assert(false, "An implementation does not exist for the chosen reduction strategy.");

I wanted to confirm: was the original code intended to be a compile-time error for unsupported strategies? Or was there a different intent here? The surrounding code
structure (an if constexpr / else if chain over ReductionStrategy) suggests it was meant to catch unhandled cases at compile time.

Thank you!

Operating System

CentOS Stream 9

CPU

AMD EPYC 9655 96-Core Processor

GPU

Other

Other

AMD MI350x with ROCm 7.0.2 (please ignore ROCm version below)

ROCm Version

ROCm 6.0.0

ROCm Component

No response

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

主要語言
C++
星號
552
分支
316
平均合併
3 天 14 小時
30 天內合併 PR
2

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ROCm/composable_kernel 的其他 Issue

查看 ROCm/composable_kernel 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。