Fix: replace verbose log tiers with severity levels - #1475
Conversation
|
Important Review skippedToo many files! This PR contains 156 files, which is 56 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (156)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
873df6e to
2d4b378
Compare
docs/ had 35 files flat at its root with no index. The top-level README listed 10 of them, so the other 25 were discoverable only by grep, and four had no inbound link from anywhere in the repo. Only investigations/ carried a README; dfx/ (12 files, 5227 lines), troubleshooting/ and hardware/ had none. - Add docs/README.md indexing every root document and subdirectory, grouped by reader intent, and stating that a new doc registers there in the same commit. This de-orphans install.md, simt-launch.md, profiling-config-naming.md and sim_multi_device_isolation.md. - Add docs/capability-survey.md: a status snapshot of what is shipped, gated, or design-only across the level model (L2 chip up to L4 host-to-host), the CANN launch surface for AICore and AICPU, and the communication engines. Every claim carries a file:line so it can be re-checked, and the page records the snapshot commit because status claims rot faster than architecture. - Move profiling-framework.md, profiling-name-map.md and profiling-config-naming.md into docs/dfx/, which already held 12 profiling documents and linked up to these three nine times via ../. Add docs/dfx/README.md as that directory's index. logging.md stays at the docs/ root: PR #1475 modifies it, so renaming it here would hand that author a rename-vs-modify conflict. - Fix seven broken links in docs/dfx/pmu-profiling.md, a file already touched by this change: six had the wrong relative depth (../src -> ../../src) and profiling_copy.h moved to src/common/ when #944 unified the collector framework.
a8d5c26 to
accb802
Compare
- Collapse V0-V9 call sites to INFO and reserve TIMING for STRACE - Add DEBUG, TIMING, WARN, and ERROR severity APIs - Default to TIMING and align Python, host, sim, and CANN thresholds - Forward the threshold into RTLD_LOCAL AICPU simulation libraries - Add CANN configuration and simulation propagation regressions - Update affected call sites and documentation Fixes hw-native-sys#1429 Co-authored-by: ChaoZheng109 <zhengchao47@huawei.com>
accb802 to
45d062e
Compare
|
Stale reference to a removed symbol — # line 25
from simpler import _log
# line 69
logging.getLogger("simpler").setLevel(_log.V9)This PR deletes The file isn't part of this PR's diff, so a line-anchored inline comment can't be attached here — flagging it at the conversation level instead. It's also why CI stays green: the filename isn't Suggested fix: |
| void init_log_switch() { | ||
| g_is_log_enable_debug = CheckLogLevel(AICPU, DLOG_DEBUG); | ||
| g_is_log_enable_info = CheckLogLevel(AICPU, DLOG_INFO); | ||
| g_is_log_enable_timing = CheckLogLevel(AICPU, DLOG_WARN); |
There was a problem hiding this comment.
host/device log-level should stay aligned: onboard can't suppress TIMING at --log-level warn.
Gating TIMING on CheckLogLevel(AICPU, DLOG_WARN) makes g_is_log_enable_timing identical to g_is_log_enable_warn, so onboard can never separate the two. At --log-level warn (threshold 30):
- host:
is_enabled(TIMING)-> 25 >= 30 is false -> TIMING suppressed ✓ - sim device: this PR forwards the threshold into
set_log_level, which gatesg_is_log_enable_timing = level <= 25independently -> TIMING suppressed ✓ - onboard device: TIMING still emits (shares the
DLOG_WARNflag) ✗
So after this PR sim and onboard disagree on the timing/warn boundary, and neither matches the host only for onboard. There are no device LOG_TIMING call sites today, but the level semantics should still line up across host and both device backends so a future device-side TIMING log behaves consistently.
Cheap fix, no new plumbing — the threshold already reaches the device: kernel.cpp calls set_log_level(init_args->log_level). Instead of making onboard's set_log_level a no-op, store the threshold in a simpler-owned global and gate is_log_enable_timing() on threshold <= TIMING(25) (mirroring sim, and the old g_log_info_v simpler-managed axis). Keep DEBUG/INFO/WARN/ERROR on CANN as-is; only TIMING needs the simpler-side cut, since CANN has no level between INFO and WARN.
Summary
DEBUG,INFO,TIMING,WARN, andERROR, defaulting toTIMINGTIMING, migrate affected call sites and documentation, and retain the log-footprint reduction from Strip all LOG_* call sites — logging re-tiering baseline #1447Testing
Performance
On a2a3
batch_paged_attentionCase1 over 100 rounds:Fixes #1429