Tensor Comprehensions

Tensor Comprehensions (TC) accelerates development by automatically generating efficient GPU code from high-level mathematical operations. TC is a C++ library and mathematical language that helps bridge the gap between researchers, who communicate in terms of mathematical operations, and engineers who are focused on running large-scale models.

Boost productivity

Tensor Comprehensions (TC) is based on generalized Einstein notation for computing on multi-dimensional arrays. It greatly simplifies the development of new operations by providing a concise and powerful syntax which can be automatically and efficiently translated into high-performance computation CUDA kernels.

Tensor Comprehensions provides a lightweight and seamless integration with PyTorch.

Tensor Comprehensions for 2D average pooling

Get Started


Set up or install Anaconda if you don't already have it.

$ export PATH=$HOME/anaconda3/bin:$PATH


Install Tensor Comprehensions.

$ conda install -y -c pytorch -c tensorcomp tensor_comprehensions


Review the tutorial and documentation to familiarize yourself with how to use Tensor Comprehensions.

More Tools