What's the difference between aten and c10?

username: 111480
cooked: <p>What is aten?<br>
And What is c10?<br>
What’s the difference between aten and c10?<br>
What’s the difference between cuda in aten and cuda in c10?</p>

username: glaringlee
cooked: <p>generally they are different namespace with different code using for different purpose. Can you make your question more specific?</p>

username: 111480
cooked: <p>What is the purpose of the two and in what way is it different?</p>

username: glaringlee
cooked: <p>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.</p>

username: LogicPy
cooked: <aside class="quote no-group" data-username="111480" data-post="1" data-topic="114034" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/111480/48/35526_2.png" class="avatar"> 111480:</div>
<blockquote>
<p>What is aten?<br>
And What is c10?<br>
What’s the difference between aten and c10?<br>
What’s the difference between cuda in aten and cuda in c10?</p>
</blockquote>
</aside>
<p>ATen and c10 are both libraries used in PyTorch, a popular open-source machine learning framework.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>

username: Zichen_Wang
cooked: <p>FYI, the story behind “ATen” and “C10” can be found in <a href="http://blog.ezyang.com/2019/05/pytorch-internals/" rel="noopener nofollow ugc">ezyang’s blog</a>.</p>
<blockquote>
<ul>
<li>aten/, short for “A Tensor Library” (coined by Zachary DeVito), is a C++ library that implements the operations of Tensors.</li>
</ul>
</blockquote>
<blockquote>
<ul>
<li>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.</li>
</ul>
</blockquote>