← all repositories

pytorch/extension-cpp

Example C++ and CUDA extensions for PyTorch demonstrating custom op implementation using ATen/LibTorch APIs.

1.2k stars Python ML Frameworks
extension-cpp
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

This repository provides two reference implementations of PyTorch custom operations written in C++ and CUDA. The extensions demonstrate both the standard ATen/LibTorch API and the newer Stable ABI approach for writing version-compatible custom ops. Both examples implement a simple mymuladd operation with CPU and CUDA kernels, serving as boilerplate for developers wanting to extend PyTorch’s backend with custom kernels.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.