From 3832fd288639a026b562c22add9eaefab6701355 Mon Sep 17 00:00:00 2001 From: lijing-mt Date: Mon, 10 Aug 2026 19:43:42 +0800 Subject: [PATCH] Update sync torch_musa 2.9.1.post1 --- libkineto/src/init.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libkineto/src/init.cpp b/libkineto/src/init.cpp index c0259d6..e960a92 100644 --- a/libkineto/src/init.cpp +++ b/libkineto/src/init.cpp @@ -34,8 +34,12 @@ static bool initialized = false; static void initProfilers() { if (!initialized) { + // Caution: `initProfilerIfRegistered` spawns the `updateConfigThread`, so + // either: + // 1. Ensure nothing the main thread does not do anything which could race + // with the `updateConfigThread` (current invariant) + // 2. Guard the raceable data appropriately libkineto::api().initProfilerIfRegistered(); - libkineto::api().configLoader().initBaseConfig(); initialized = true; VLOG(0) << "libkineto profilers activated"; }