Relationship between aten/src/THC and aten/src/ATen/cuda?

Hi all,

While tinkering with PyTorch source code, I came upon these two directories with some nearly duplicated code. I’d like to understand the code structure better, so my question is:

What’s the relationship between aten/src/THC and aten/src/ATen/cuda? Is ATen/cuda planned to ultimately “take over” THC’s role and make (part of) THC obsolete, or are they going to coexist with separate roles? (If so, what are these roles?)

Thanks in advance. :slight_smile:

They are really for different purposes. The former implements the Torch cuda Tensors along with many math/util/creating/manipulating operations. The latter is mostly helper code for the cuda related methods in ATen.