feat: add lightweight kernel debug logs and remove legacy timing#158
Open
XFDG wants to merge 10 commits intoMooreThreads:mainfrom
Open
feat: add lightweight kernel debug logs and remove legacy timing#158XFDG wants to merge 10 commits intoMooreThreads:mainfrom
XFDG wants to merge 10 commits intoMooreThreads:mainfrom
Conversation
# Conflicts: # musa_ext/kernels/array/musa_gather_op.cc
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.
背景
为了更方便地定位 MUSA kernel 的输入信息,这个 PR 将原来的 timing 宏方案替换为更轻量的 debug 日志方案。同时保留测试时的进度条体验,避免调试日志引入后影响现有单测使用方式。
主要改动
MUSA_DEBUG_LOG_KERNEL(ctx)op_type、input_types、input_shapesregister_type=...输出input_types和input_shapes增加终端颜色高亮能力AddAddNConv2DGELUpython test/ops/xxx_op_test.py也能复用自定义 test runnerPYTHONPATHtest/目录运行,无需设置PYTHONPATH删除内容
以下旧 timing 宏已移除,不再作为调试入口使用:
MUSA_KERNEL_TIMING_GUARDMUSA_KERNEL_TRACE_STARTMUSA_KERNEL_TRACE_ENDMUSA_KERNEL_TRACEMUSA_PROFILE_OP验证
已完成以下验证:
./build.sh debug编译通过python3 test/ops/add_op_test.py时,进度条与MUSA_KERNEL_DEBUG日志可同时输出add_op_test日志中能够正确看到新的 debug 输出格式影响说明
本次改动主要影响 debug 观测方式,不改变算子计算逻辑。旧 timing 宏路径已废弃,后续调试请统一使用新的 kernel debug 日志方案。