$npx skillfedfor your agent

hoptorch

Compatibility helpers for PyTorch higher-order operators.

With conditionsPyPI Python ModulesReleased Jun 202687.9K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — hoptorch-0.1.4-py3-none-any.whl
v0.1.4 · released 2026-06-05 · Python >=3.10 · 2 runtime deps: torch, pyvers

Yes, if you need scan and want version/device safety. The low install friction, permissive license, and active maintenance make it reasonable. However, it is early-stage (Alpha) with minimal real-world usage; test thoroughly in your environment before relying on it in production.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires torch>=2.7 and pyvers>=0.2.2; Python >=3.10
  • Low friction: pure Python wheel with only torch and pyvers as runtime dependencies.
  • Active maintenance with recent release, though early-stage (Alpha) and minimal community adoption.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions.

last release 2026-06-05 (70 days) · last repo commit 2026-06-05 · 1 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 87,914 downloads/mo, #13,761 on PyPI

Verify before relying

pip install hoptorch

import torch
from hoptorch import scan
from hoptorch.scan import ensure_scan_backward

if ensure_scan_backward("cpu"):
    xs = torch.arange(4.0)
    def step(carry, x):
        next_carry = carry + x
        return next_carry, next_carry.clone()
    carry, ys = scan(step, torch.zeros(()), xs)
  • Whether the eager scan backport for PyTorch 2.7 covers all use cases or has known limitations.
  • Real-world performance overhead of the health check and lazy patching on typical scan workloads.
  • Scope of PyTorch internals patched and stability across minor PyTorch releases.
Same gist for agents: .md · .json

What it is and what it does

hoptorch is a thin compatibility layer for PyTorch's scan operator, which is part of PyTorch's higher-order operator suite. It wraps torch._higher_order_ops.scan with a health check that verifies scan backward is working on your device before you use it, then lazily applies version-specific patches to PyTorch internals if needed. For PyTorch 2.7, where scan backward is not yet implemented, hoptorch provides a small eager scan implementation that uses ordinary autograd instead.

The package is designed to let you write scan code once and have it work reliably across PyTorch versions and devices. It includes utilities to check whether scan is available, to warm the health check before torch.compile, and to inspect why scan might be unavailable on a given device. The health check fails closed during Dynamo tracing to avoid false positives.

Use it for

  • Use it to safely call torch.scan in production code without worrying about device-specific or version-specific backward failures.
  • Use it to backport scan functionality to PyTorch 2.7 environments where native scan backward is not available.
  • Use it to warm scan health checks before compiling functions with torch.compile to avoid tracing overhead.
  • Use it to diagnose why scan backward is unavailable on a specific device or PyTorch version.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need scan and want version/device safety.

The low install friction, permissive license, and active maintenance make it reasonable. However, it is early-stage (Alpha) with minimal real-world usage; test thoroughly in your environment before relying on it in production.

Install

hoptorch on PyPI

Before you install

Low friction: pure Python wheel with only torch and pyvers as runtime dependencies. Active maintenance with recent release, though early-stage (Alpha) and minimal community adoption.

Requires torch>=2.7 and pyvers>=0.2.2; Python >=3.10

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions.

Quickstart

pip install hoptorch

import torch
from hoptorch import scan
from hoptorch.scan import ensure_scan_backward

if ensure_scan_backward("cpu"):
    xs = torch.arange(4.0)
    def step(carry, x):
        next_carry = carry + x
        return next_carry, next_carry.clone()
    carry, ys = scan(step, torch.zeros(()), xs)

Verify before relying

  • Whether the eager scan backport for PyTorch 2.7 covers all use cases or has known limitations.
  • Real-world performance overhead of the health check and lazy patching on typical scan workloads.
  • Scope of PyTorch internals patched and stability across minor PyTorch releases.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
torchpyvers
MaintenanceActively maintained 70 days since the last release
Last repo commit
First released
Downloads87,914 / month, #13,761 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: Libraries :: Python Modules

Evidence: hoptorch-0.1.4-py3-none-any.whl

Tags

Capabilities
pytorch scan operator wrapperhigher-order operators pytorchtorch scan backward compatibilitypytorch autograd scanscan operator device check
Topics
pytorch-compathigher-order-ops
PyPI keywords
pytorchtorchscanhigher-order-operatorsautograd

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytorch scan operator wrapper”

  • hoptorchProvides a safe wrapper around PyTorch's scan operator that checks…
  • picklescanScans Python Pickle files and related serialized model formats to…
  • torch-directmlEnables PyTorch to use DirectML for GPU acceleration on DirectX…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also torch · torch-einops-utils · cuequivariance-ops-torch-cu12 · torch-npu · pytorch · onnx2torch · torchviz · depyf · torch-directml · opt-einsum-fx