Skip to main content

geometric-nn-ops

Vendor-neutral GPU kernels (forward + backward) for geometry-aware neural nets, written in Triton that run on both AMD/ROCm and NVIDIA.

Kernels are namespaced by family:

  • geometric_nn_ops_torch.triangle — protein-folding (triangle) ops.
    • triangle_attention (forward + backward)
    • triangle_multiplicative_update (Triton forward; pure-torch differentiable fallback)
    • attention_pair_bias (pure torch; no Triton kernel yet)

Install

Install PyTorch for your platform first, following the PyTorch instructions. Otherwise pip installs the default PyTorch build from PyPI, which on Linux targets NVIDIA CUDA rather than AMD ROCm.

pip install geometric-nn-ops-torch

For an editable install from source instead:

git clone https://github.com/AMDResearch/geometric-nn-ops.git
cd geometric-nn-ops/
pip install -e .  # the kernels

Usage

from geometric_nn_ops_torch.triangle import triangle_attention

o = triangle_attention(q, k, v, bias=pair_bias, mask=mask, scale=scale)

See the docstring for the appropriate tensor layouts and other options.

from geometric_nn_ops_torch.triangle import triangle_multiplicative_update

z = triangle_multiplicative_update(x, direction="outgoing", mask=mask, **weights)

triangle_multiplicative_update matches the cuequivariance signature (concatenated [a; b] p_in/g_in projections). It runs the Triton fast path for inference and auto-falls back to a pure-torch differentiable implementation when gradients are needed or no GPU/Triton is available.

fp32 matmul precision

For fp32 inputs, these ops read torch.backends.cuda.matmul.fp32_precision. In the Triton kernels, "tf32" resolves in the same way as torch.set_float32_matmul_precision("high") to whatever reduced-precision fp32 matmul the target has with at least TF32 precision — TF32 tensor cores on NVIDIA Ampere and above, XF32 MFMA on AMD CDNA3, bf16 emulation elsewhere — and to full fp32 where there is none.

Packages

The geometric-nn-ops repository publishes two separately installable packages:

  • geometric-nn-ops-torch: the portable Triton kernels and their direct, vendor-neutral API. This is the recommended dependency.
  • hipequivariance-ops-torch: an optional zero-code-change shim that implements the API of NVIDIA's cuequivariance_ops_torch under the same module name and routes into these kernels. It translates any API differences. This is provided as a convenience for codebases already integrated with cuequivariance. For long term stability, we suggest using the direct dependency where possible.

License

Apache-2.0. Copyright Advanced Micro Devices, Inc. See LICENSE.

Metadata

Release files for geometric-nn-ops-torch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geometric-nn-ops-torch 0.1.0
File Size Uploaded Provenance Actions
geometric_nn_ops_torch-0.1.0.tar.gz 62.9 kB With provenance Details for geometric_nn_ops_torch-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geometric-nn-ops-torch 0.1.0
File Interpreter ABI Platform Actions
geometric_nn_ops_torch-0.1.0-py3-none-any.whl Python 3 none any Details for geometric_nn_ops_torch-0.1.0-py3-none-any.whl

Total release size: 96.9 kB

Release files / geometric_nn_ops_torch-0.1.0.tar.gz

Download URL geometric_nn_ops_torch-0.1.0.tar.gz
Size 62.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9dbbdb665ae5703b7e2baf44cb5719f0f5b391a40246fe7a0eba9751d8240314
BLAKE2b-256 checksum
How to use checksums
ebd848f58698809e5f28d3fb8fedd44ed384ff7f66ca5add7913d40d82f45681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / geometric_nn_ops_torch-0.1.0-py3-none-any.whl

Download URL geometric_nn_ops_torch-0.1.0-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77f72a6d775c9ac0e6fa749b1dc7b5817d4b8584aaf7d3c749ed16f0875d6174
BLAKE2b-256 checksum
How to use checksums
4b4d4904ea94b2bcd038d6286efbd06ccc382851d5ebcc8a723e1314b9483b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for geometric-nn-ops-torch 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for geometric_nn_ops_torch-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page