As far as I can tell they are not really for building different things, but rather for different build systems depending on which you use. And most users seem to use CMake. You can verify that you don’t need BUILD.bazel when building with cmake because you can just delete the file and it will build just fine. Both build the underlying implementation of PyTorch (kernels, implementation of the tensor representation, etc.)