warp
AGENTS.md7.2k starsChanged 3 months agoApache-2.0View on GitHub
Run uvx pre-commit run --files <files> to format changed files, or -a for all files. Rebuild native libraries only after changes to warp/native/ C++/CUDA code: Build docs (~1 min) with uv run --extra docs build_docs.py 2>&1 | tee /tmp/build_docs.log so you can inspect warnings without re-running. - If opening a pull request on GitHub, use the template in .github/PULL_REQUEST_TEMPLATE.md. - If opening a merge request on GitLab, use the template in .gitlab/merge_request_templates/Default.md. If a GitHub issue exists for the change,…
Trending
Quiet since May.about the whole repository
Who's talking about NVIDIA/warp
- A Hacker News story“Nvidia Warp: A Python framework for high performance GPU simulation and graphics”Hacker News · Jun 14, 2024 · 490 points
- NixOS/nixpkgs“python3Packages.warp-lang: init at 1.7.2.post1”GitHub · Jun 1, 2025 · 2 reactions
- @bradyajohnston.bsky.social“This is just using the features that warp ships with (github.com/NVIDIA/warp). Just using the built-in XPBD …”Bluesky · Nov 14, 2024 · 2 likes
- mujocolab/mjlab“Use of deprecated `warp` symbols breaks compatibility with 1.13”GitHub · May 4, 2026 · 1 reactions
- NixOS/nixpkgs“python3Packages.warp-lang: 1.9.1 -> 1.10.0”GitHub · Nov 16, 2025 · 1 reactions
The biggest 5 of 15 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 15
Talked about on GitHub, Bluesky and Hacker News (15 times).
On GitHub · 7
- Jun 1, 2025python3Packages.warp-lang: init at 1.7.2.post1 — NixOS/nixpkgs2 reactions · 6 comments
- May 4, 2026Use of deprecated `warp` symbols breaks compatibility with 1.13 — mujocolab/mjlab1 reaction · 1 comment
- Nov 16, 2025python3Packages.warp-lang: 1.9.1 -> 1.10.0 — NixOS/nixpkgs1 reaction · 3 comments
- Nov 6, 2025Adding newton.sensors.TiledCameraSensor with warp-raytrace — newton-physics/newton1 reaction · 9 comments
- Jul 3, 2025python3Packages.warp-lang: 1.7.2.post1 -> 1.8.0 — NixOS/nixpkgs1 reaction · 5 comments
2 more on GitHub
- Sep 12, 2024[API] Add `__cuda_array_interface__` for eager Tensor — PaddlePaddle/Paddle1 reaction · 1 comment
- Sep 29, 2023GPU Parallelization using WARP — tud-amr/fabrics1 reaction · 2 comments
On Bluesky · 7
- Nov 14, 2024This is just using the features that warp ships with (github.com/NVIDIA/warp). Just using the built-in XPBD particle physics + rigid… — @bradyajohnston.bsky.social2 likes and reposts · 1 reply
- Jul 21, 2025I enjoy working with Warp for python based GPU programming (github.com/NVIDIA/warp), and Slang (github.com/shader-slang...) for GPU interop… — @rohansawhney.bsky.social1 likes and repost · 2 replies
- Jun 19, 2024Bonjour et bon mercredi ! Si vous cherchez un framework pour faire des simulations et calculs graphiques, voici warp, conçu par NVIDIA et… — @ponceto91.bsky.social1 likes and repost
- Jun 16, 2024🎉 Celebrating! 🎉 (500+ new stars) 📦 NVIDIA / warp ⭐ 2,585 (+649) 🗒 Python A Python framework for high performance GPU simulation and… — @github-trending.bsky.social1 likes and repost · 1 reply
- Jun 15, 2024GitHub - NVIDIA/warp: A Python framework for high performance GPU simulation and graphics https://github.com/NVIDIA/warp — @tech-trending.bsky.social1 likes and repost
2 more on Bluesky
- Jun 15, 2024Nvidia Warp: A Python framework for high performance GPU simulation and graphics Nvidia Warp:高性能GPUシミュレーションとグラフィックスのためのPythonフレームワーク 🔺 322… — @hacker-news-jp.bsky.social1 likes and repost · 1 reply
- Jun 14, 2024Nvidia Warp: A Python framework for high performance GPU simulation and graphics Discussion — @hackernewsbot.bsky.social1 likes and repost
On Hacker News · 1
- Jun 14, 2024Nvidia Warp: A Python framework for high performance GPU simulation and graphics490 points · 136 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- warp-changelog-auditSkill
- warp-closing-issueSkill
- warp-release-auditSkill
- warp-release-notesSkill
- warp-changelog-auditSkill
- warp-closing-issueSkill
- warp-release-auditSkill
- warp-release-notesSkill
- warp-compile-time-optimizerSkill
- warp-debug-gradientsSkill
- warp-evalSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
33 rules. About 0 are common, 5 are distinctive, and 28 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
28
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
Prefer uv run to run Python (uv run script.py, uv run -m module_name, uv run python -c "..."), or activate .venv first.
- Very specific: line 6
If warp/bin/ is empty, build first with build_lib.py (or --quick).
- Very specific: line 7
Never use python -c "..." to run temporary scripts that define @wp.kernel functions—always write to a .py file because Warp's codegen calls …
- Very specific: line 8
Always capitalize proper names in docstrings and error messages (NumPy, not numpy.
- Very specific: line 9
Use subscript syntax for Warp array types in annotations and overload signatures, such as wp.array2d[float].
- Very specific: line 10
Create a feature branch before committing—never commit directly to main.
- Very specific: line 11
Always use imperative mood in commit messages ("Fix X", not "Fixed X"), ~50 char subject, reference issues as (GH-XXX).
- Very specific: line 12
Always use git commit --signoff (or -s) to add a Signed-off-by line (DCO).
- Very specific: line 17
Run uvx pre-commit run --files <files> to format changed files, or -a for all files.
- Distinctive: line 21
Only use if CUDA driver version ≥ Toolkit version
- Very specific: line 22
Check: nvidia-smi (driver) vs Toolkit (set via WARP_CUDA_PATH, CUDA_HOME, CUDA_PATH, or which nvcc)
- Very specific: line 28
If opening a pull request on GitHub, use the template in .github/PULL_REQUEST_TEMPLATE.md.
- Very specific: line 29
If opening a merge request on GitLab, use the template in .gitlab/merge_request_templates/Default.md.
- Distinctive: line 30
Never set, change, or clear assignees or reviewers on GitHub pull requests or GitLab merge requests unless explicitly asked.
- Very specific: line 31
Follow changelog/README.md: add a fragment when a change affects users, and do not edit CHANGELOG.md directly.
- Very specific: line 37
Keep warp/tests/ for core Warp Python library unit tests.
- Very specific: line 41
Always use unittest, not pytest.
- Very specific: line 43
Run all tests (~10-20 min): uv run --extra dev -m warp.tests -s autodetect
- Very specific: line 44
Run all tests in a specific file: uv run warp/tests/test_modules_lite.py
- Very specific: line 45
Prefer running multiple test classes in parallel over running test files one at a time in a loop: uv run --extra dev -m warp.tests -s …
- Very specific: line 46
Always add new test modules to default_suite in warp/tests/unittest_suites.py.
- Very specific: line 47
Use standard unittest.TestCase methods when tests target a fixed device (e.g., CPU-only).
- Distinctive: line 48
Avoid timing-based assertions (e.g., asserting speedup ratios)—they are flaky in parallel CI environments with variable CPU load.
- Very specific: line 49
Never call wp.clear_kernel_cache() or wp.clear_lto_cache() in test files—not in __main__ blocks, test methods, or module scope.
- Very specific: line 50
Use np.testing.assert_allclose() instead of np.allclose() for detailed error messages on failure.
- Distinctive: line 55
Follow Google-style docstrings.
- Very specific: line 57
Document __init__ parameters in the class docstring, not the __init__ method
- Distinctive: line 58
Don't repeat default values from signatures—Sphinx autodoc shows them automatically
- Very specific: line 59
Use double backticks for code elements and parameter cross-references (RST syntax): `
data,.nvdb—not italics (*data*`) - Very specific: line 60
Use attribute docstrings ("""...""" after members) for enum/class constant docs, not #: comments—Sphinx supports both but only attribute …
- Very specific: line 61
Use Sphinx roles for cross-references: :class:warp.array
, :func:warp.launch, :mod:warp.render, :attr:FILTER_LINEAR - Very specific: line 69
Always import from warp in public-facing code, not warp._src.
- Very specific: line 71
Use the DeviceLike type annotation (from warp._src.context) for device parameters.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Warp Development Guidelines
- Prefer
uv runto run Python (uv run script.py,uv run -m module_name,uv run python -c "..."), or activate.venvfirst. Do not use the system Python directly.- With extras:
uv run --extra dev -m warp.tests - With additional packages:
uv run --with rich script.py
- With extras:
- If
warp/bin/is empty, build first withbuild_lib.py(or--quick). - Never use
python -c "..."to run temporary scripts that define@wp.kernelfunctions—always write to a.pyfile because Warp's codegen callsinspect.getsourcelines(), which fails for code not in a file. - Always capitalize proper names in docstrings and error messages (NumPy, not numpy; Warp, not warp).
- Use subscript syntax for Warp array types in annotations and overload signatures, such as
wp.array2d[float]. Do not use factory syntax, such aswp.array2d(dtype=float), unless a test specifically covers factory-style compatibility. - Create a feature branch before committing—never commit directly to
main. Useusername/short-description. - Always use imperative mood in commit messages ("Fix X", not "Fixed X"), ~50 char subject, reference issues as
(GH-XXX). Body explains why, not what. - Always use
git commit --signoff(or-s) to add aSigned-off-byline (DCO). - CI lives in both GitLab (
.gitlab-ci.yml) and GitHub (.github/workflows/). Lightweight jobs (linting, docs, packaging) may exist in both—keep them in sync. GPU-dependent jobs differ by platform. - Pin GitHub Actions to commit hashes, not tags, and add a comment with the corresponding tag. Good:
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v4. Bad:uses: astral-sh/setup-uv@v4. The internalnv-gha-runners/setup-proxy-cacheaction is exempt and may use@main. - Let uv infer Python version from
.python-version. Useuv python installwithout arguments.
Run uvx pre-commit run --files <files> to format changed files, or -a for all files. Rebuild native libraries only after changes to warp/native/ C++/CUDA code:
- Standard build:
uv run build_lib.py(~5 min) - Quick build:
uv run build_lib.py --quick(~2-4 min)- Only use if CUDA driver version ≥ Toolkit version
- Check:
nvidia-smi(driver) vs Toolkit (set via WARP_CUDA_PATH, CUDA_HOME, CUDA_PATH, orwhich nvcc)
Build docs (~1 min) with uv run --extra docs build_docs.py 2>&1 | tee /tmp/build_docs.log so you can inspect warnings without re-running.
PR Instructions
- If opening a pull request on GitHub, use the template in
.github/PULL_REQUEST_TEMPLATE.md. - If opening a merge request on GitLab, use the template in
.gitlab/merge_request_templates/Default.md. If a GitHub issue exists for the change, end the MR title with a reference (e.g.,[GH-123]). - Never set, change, or clear assignees or reviewers on GitHub pull requests or GitLab merge requests unless explicitly asked; leave values added by users, automation, or project defaults untouched.
- Follow
changelog/README.md: add a fragment when a change affects users, and do not editCHANGELOG.mddirectly. - For complex features, consider adding a design doc in
design/. Seedesign/README.mdfor guidelines.
Tests
- Keep
warp/tests/**for core Warp Python library unit tests. Do not add meta-tests there for docs config, CI/release scripts, packaging, or test harness machinery; verify those workflows directly instead.
Always use unittest, not pytest.
- Run all tests (~10-20 min):
uv run --extra dev -m warp.tests -s autodetect - Run all tests in a specific file:
uv run warp/tests/test_modules_lite.py - Prefer running multiple test classes in parallel over running test files one at a time in a loop:
uv run --extra dev -m warp.tests -s autodetect -k TestArray -k TestCodeGen -k TestFunc - Always add new test modules to
default_suiteinwarp/tests/unittest_suites.py. - Use standard
unittest.TestCasemethods when tests target a fixed device (e.g., CPU-only). Useadd_function_test()only when tests need to run across multiple devices viaget_test_devices(). - Avoid timing-based assertions (e.g., asserting speedup ratios)—they are flaky in parallel CI environments with variable CPU load.
- Never call
wp.clear_kernel_cache()orwp.clear_lto_cache()in test files—not in__main__blocks, test methods, or module scope. Cache clearing is not multi-process-safe; concurrent clears cause LLVM crashes. The test suite runner andbuild_lib.pyalready handle this. - Use
np.testing.assert_allclose()instead ofnp.allclose()for detailed error messages on failure. - Explicit synchronization is rarely needed for correct behavior—most operations (e.g.,
.numpy()) implicitly synchronize. The exception is unit tests where a test function doesn't call an implicit sync before returning; addwp.synchronize_device()there due to the async nature of the CUDA API. Preferwp.synchronize_device()overwp.synchronize()(the latter syncs all devices).
Docstrings
Follow Google-style docstrings. Use doctest for code examples where practical.
- Document
__init__parameters in the class docstring, not the__init__method - Don't repeat default values from signatures—Sphinx autodoc shows them automatically
- Use double backticks for code elements and parameter cross-references (RST syntax):
``data``,``.nvdb``—not italics (*data*) - Use attribute docstrings (
"""..."""after members) for enum/class constant docs, not#:comments—Sphinx supports both but only attribute docstrings work in VSCode/Pylance - Use Sphinx roles for cross-references:
:class:warp.array, `:func:`warp.launch,:mod:warp.render, `:attr:`FILTER_LINEAR - In
builtins.py, useArgs:andReturns:(Google style), not:param:and:returns:(RST style)
Codebase Internals
- The native library (
build_lib.py) statically embeds: NVRTC (CUDA runtime compiler, Linux/Windows only), LLVM/Clang (CPU kernel compiler), and libmathdx (cuBLASDx/cuFFTDx for tile operations, Linux/Windows only). - JIT compilation artifacts (
.cpp/.cufromcodegen.py,.cubin/.ptx/.o) live in a kernel cache directory (seewarp/_src/build.py:init_kernel_cache). - Refer to
warp/examples/for reference patterns for kernels, launches, and array usage. - Always import from
warpin public-facing code, notwarp._src. In internal code, import directly fromwarp/_src/modules. Public API is re-exported throughwarp/__init__.py. warp._src.utilsimportswarp._src.contextat module level—importing fromutilsin early-loaded modules (e.g.,texture.py) causes circular imports. Use lazy imports (from warp._src.utils import ... # noqa: PLC0415inside functions) when needed.- Use the
DeviceLiketype annotation (fromwarp._src.context) fordeviceparameters. In modules where importing it at runtime would create a circular import, import it underTYPE_CHECKING. - Native bindings use ctypes; function signatures are registered in
Runtime.__init__inwarp/_src/context.py.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

