[PR #390] Don't enable the assertion check for release build #410

Open
opened 2026-10-26 21:17:23 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/390
Author: @zhangqingshan373
Created: 7/22/2026
Status: 🔄 Open

Base: main ← Head: qshanz/assert


📝 Commits (3)

  • bfed394 Don't enable the assertion check for release build
  • 7aff304 Address comments
  • 0907d31 Still evaluate the cond and let the compiler to optimize it out

📊 Changes

2 files changed (+7 additions, -0 deletions)

View changed files

📝 csrc/utils/exception.hpp (+4 -0)
📝 setup.py (+3 -0)

📄 Description

There are lots of DG_HOST_ASSERT before lauch the kernel. For example, github.com/deepseek-ai/DeepGEMM@559d79fb69/csrc/apis/mega.hpp
For now, DG_HOST_ASSERT always do the runtime check which will hurt the performance. Only enable the assertion check when DG_DEBUG is set.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepGEMM/pull/390 **Author:** [@zhangqingshan373](https://github.com/zhangqingshan373) **Created:** 7/22/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `qshanz/assert` --- ### 📝 Commits (3) - [`bfed394`](https://github.com/deepseek-ai/DeepGEMM/commit/bfed39452edf9755c624d2a54179079f0f65478e) Don't enable the assertion check for release build - [`7aff304`](https://github.com/deepseek-ai/DeepGEMM/commit/7aff3040071a88e47f4633f568fbea9a202a82a6) Address comments - [`0907d31`](https://github.com/deepseek-ai/DeepGEMM/commit/0907d3142da0640ab47f4bdd9ad6352ff4aecdde) Still evaluate the cond and let the compiler to optimize it out ### 📊 Changes **2 files changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `csrc/utils/exception.hpp` (+4 -0) 📝 `setup.py` (+3 -0) </details> ### 📄 Description There are lots of DG_HOST_ASSERT before lauch the kernel. For example, https://github.com/deepseek-ai/DeepGEMM/blob/559d79fb6994a58b8a15b4b93bf13ccc16edf247/csrc/apis/mega.hpp For now, DG_HOST_ASSERT always do the runtime check which will hurt the performance. Only enable the assertion check when DG_DEBUG is set. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#410
No description provided.