@@ -35,18 +35,29 @@ python_configure(
3535################################ PyTorch Setup ################################ 
3636
3737load ("//bazel:dependencies.bzl" , "PYTORCH_LOCAL_DIR" )
38+ load ("//bazel:torch_repo.bzl" , "torch_repo" )
3839
39- new_local_repository (
40+ torch_repo (
4041    name  =  "torch" ,
41-     build_file  =  "//bazel:torch.BUILD" ,
42-     path  =  PYTORCH_LOCAL_DIR ,
42+     path  =  "/usr/local/google/home/rlevasseur/p/torch_repo/torch-2.8.0.dev20250609+cpu-cp311-cp311-manylinux_2_28_x86_64.whl" ,
43+     urls  =  [
44+         "https://download.pytorch.org/whl/nightly/cpu/torch-2.8.0.dev20250609%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl" ,
45+     ],
4346)
4447
48+ ##new_local_repository( 
49+ ##    name = "torch", 
50+ ##    ##build_file = "//bazel:torch.BUILD", 
51+ ##    ##path = PYTORCH_LOCAL_DIR, 
52+ ##    build_file = "//bazel:torchnew.BUILD", 
53+ ##    path = "/usr/local/google/home/rlevasseur/p/torch_repo/torch-2.8.0.dev20250609+cpu-cp311-cp311-manylinux_2_28_x86_64", 
54+ ##) 
55+ 
4556############################# OpenXLA Setup ############################### 
4657
4758# To build PyTorch/XLA with a new revison of OpenXLA, update the xla_hash to 
4859# the openxla git commit hash and note the date of the commit. 
49- xla_hash  =  ' d4576615b3bd3644567da60202faf19b485b52f9' # Committed on 2025-06-05. 
60+ xla_hash  =  " d4576615b3bd3644567da60202faf19b485b52f9" # Committed on 2025-06-05. 
5061
5162http_archive (
5263    name  =  "xla" ,
@@ -66,8 +77,6 @@ http_archive(
6677    ],
6778)
6879
69- 
70- 
7180# For development, one often wants to make changes to the OpenXLA repository as well 
7281# as the PyTorch/XLA repository. You can override the pinned repository above with a 
7382# local checkout by either: 
@@ -89,14 +98,14 @@ python_init_rules()
8998load ("@xla//third_party/py:python_init_repositories.bzl" , "python_init_repositories" )
9099
91100python_init_repositories (
101+     default_python_version  =  "system" ,
102+     local_wheel_workspaces  =  ["@torch//:WORKSPACE" ],
92103    requirements  =  {
93104        "3.8" : "//:requirements_lock_3_8.txt" ,
94105        "3.9" : "//:requirements_lock_3_9.txt" ,
95106        "3.10" : "//:requirements_lock_3_10.txt" ,
96107        "3.11" : "//:requirements_lock_3_11.txt" ,
97108    },
98-     local_wheel_workspaces  =  ["@torch//:WORKSPACE" ],
99-     default_python_version  =  "system" ,
100109)
101110
102111load ("@xla//third_party/py:python_init_toolchains.bzl" , "python_init_toolchains" )
@@ -111,8 +120,6 @@ load("@pypi//:requirements.bzl", "install_deps")
111120
112121install_deps ()
113122
114- 
115- 
116123# Initialize OpenXLA's external dependencies. 
117124load ("@xla//:workspace4.bzl" , "xla_workspace4" )
118125
@@ -134,7 +141,6 @@ load("@xla//:workspace0.bzl", "xla_workspace0")
134141
135142xla_workspace0 ()
136143
137- 
138144load (
139145    "@xla//third_party/gpus:cuda_configure.bzl" ,
140146    "cuda_configure" ,
0 commit comments