Skip to content

Commit 1bc7737

Browse files
authored
Remove CUDA plugin. (#9597)
This PR removes the CUDA plugin in `plugins/cuda` directory, as well as explicit mentions and usages. This is in line with the CUDA deprecation that started on release 2.8. There are still a few mentions to `torch_xla_cuda_plugin` at `.github/ci.md` markdown file. But, I will leave those for a future PR, since we would need to re-write those parts.
1 parent 90be04a commit 1bc7737

File tree

9 files changed

+2
-190
lines changed

9 files changed

+2
-190
lines changed

.github/scripts/run_tests.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,7 @@ function run_torch_xla_cpp_tests() {
3030

3131
TORCH_DIR=$(python -c "import pkgutil; import os; print(os.path.dirname(pkgutil.get_loader('torch').get_filename()))")
3232
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${TORCH_DIR}/lib
33-
if [ -x "$(command -v nvidia-smi)" ]; then
34-
CUDA_PLUGIN_DIR=$(python -c "import pkgutil; import os; print(os.path.dirname(pkgutil.get_loader('torch_xla_cuda_plugin').get_filename()))")
35-
export PJRT_LIBRARY_PATH=$CUDA_PLUGIN_DIR/lib/pjrt_c_api_gpu_plugin.so
36-
export PJRT_DEVICE=LIBRARY
37-
export PJRT_DYNAMIC_PLUGINS=1
38-
else
39-
export PJRT_DEVICE=CPU
40-
fi
33+
export PJRT_DEVICE=CPU
4134
export XLA_EXPERIMENTAL="nonzero:masked_select:nms"
4235

4336
test_names=("test_aten_xla_tensor_1"

infra/ansible/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ COPY . /ansible
1010
ARG ansible_vars
1111
# HACK: install build dependencies only, but skip build step
1212
RUN ansible-playbook -vvv playbook.yaml -e "stage=build" -e "${ansible_vars}" --tags "bazel,configure_env,install_deps"
13-
RUN ansible-playbook -vvv playbook.yaml -e "stage=build_plugin" -e "${ansible_vars}"
1413
RUN ansible-playbook -vvv playbook.yaml -e "stage=build" -e "${ansible_vars}" --skip-tags=fetch_srcs,install_deps
1514

1615
FROM python:${python_version}-${debian_version} AS release

infra/ansible/e2e_tests.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ COPY . /ansible
1010
# Build PyTorch and PyTorch/XLA wheels.
1111
ARG ansible_vars
1212
RUN ansible-playbook -vvv playbook.yaml -e "stage=build" -e "${ansible_vars}"
13-
RUN ansible-playbook -vvv playbook.yaml -e "stage=build_plugin" -e "${ansible_vars}" --skip-tags=fetch_srcs,install_deps
1413

1514
FROM python:${python_version}-${debian_version}
1615

infra/ansible/playbook.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"Pass the required variable with: --e \"{{ item.name }}=<value>\""
1717
loop:
1818
- name: stage
19-
pattern: ^(build|build_plugin|release)$
19+
pattern: ^(build|release)$
2020
- name: arch
2121
pattern: ^(aarch64|amd64)$
2222
- name: accelerator
@@ -88,17 +88,6 @@
8888
when: stage == "build"
8989
tags: build_srcs
9090

91-
- role: build_plugin
92-
vars:
93-
src_root: "/src"
94-
env_vars: "{{
95-
build_env.common | default({}, true) |
96-
combine(build_env[arch] | default({}, true)) |
97-
combine(build_env[accelerator] | default({}, true))
98-
}}"
99-
when: stage == "build_plugin"
100-
tags: build_plugin
101-
10291
- role: configure_env
10392
vars:
10493
env_vars: "{{

infra/ansible/roles/build_plugin/tasks/main.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

plugins/cuda/README.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

plugins/cuda/pyproject.toml

Lines changed: 0 additions & 18 deletions
This file was deleted.

plugins/cuda/setup.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

plugins/cuda/torch_xla_cuda_plugin/__init__.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)