[FlagPrism][Mthreads] Integrate profiler and debugger - #1106
Open
Jacob-yen wants to merge 2 commits into
Open
Conversation
Jacob-yen
requested review from
Galaxy1458,
menchunlei,
sunnycase and
zhzhcookie
as code owners
September 6, 2026 15:00
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.
This pull request extends support for the FlagPrism profiler/debugger to the
mthreadsbackend and integrates FlagPrism instrumentation throughout the mthreads compilation and runtime pipeline. It also introduces mechanisms for using external FlagPrism source directories, improves error messages and test coverage, and adds hooks for debugger integration and event emission during compilation and code generation.FlagPrism support for mthreads backend:
mthreadsbackend is now recognized as a supported backend for FlagPrism in both CMake (FlagTreeOptions.cmake) and Python (setup_helper.py). This enables the profiler/debugger by default for mthreads and updates error messages and tests to reflect this support. [1] [2] [3] [4]External source and build configuration improvements:
FLAGPRISM_SOURCE_DIRfor local development, rather than requiring the bundled third-party directory. The build configuration is updated accordingly. [1] [2] [3]mthreads backend integration with FlagPrism:
driver.py) is instrumented to preserve user arguments and launch metadata, append a debugger control pointer to the ABI when needed, and wrap kernel launches with debugger context when enabled. [1] [2] [3] [4]Compiler and code generation hooks:
Runtime integration: