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

Đang mở
#3,743 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
compilers

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C++
Star
552
Fork
316
Merge trung bình
3 ngày 14 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ROCm/composable_kernel

Tất cả issue của ROCm/composable_kernel

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.