Skip to content
Proyectos

pytorch/extension-cpp

Ver en GitHub

pytorch/extension-cpp has 1,203 GitHub stars and 250 forks. GitHot measured 0 stars in 24 hours, -1 in 7 days, and 0 in 15 days. Last checked 2026-11-21 12:23 UTC. Last push 2026-11-10.

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
-1
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

Acerca de

C++ extensions in PyTorch

Aprendizaje automático

README.md

Original

C++/CUDA Extensions in PyTorch

This repository contains two example C++/CUDA extensions for PyTorch:

  1. extension_cpp - Uses the standard ATen/LibTorch API
  2. extension_cpp_stable - Uses the LibTorch Stable ABI

Both extensions demonstrate how to write an example mymuladd custom op that has both custom CPU and CUDA kernels.

extension_cpp (Standard ATen API)

Uses the full ATen/LibTorch API. This is the traditional way of writing PyTorch extensions. See this tutorial for more details.

extension_cpp_stable (Stable ABI)

Uses the LibTorch Stable ABI to ensure that the extension built can be run with any version of PyTorch >= 2.10.0, without needing to recompile for each PyTorch version.

The extension_cpp_stable examples require PyTorch 2.10+.

Building

To build extension_cpp (standard API):

cd extension_cpp
pip install --no-build-isolation -e .

To build extension_cpp_stable (stable ABI):

cd extension_cpp_stable
pip install --no-build-isolation -e .

Testing

To test both extensions:

python test/test_extension.py

Authors

Peter Goldsborough, Richard Zou

Explorar proyectos relacionados

Cargando…