add caller location for util functions for better error message#282
Draft
YouJiacheng wants to merge 1 commit intodeepseek-ai:mainfrom
Draft
add caller location for util functions for better error message#282YouJiacheng wants to merge 1 commit intodeepseek-ai:mainfrom
YouJiacheng wants to merge 1 commit intodeepseek-ai:mainfrom
Conversation
YouJiacheng
commented
Jan 20, 2026
|
|
||
| #ifndef DG_STATIC_ASSERT | ||
| #define DG_STATIC_ASSERT(cond, ...) static_assert(cond, __VA_ARGS__) | ||
| #define DG_STATIC_ASSERT(cond, ...) static_assert(cond __VA_OPT__(,) __VA_ARGS__) |
Author
There was a problem hiding this comment.
without __VA_OPT__, DG_STATIC_ASSERT will fail to compile if __VA_ARGS__ is empty (i.e. no message is provided)
YouJiacheng
commented
Jan 20, 2026
Comment on lines
+21
to
+22
| set(CMAKE_CXX_STANDARD 20) | ||
| set(CMAKE_CUDA_STANDARD 20) |
Author
There was a problem hiding this comment.
both std::source_location and __VA_OPT__ need C++20.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vllm-project/vllm#32647
RuntimeError: Assertion error (csrc/apis/../jit_kernels/impls/../heuristics/../../utils/layout.hpp:39): t.dim() == Nerror like this is uninformative. this draft improves the error message by adding source location of caller of these util functions.passing location might have performance penalty if compiler doesn't optimize it.
stacktrace libraries will need DWARF debug info to print line number, and they also need addr2line/libbfd or custom parsing logics to work.