Only rebuild Aten library

Hi all,

I am trying to adjust the C++ code in Aten library(pytorch/aten/src/ATen/native), but it is not practical to run CMake every time.

I found this post, but the make option(build_caffe2) does not work anymore.

So is there an easy way to adjust and test the C++ files in Aten?

I usually just use python setup.py develop which will trigger a full rebuild the first time, but will only rebuild the changed (and affected) files afterwards.

1 Like

Thank you for your reply!

In my case, “python setup.py install” also do the same thing. It only compiled the files I modified after the first build. I am impressed how smart the building script is.

1 Like

I think adding ccache and ninja can additionally speed up the build (unsure as I have them installed by default so haven’t compared the build without them in a while).

In my case, my script used ninja to do all the jobs without any additional option. I noticed that ninja is a prerequisite in the tutorial. Maybe it is the default building tool if ppl follow the tutorial.