Skip to content

Commit

Permalink
use cpu_budget default -1 to mean unlimited
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Luar <[email protected]>
  • Loading branch information
luarss committed Dec 24, 2024
1 parent f82aea6 commit 02aabf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/AutoTuner/src/autotuner/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,8 @@ def parse_arguments():
"--cpu_budget",
type=int,
metavar="<int>",
default=None,
help="CPU Hours",
default=-1,
help="CPU Hours (-1 means no limit.)",
)
parser.add_argument(
"--jobs",
Expand Down Expand Up @@ -921,7 +921,7 @@ def parse_arguments():
args.timeout = round(args.timeout * 3600)

# Calculate timeout based on cpu_budget
if args.cpu_budget is not None:
if args.cpu_budget != -1:
args.timeout = round(args.cpu_budget / os.cpu_count() * 3600)
args.timeout_per_trial = round(
args.cpu_budget / (args.jobs * args.resources_per_trial) * 3600
Expand Down

0 comments on commit 02aabf5

Please sign in to comment.