#12 - Enable access to all @analyze.kernel profiling results via global cache #14
+369
−4
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.
Intro
This commit introduces a global profiling cache system to the nsight-python. It fundamentally improves how profiling results are collected and accessed, especially when using multiple
@nsight.analyze.kernel-decorated functions within a single script.Previously, profiling was performed in separate script executions for each decorated function, which meant only the currently-profiled function returned results while others returned
None. This made it impossible to aggregate results from multiple kernels or access all profiling results within the same script run.With this update, the profiling system saves results from every profiling execution to disk using a singleton-based cache manager. On subsequent calls, each decorated function transparently loads its result from cache if profiling has already been executed, enabling access to all profiling results in a single script run.
Refer to #12 for more details.
Key Changes
GlobalNCUProfileCachesingleton.Files Updated
nsight/cache.py(new cache system)nsight/collection/ncu.py(uses cache system)examples/06_plot_customization.pyto validate new cache behavior