v0.1.1
Index
What is Tensor Comprehensions?
Example of using TC with framework
Tensor Comprehension Notation
Examples of TC
Simple matrix-vector
Simple 2-D convolution (no stride, no padding)
Simple 2D max pooling
Semantics
Types
Data Layout
Variable Scoping
Implied Reductions and operators
Size Expressions
Statements
Expressions
Grammar
Range Inference
The Range Inference Algorithm
Preconditions
Worked Examples
Inverted indexing
Strided indexing with constant stride
Strided indexing with offsets
Strided indexing with dynamic stride
Constant fill using an exists clause
Relation to Halide
Use of Halide in TC
Mapping Options
How to choose starting mapping options?
Options API
Defaults provided
Available options
Impact on Performance
Possible compiler issues
Autotuner
Parameters for Autotuning
Caching
Performance of TC
Machine Learning with TC
Positioning of TC in ML Software stacks
Implications of ML Framework Integration
One TC function one kernel
No Variable Allocations
Graph Level
Minimal information to write ML layers concisely
C-style loops
Halide
TC
Matrix Languages
Integrating TC with ML framework
Step 1: DLpack support in framework
Step 2: Integrating TC
Coding Conventions
Use indices named after parameters
Prefix reduction index names with
r_
Filter non-rectangular regions with data-dependencies
Prefix gradient tensors names with
d_
A more complex example
PyTorch Integration
Getting Started
Installation
Example
Python API
High-level API
Low-level API
Caching and Configuration
Writing TC operations
Example
Specifying MappingOptions
Loading from cache
Autotuning
Fixed TC, varying input sizes
Pseudo-templating
Built-in Functions
More examples
Autograd with TC
Debugging
Example usage
Printing TC generated CUDA code
Frequently Asked Questions
TC language
How are temporary variables handled in TC?
Can I re-use a temporary variable?
Autotuner
At the start of a new generation, I see higher kernel runtimes, Why?
I sometimes see fluctuations in the best kernel time, why?
How do I stop autotuning early and save cache?
Installation
Installation Guide
Conda installation
Build from source
Prerequisites
Conda from scratch (first time configuration)
Activate conda in your current terminal
Build TC with dependencies supplied by conda
Test locally
Advanced / development mode installation
Optional dependencies
Cudnn version 7.1 in Caffe2 / dev mode
Installation in the Google Colaboratory environment
Step 1: Create new Notebook in the Google Research Colaboratory
Step 2: Create a new Code Cell, with the following code
Step 3: Use TC normally, from Python/Torch environment
Paper
Tech Report
Support
Contacts
Bugs and features
Mailing list
Contributions
Slack channel
Tensor Comprehensions
Docs
»
Overview: module code
All modules for which code is available
tensor_comprehensions
tensor_comprehensions.tclib