From a1e76b45f4b5e0be7ee069214a065b02b6a3f98a Mon Sep 17 00:00:00 2001 From: iefgnoix Date: Tue, 26 Sep 2023 11:51:39 -0700 Subject: [PATCH] Revert "Disable ABI on the master branch. (#5641)" (#5649) This reverts commit a0a3aba9e5263e5aafd6e7895f36e2703ed3c4cd. --- infra/ansible/config/env.yaml | 1 - infra/ansible/roles/build_srcs/tasks/main.yaml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/infra/ansible/config/env.yaml b/infra/ansible/config/env.yaml index ba3dbf88ba5..c9476900dfb 100644 --- a/infra/ansible/config/env.yaml +++ b/infra/ansible/config/env.yaml @@ -33,7 +33,6 @@ build_env: BAZEL_REMOTE_CACHE: 1 SILO_NAME: "cache-silo-{{ arch }}-{{ accelerator }}-{{ clang_version }}" DISABLE_XRT: "{{ disable_xrt }}" - CXX_ABI: 0 amd64: ARCH: amd64 diff --git a/infra/ansible/roles/build_srcs/tasks/main.yaml b/infra/ansible/roles/build_srcs/tasks/main.yaml index bd6dea1b7c0..09e221705ba 100644 --- a/infra/ansible/roles/build_srcs/tasks/main.yaml +++ b/infra/ansible/roles/build_srcs/tasks/main.yaml @@ -17,6 +17,18 @@ name: "{{ pytorch_wheels.files | map(attribute='path') }}" state: "forcereinstall" +- name: Check if build_torch_xla_libs.sh script exists + stat: + path: "{{ (src_root, 'pytorch/xla/build_torch_xla_libs.sh') | path_join }}" + register: build_torch_xla_libs_result + +- name: Build XLA computation client library + ansible.builtin.command: + cmd: bash build_torch_xla_libs.sh -O -D_GLIBCXX_USE_CXX11_ABI=1 + chdir: "{{ (src_root, 'pytorch/xla') | path_join }}" + environment: "{{ env_vars }}" + when: build_torch_xla_libs_result.stat.exists + - name: Build PyTorch/XLA ansible.builtin.command: cmd: python setup.py bdist_wheel