What's the difference between aten and c10?

What is aten?
And What is c10?
What’s the difference between aten and c10?
What’s the difference between cuda in aten and cuda in c10?

1 Like

generally they are different namespace with different code using for different purpose. Can you make your question more specific?

What is the purpose of the two and in what way is it different?

It is hard to say in several sentences. we have both aten and c10 folder for legacy reason, it just because pytorch has a long history, code has been refactored multiple times. aten is older then c10, and at some point, we decide to move/refactor some of the core pytorch code into a new folder, so we create c10. Nothing special for both aten and c10, they just contains different pieces of pytorch code which is contributed at different time.

2 Likes

ATen and c10 are both libraries used in PyTorch, a popular open-source machine learning framework.

ATen: This is the tensor library in PyTorch. It’s a namespace where the tensor operations and functions of PyTorch are defined. It’s built on top of the C++ standard library and is designed to be a replacement for Torch’s TH library. The name “ATen” might be a play on words, since it’s a ten-sor library.

c10: This is the core library for PyTorch. It contains the basic building blocks that PyTorch uses, including things like TensorImpl, the tensor metadata structure, and the dispatcher, which is responsible for routing operator calls to the correct kernel implementation. The name “c10” is short for “caffe2”, the deep learning framework that PyTorch merged with.

As for the differences between ATen and c10, as mentioned above, ATen is the tensor library, where all tensor operations are defined, whereas c10 is the core library, responsible for routing operator calls to the correct kernel implementation.

When it comes to CUDA in ATen and c10, it’s generally referring to the support for CUDA operations in these libraries. CUDA is a parallel computing platform and API model created by NVIDIA, which allows software developers to use a CUDA-enabled graphics processing unit (GPU) for general purpose processing.

3 Likes

FYI, the story behind “ATen” and “C10” can be found in ezyang’s blog.

  • aten/, short for “A Tensor Library” (coined by Zachary DeVito), is a C++ library that implements the operations of Tensors.
  • c10/, which is a pun on Caffe2 and A"Ten" (get it? Caffe 10) contains the core abstractions of PyTorch, including the actual implementations of the Tensor and Storage data structures.
1 Like