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

simplify back-end selection in brun, and fix auto-detection #92

Merged
merged 1 commit into from
Oct 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions clvm_tools/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,18 @@ def launch_tool(args, tool_name, default_stage=0):
try:
output = "(didn't finish)"

use_rust = (
(tool_name != "run")
and not pre_eval_f
and (
args.backend == "rust"
or (run_chia_program and args.backend != "python")
if args.backend == "rust":
use_rust = True
elif args.backend == "python":
use_rust = False
else:
use_rust = (
tool_name != "run"
and not pre_eval_f
and run_chia_program
and args.stage.__name__ == "stages.stage_0"
)
and args.stage == 0
)

max_cost = args.max_cost
if use_rust:
time_parse_input = time.perf_counter()
Expand Down