fix: change debug log from ERROR to DEBUG in RepetitionPenaltyKernel#4363
Merged
lvhan028 merged 1 commit intoInternLM:mainfrom Feb 24, 2026
Merged
Conversation
The TM_LOG_ERROR call in ApplyRepetitionPenalty() reports the shared memory allocation size (smem_size) on every invocation. This is a diagnostic message, not an error condition the value is always a normal allocation (e.g. 1024 bytes for an ~8K vocabulary bitmask), well within GPU limits. This causes excessive '[TM][ERROR] smem_size = 1024' console spam during inference, which is confusing to users and drowns out real error messages. Changing to TM_LOG_DEBUG preserves the diagnostic for developers while keeping the console clean at default log levels.
lzhangzz
approved these changes
Feb 18, 2026
windreamer
approved these changes
Feb 18, 2026
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.
Problem
The TM_LOG_ERROR call in ApplyRepetitionPenalty() (line 190 of sampling_penalty_kernels.cu) reports the shared memory allocation size on every invocation during inference. This produces excessive console spam:
[TM][ERROR] smem_size = 1024 [TM][ERROR] smem_size = 1024 [TM][ERROR] smem_size = 1024 ...This message fires once per token generation step and is not an error condition the value (e.g., 1024 bytes for an ~8K vocabulary bitmask) is a perfectly normal shared memory allocation well within GPU limits.
Impact
Fix
One-line change: TM_LOG_ERROR TM_LOG_DEBUG
This preserves the diagnostic information for developers who enable debug logging while keeping the console clean at default log levels.