newton-performance
Measure or improve the runtime, startup time, memory use, or throughput of a Newton simulation that already behaves correctly, or review a Newton step loop for performance problems such as CUDA graph capture mistakes and host synchronization. Not for setting up simulations, general solver or API que
- 01Installs
- New
- 02Files scanned
- 5
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 f7534651f27e0ce2… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Newton Performance
Make a correct Newton workload faster without changing its results. Newton's documentation holds the technical guidance; this skill orders the work and defines what counts as evidence.
1. Scope the request
- If the simulation is unstable, produces invalid states, or the user's goal is
correctness rather than speed, use
newton-usageinstead and stop here. - Decide the mode. A plan request (how should I profile or optimize this?) gets a documentation route and one bounded experiment. A review request (is this loop correct and fast?) gets findings against the documentation. In both, reading code and documentation is fine, but do not run the simulation, benchmarks, or profilers unless asked. A measure or implement request runs the workflow below.
- Record the workload, the objective, and the timing scope. Keep these scopes separate, because they have different causes: startup (import, model build, kernel compilation), warm stepping, rendering, host/device transfers, memory, and training throughput.
- Record the fidelity checks that must still pass after a change, for example finite state, no contact overflow, and a trajectory or force metric against a reference run.
2. Gather context once
Reuse facts the user already gave. Otherwise run once:
python -c "import sys, newton; from importlib.metadata import version; print(sys.executable, version('newton'), version('warp-lang'), newton.__file__)"
Check GPU availability only when the experiment depends on it. If the workload, a required profiler, or required permissions are missing, report exactly what is missing and stop. If elevated privileges are needed (for example GPU performance counters), give the exact command for the user to run and stop.
3. Route to the documentation
Use the Newton documentation for the installed release,
https://newton-physics.github.io/newton/<version>/, and flag a mismatch
before relying on an API or default. Open only the page the task needs; paths
are relative to that root:
concepts/simulation_tuning.html: trading substeps, iterations, and contact settings against accuracy.concepts/collisions.html: broad phase, geometry, contact capacity, and collision frequency.solvers/index.htmland the API reference: solver options, capacities,ModelFlags, andState.assignfor odd substep counts in a captured frame.- Warp's Profiling page for instrumentation and timing, under the installed
Warp version's documentation,
https://nvidia.github.io/warp/v<major>.<minor>/. The page path differs between Warp versions, so find it from that version's index. If that version is not published, usestableand flag the mismatch.
Cite the page and section each recommendation relies on.
When the user only needs a documentation location, give the URL without opening it.
4. Measure, change, verify
- Measure a reproducible baseline for the recorded workload and timing scope.
- Choose the profiling path for that scope: startup (import, model build, compilation), eager stepping, or captured-graph replay. Each needs different tools and timing boundaries; Warp's profiling guide gives the tools. Exclude warm-up, compilation, and the first graph launch from steady-state timing, synchronize at the timing boundaries, and add only the instrumentation the question needs.
- Collect the profile and inspect it: identify the dominant kernels, gaps, or synchronization points, and state the evidence. Do not choose a change before this step, and do not start from universal tuning values.
- Select a documented lever whose accuracy tradeoff fits the task. Change one factor at a time. When settings interact (for example collision frequency, contact model, mesh resolution, and gap), run a small bounded sweep over the coupled set instead.
- Repeat before and after measurements under the same conditions and instrumentation to estimate variance, and re-run the fidelity checks from section 1.
- Keep a change only if it meets the objective and passes the fidelity checks; otherwise revert it.
5. Review checks
When reviewing a Newton step loop, check these against the documentation selected in section 3 and cite the page:
- the whole frame, including collision, is captured in one graph and warmed up before capture;
- an odd substep count with a plain state swap inside a captured frame;
- arrays replaced instead of written in place after capture, or Python values expected to change between replays;
- host reads (
.numpy(), contact counts, printing) inside the frame; - capacities sized from defaults rather than measured peaks, and overflow never checked;
- rendering or logging inside the substep loop, or included in simulation timings.
Credit any correct fix the documentation supports, not only the first one listed there.
6. Report
Report the Newton and Warp versions, the environment, the documentation used, the workload and timing scope, the change, the before and after measurements with variance, the fidelity evidence, and the largest remaining cost or blocker. Label proposed experiments separately from measurements actually collected. CPU measurements or source inspection do not establish a GPU speedup.
Compatibility with specific Newton releases has not been validated.
Files
5- BENCHMARK.md
33adcb5d3a11.8 KB - SKILL.md
1a2e149b8c5.7 KB - evals/EVAL.md
83ee5278701.9 KB - evals/evals.json
da7ac3dbc713.4 KB - skill-card.md
3d9369ed067.7 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from NVIDIA/skills8
Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV/Parquet I/O, nullable semantics, and multi-GPU DataFrame workloads.
Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.
Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.
Customize NVIDIA Nemotron Voice Agent's Generic Pipecat example for healthcare appointment, five-field patient intake, or custom tool-calling workflows without a separate backend.
Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.
Run end-to-end calibration on the shipped sample dataset (sdg_08_2_sample_data_010926.zip) against a running AMC microservice. Use when user says 'test sample dataset', 'run sample calibration', 'verify AMC install', or 'launch and test'.
Calibrates pre-recorded `cam_*.mp4` datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live RTSP streams to `amc-run-rtsp-calibration`.
Launch AutoMagicCalib microservice and web UI from NGC release images via Docker Compose. Use when user says 'deploy auto calibration', 'launch auto calibration', 'launch AMC', 'start MS+UI', or 'set up auto-magic-calib'. Requires NGC API key.
Related tooling skillsscan passed
Web performance regression detection. Use for: web performance benchmark, check page speed. (gstack)
Troubleshoots Google Cloud Gemini Enterprise Agent Platform issues across Agent Gateway, Agent Connectivity Templates (ACT), Agent Registry, Agent Identity, Identity-Aware Proxy (IAP), Unified Access Policies (UAP), Model Armor, Semantic Governance Policies (SGP), Cloud DNS peering, Private CA Trust
Find the mistakes agents keep repeating in this repo and make each impossible at the highest enforcing level — lint rule, type guard, runtime check, script, then text — with every enforcement proven to fire.
Optimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.
Diagnose ambiguous failures before editing. Use for unknown causes, intermittent behavior, performance regressions, or investigations needing evidence-ranked hypotheses.
Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management. For new projects and projects without a Wrangler configuration file, use the cf CLI instead.