IAM

DAVIDSTUTZ

TAG»C«

07thNOVEMBER2022

PROJECT

A C++ implementation of density forests.

More ...

17thAUGUST2022

PROJECT

A template for extending PyTorch using C/CUDA operations.

More ...

17thAUGUST2022

PROJECT

Basic and advanced torch examples, template for implementing custom C/CUDA modules and implementations of variational auto-encoders.

More ...

ARTICLE

Implementing Custom PyTorch Tensor Operations in C and CUDA

PyTorch, alongside TensorFlow, has become standard among deep learning researchers and practitioners. While PyTorch provides a large variety in terms of tensor operations or deep learning layers, some specialized operations still need to be implemented manually. In cases where runtime is crucial, this should be done in C or CUDA for supporting both CPU and GPU computation. In this article, I want to provide a simple example and framework for extending PyTorch with custom C and CUDA operations using CFFI for Python and CuPy.

More ...