Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make HeuristicSummary a lazy cache #2973

Merged
merged 5 commits into from
Sep 22, 2024
Merged

Make HeuristicSummary a lazy cache #2973

merged 5 commits into from
Sep 22, 2024

Conversation

csarofeen
Copy link
Collaborator

@csarofeen csarofeen commented Sep 19, 2024

Currently, HeuristicSummary runs all the scheduler analyses to produce the cache it also validates all the information exists once doing so. I simply converted it to be lazy, populating on first hit and reusing if entries exist. This makes it easier to update and use correctly.

I tested it locally on a dynamic shape case and from profiling it seems to be caching as it's supposed to (latency remained consistent before and after).

@csarofeen csarofeen marked this pull request as ready for review September 19, 2024 20:54
@csarofeen
Copy link
Collaborator Author

!build

Copy link
Collaborator

@naoyam naoyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

//! 2. When the compiled kernel is launched the first time, the
//! cache will be in `recording` phase and all the computed information
//! should be captured and written into the cache.
//! 2. When a kernel is created fior the first time, entries will be
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo:

Suggested change
//! 2. When a kernel is created fior the first time, entries will be
//! 2. When a kernel is created for the first time, entries will be

csrc/scheduler/compile_time_info.h Show resolved Hide resolved
@csarofeen
Copy link
Collaborator Author

!build

@csarofeen
Copy link
Collaborator Author

!build

@csarofeen csarofeen merged commit 92b6351 into main Sep 22, 2024
5 checks passed
@csarofeen csarofeen deleted the heuristic_summary branch September 22, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants