xla icon indicating copy to clipboard operation
xla copied to clipboard

pin pytorch to a specific commit

Open zhanyong-wan opened this issue 7 months ago • 2 comments

🐛 Bug

When we build pytorch/xla, we pull in pytorch at head. This means the behavior of the build is not deterministic. This is bad for releases and bug repros.

We should pin pytorch to a specific commit, similarly to how we pin OpenXLA.

zhanyong-wan avatar May 14 '25 23:05 zhanyong-wan

I am bothered by this issue for a while. it will be good if pytorch/xla can pin to a specific pytorch and xla version. is there any existing design or plan to do this? if not, i can take a deeper look at this issue.

iwknow avatar Jun 01 '25 05:06 iwknow

Thanks, @iwknow . We already pin openxla to a specific version via bazel http_archive. See the WORKSPACE file for details.

Currently we hard-code the dependency on pytorch by cloning it at /pytorch while cloning pytorch-xla at /pytorch/xla, and assuming that pytorch is in the parent directory of xla. This is hacky. Switching to http_archive might be a good idea (consistent with how we pin openxla). However, it will require changing the workflow and build instructions in several places.

zhanyong-wan avatar Jun 01 '25 16:06 zhanyong-wan