Conversation
Instrument the index manipulation, tensor contraction and factorization kernels with `@timeit_debug` sections that are compiled away by default and can be enabled with `TensorKit.enable_timers!()`. Section labels carry a category prefix (`symmetry:` / `bookkeeping:` / `alloc:` / `dense:`), and `TensorKit.timer_summary()` aggregates the exclusive time of each section into per-category totals, to measure the split between fusion tree manipulations, block structure bookkeeping, allocations and the actual dense tensor kernels. The `@cached` macro additionally times cache lookups separately from miss-path construction for all memoized functions. While timers are enabled, `taskforeach` regions run serially since a `TimerOutput` may only be manipulated from a single task; the guard const-folds away when timers are disabled, leaving the production paths unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
Example output for a single (cold-cache)
|
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
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.
Instruments the index manipulation, contraction and factorization kernels with
@timeit_debugsections, compiled away by default and enabled viaTensorKit.enable_timers!().Section labels carry a category prefix (
symmetry:/bookkeeping:/alloc:/dense:), andTensorKit.timer_summary()aggregates exclusive times into per-category totals that sum to the total measured time. The@cachedmacro times lookups separately from miss-path construction. While timing,get_num_*_threads()return 1 so that the (single-task) timer is never touched concurrently; the guard const-folds away when disabled, leaving production paths unchanged (verified via benchmark against main).Adds TimerOutputs (1.x, for recursive
enable_debug_timings) as a dependency, a "Profiling and timers" manual page, and tests.🤖 Generated with Claude Code