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

[Autotuner] Improve unit test reliability 1 #2538

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

luarss
Copy link
Contributor

@luarss luarss commented Oct 31, 2024

No description provided.

Copy link
Collaborator

@oharboe oharboe left a comment

Choose a reason for hiding this comment

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

have you considered python mocking to avoid processes that you have to start and stop?

tools/AutoTuner/Makefile Show resolved Hide resolved
@luarss
Copy link
Contributor Author

luarss commented Nov 1, 2024

have you considered python mocking to avoid processes that you have to start and stop?

That is a good idea, I originally intended it to be as close to the real runtime environment as possible but if tests continue to fail this might be the move.

@luarss luarss changed the title [Autotuner] Improve reliability 1 [Autotuner] Improve unit test reliability 1 Nov 1, 2024
@oharboe
Copy link
Collaborator

oharboe commented Nov 1, 2024

have you considered python mocking to avoid processes that you have to start and stop?

That is a good idea, I originally intended it to be as close to the real runtime environment as possible but if tests continue to fail this might be the move.

I'm thinking it is going to be both. I've been using bazel-orfs in an autotuner like capacity and the biggest problem I currently have is error handling and resource management. @jeffng-or and I launched an exploration run of, for instance, MAX_UNGROUP_SIZE and also we wanted to do the runs through grt.

The MAX_UNGROUP_SIZE never really completed, but I was able to look at the results that I got and I used them to plot the progress and the conclusion was trivial: there is no correct value of MAX_UNGROUP_SIZE, instead we have to first create a macro placement with SYNTH_HIERARCHICAL=1, but we have to throw away the result of that run and use that result in a run with SYNTH_HIERARCHICAL=0.

For the grt runs, the problem is that this part of the flow can't run in parallel with other runs, since it will then make the servers run out of memory and the servers will crash. I plan to fix bazel-orfs such that it has a rudimentary knowledge of which steps can run in parallel and which cannot. I think grt, route and macro placement have to run alone in a server, whereas the other stages can run in parallel. I need instrumentation in bazel-orfs to track the resident memory set to see what can run in parallel or not. Possibly I have to do a trial run from start to end, then track the memory requirements and CPU usage and come up with some sort of provisioning plan.

@luarss luarss requested a review from vvbandeira December 25, 2024 06:06
@luarss luarss marked this pull request as ready for review December 25, 2024 06:06
@luarss luarss added the autotuner Flow autotuner label Dec 25, 2024
@luarss luarss mentioned this pull request Jan 9, 2025
tools/AutoTuner/Makefile Outdated Show resolved Hide resolved
@luarss luarss force-pushed the topic/at-reliable branch from 03516f0 to 7a48e12 Compare January 10, 2025 14:22
@luarss luarss marked this pull request as draft January 10, 2025 17:36
success=false

while [[ $retry_count -lt $max_retries ]]; do
if pip3 cache purge && pip3 install --no-cache-dir -U -r "$script_dir/requirements.txt"; then
Copy link
Member

Choose a reason for hiding this comment

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

Is cache purge required with the --no-cache-dir option or are they redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not mutually exclusive. Pip cache purge might be needed if system had cache before, and no cache dir just ensures no future caching is done.

luarss and others added 4 commits January 21, 2025 12:58
* context: pip install fails on large files due to network instability

Signed-off-by: Jack Luar <[email protected]>
@luarss luarss force-pushed the topic/at-reliable branch from 109679e to 9b0671c Compare January 21, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autotuner Flow autotuner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants