Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions infra/ansible/config/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ build_env:
XLA_SANDBOX_BUILD: 1
BAZEL_REMOTE_CACHE: 1
SILO_NAME: "cache-silo-{{ arch }}-{{ accelerator }}"
_GLIBCXX_USE_CXX11_ABI: 0

amd64:
ARCH: amd64
Expand Down
2 changes: 1 addition & 1 deletion infra/ansible/roles/build_srcs/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

- name: Build XLA computation client library
ansible.builtin.command:
cmd: bash build_torch_xla_libs.sh -O -D_GLIBCXX_USE_CXX11_ABI=1
cmd: bash build_torch_xla_libs.sh
chdir: "{{ (src_root, 'pytorch/xla') | path_join }}"
environment: "{{ env_vars }}"
when: build_torch_xla_libs_result.stat.exists
Expand Down
19 changes: 19 additions & 0 deletions infra/ansible/roles/fetch_srcs/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@
dest: "{{ (src_root, 'pytorch/xla') | path_join }}"
version: "{{ xla_git_rev }}"

- name: Find *.diff files in pytorch/xla/torch_patches
ansible.builtin.find:
path: "{{ (src_root, 'pytorch/xla/torch_patches') | path_join }}"
pattern: "*.diff"
register: torch_patches

- name: Apply patches to PyTorch
ansible.posix.patch:
src: "{{ item }}"
# Use source file on the target machine instead of the one where
# the playbook is located. Has no effect when the target machine is
# localhost.
remote_src: true
strip: 1
ignore_whitespace: true
basedir: "{{ (src_root, 'pytorch/') | path_join }}"
loop: "{{ torch_patches.files | map(attribute='path') }}"
ignore_errors: true

- name: Find *.diff files in pytorch/xla/tf_patches
ansible.builtin.find:
path: "{{ (src_root, 'pytorch/xla/tf_patches') | path_join }}"
Expand Down