计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
advanced-backends-and-performance【效率与协作】Choose Hummingbird advanced backends and performance options: TorchScript, TVM, CUDA, threading, batching, and benchmark boundaries.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a Hummingbird task asks for TorchScript, TVM, CUDA/GPU execution, threading, batching, backend availability checks, or performance/benchmark guidance beyond the default CPU PyTorch path.
Natural triggers include: torchscript backend, torch.jit, convert to TVM, device='cuda', model.to('cuda'), GPU acceleration, n_threads, batch_size, TVM_MAX_FUSE_DEPTH, TVM_PAD_INPUT, and performance benchmark requests.
hummingbird.ml.convert(...) syntax, CPU PyTorch quick starts, and general prediction parity checks: core conversion.backend="torch"/"pytorch" for the lowest-friction local conversion and CPU validation.backend="torch.jit" or "torchscript" when the user needs a traced TorchScript artifact, TorchServe-style deployment, or a JIT-stabilized runtime. Provide representative test_input.backend="onnx" for ONNX runtime/export concerns, then route detailed model I/O to ONNX and model I/O. Non-ONNX source models need representative test_input.backend="tvm" only in a prepared TVM-capable environment. Provide representative test_input; treat its row count and shape as part of the compiled contract.device="cuda" or converted_model.to("cuda") only after proving the installed PyTorch build exposes CUDA and at least one visible CUDA device.test_input requirements, CUDA and TVM selection rules.N_THREADS, BATCH_SIZE, convert_batch, fixed-shape TVM prediction, and benchmark boundaries.Run the bundled probe before promising GPU or TVM support:
python scripts/check_backends.py --json
Only run the optional CUDA tensor smoke when the user explicitly wants a device-level check and the environment should touch CUDA:
python scripts/check_backends.py --json --cuda-smoke
If CUDA or TVM is absent, do not install packages blindly. Report the missing backend and give the user the compatibility decision they must make, especially for CUDA-specific PyTorch wheels and TVM's Python-version constraints.