State of the bazel build and updating the Bazel build files to support Bzlmod

Hi all, (not sure what tag to use here)

I tried to do a bazel build //… in pytorch-v2.10.0 and main with the submodules initialized, but I still got complaints about rules_cuda. I’m wondering if the bazel build files are up-to-date.

I also noticed that the .bazelversion is pinned to 6.5.0 and uses WORKSPACE, which is 3 major versions behind now and Bazel has deprecated (and removed support for in Bazel 9) the WORKSPACE style builds.

For my personal use case, I prefer using Bazel to CMake, to keep my dependencies accounted for in a single build system and to that end, I wanted to know from the current Bazel build stakeholders if there’s any interest/plans to upgrade the build files for Bzlmod (and at some point also publish the project to BCR for ease of importing).

For my use-case, I currently only need the C++ Tensor library and kernels, so I’m trying to create a bazel build from scratch, that builds a minimal libtorch that I can depend on. If there’s interest in supporting Bazel further, I could look into the other stuff as well (with some help from the community :slight_smile:)