Skip to content

fix(cute): use assertion failure handler on device - #32

Merged
hemengchi merged 1 commit into
v0.8.0from
fix/sparse-mma-unsupported-arch
Nov 2, 2026
Merged

hemengchi merged 1 commit into
v0.8.0from
fix/sparse-mma-unsupported-arch

Conversation

@Fang-Yuhang

Copy link
Copy Markdown
Collaborator

Changes

  • Use __assert_fail in the device-side CUTE_INVALID_CONTROL_PATH macro, preserving host behavior.

Related Issue

Closes #30

Change Type

  • Bug fix

Validation

  • Local test

Risks and Compatibility

  • Device diagnostic printing follows the SDK's NDEBUG behavior.

Use __assert_fail for device failures while preserving the original host assertion and printing behavior.
Copilot AI balanced review requested due to automatic review settings November 2, 2026 03:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The unavailable SDK implementation of __assert_fail leaves it unverified whether replacing unconditional __brkpt() preserves execution interruption on PPU 1.5 under -DNDEBUG, including RTC compilation.

No open issues 🎉

What changed in this PR

Updates CUTE’s device-side invalid-control-path handling to call __assert_fail directly, addressing assertion handling under NDEBUG while preserving host behavior.

Changes:

  • Replaces the device-side assert, print, and breakpoint sequence with the assertion failure handler.
  • Passes the diagnostic message, file, line, and function to the handler.
File Description
include/​cute/​config.hpp Updates the device-side CUTE_INVALID_CONTROL_PATH macro; leaves the host branch unchanged.

Review effort: Balanced

@hemengchi
hemengchi merged commit a18a838 into v0.8.0 Nov 2, 2026
10 of 12 checks passed
@hemengchi
hemengchi deleted the fix/sparse-mma-unsupported-arch branch November 2, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants