From 6e7587a75ce6d0c38d2e281e643e001c5cd41454 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 11 Mar 2026 23:35:56 -0700 Subject: [PATCH] modeld: quiet do_chunk output during scons build (#37654) * modeld: quiet do_chunk output during scons build SCons default-prints Python function actions with all their args. The do_chunk function has 1259 tinygrad source files as deps, causing a wall of text during builds. Wrap in SAction with a short strfunction. Co-Authored-By: Claude Opus 4.6 * split compile and chunk into separate Commands cleaner fix: do_chunk only depends on the pkl, not tinygrad files Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Claude Opus 4.6 --- selfdrive/modeld/SConscript | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/selfdrive/modeld/SConscript b/selfdrive/modeld/SConscript index 95ac06bb1..3f38324a6 100644 --- a/selfdrive/modeld/SConscript +++ b/selfdrive/modeld/SConscript @@ -45,13 +45,17 @@ def tg_compile(flags, model_name): pkl = fn + "_tinygrad.pkl" onnx_path = fn + ".onnx" chunk_targets = get_chunk_paths(pkl, estimate_pickle_max_size(os.path.getsize(onnx_path))) + compile_node = lenv.Command( + pkl, + [onnx_path] + tinygrad_files + [chunker_file], + f'{pythonpath_string} {flags} {image_flag} python3 {Dir("#tinygrad_repo").abspath}/examples/openpilot/compile3.py {fn}.onnx {pkl}', + ) def do_chunk(target, source, env): chunk_file(pkl, chunk_targets) return lenv.Command( chunk_targets, - [onnx_path] + tinygrad_files + [chunker_file], - [f'{pythonpath_string} {flags} {image_flag} python3 {Dir("#tinygrad_repo").abspath}/examples/openpilot/compile3.py {fn}.onnx {pkl}', - do_chunk] + compile_node, + do_chunk, ) # Compile small models