AGENT SKILL

jax-backend

Use IKPy's optional JAX backend for CPU-safe JIT/AOT forward kinematics, autodiff Jacobians, and bounded SciPy inverse kinematics, with NumPy parity checks and explicit compilation and precision tradeoffs.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
jax-backend
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use IKPy's optional JAX backend for CPU-safe JIT/AOT forward kinematics, autodiff Jacobians, and bounded SciPy inverse kinematics, with NumPy parity checks and explicit compilation and precision tradeoffs.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

IKPy JAX backend

Use this sub-skill when an already-constructed IKPy Chain needs JAX-backed FK or IK. Install the optional extra first; JAX is not a base dependency and this skill never promises GPU acceleration.

Operating route

  1. Install ikpy[jax] and verify ikpy.JAX_AVAILABLE in the same Python environment that will run the chain.
  2. Obtain the chain through robot-model-import. JAX dispatch is intended for OriginLink and URDFLink chains (revolute, prismatic, or fixed); route general chain construction and semantics to chain-kinematics.
  3. Choose jax_precompile=True for predictable first-use latency or False for cheap cache creation and lazy first-call compilation. Run FK once and compare it with NumPy before using JAX IK.
  4. Call Chain.forward_kinematics(..., backend="jax") or Chain.inverse_kinematics(..., backend="jax"). For a trajectory, pass the previous full solution as initial_position.
  5. Read the linked references for exact signatures, solver kwargs, supported orientation modes, bounds, cache lifecycle, and failure recovery.

Hard rules

  • jax and jaxlib arrive through the optional jax extra: python -m pip install 'ikpy[jax]'.
  • CPU JAX proves only CPU execution. The package does not guarantee CUDA, accelerator plugins, or a GPU speedup. An explicit JAX_PLATFORMS=cpu run is the safe baseline.
  • The first JAX use can compile the cache. AOT/precompile trades longer cache creation for a faster first call; lazy mode moves compilation to the first operation. Neither mode persists a compiled binary across processes.
  • Verify NumPy/JAX FK with rtol=1e-5, atol=1e-5 (the repository's JAX tests' baseline) before trusting a result. Use x64 only when configured before JAX and cache creation.
  • DHLink is not a supported JAX execution path: extraction labels it as a separate type, but the JAX dispatch switch has no DH case. Unknown custom link classes raise ValueError. Use NumPy or convert the model through the appropriate importer.
  • Route robot loading to robot-model-import, general IK behavior to chain-kinematics, and plotting to visualization-geometry.

References

  • API reference — public dispatch, cache, IK kwargs, low-level JAX functions, and geometry signatures.
  • Workflows — installation, CPU-safe setup, parity, compilation choices, precompile/lazy use, and warm-start trajectories.
  • Troubleshooting — missing optional dependencies, precision, unsupported links, bounds, solver settings, and cache reuse.

The bundled scripts/smoke_jax.py is a deterministic, inline-chain smoke check. It supports --help, exits cleanly when JAX is absent, checks NumPy/JAX FK parity, and can run bounded JAX IK with --ik without requiring a GPU.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351