aboutsummaryrefslogtreecommitdiff
path: root/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow/tasks/loop.yml
blob: e9ba473675e88a53648d3b9b925b4339585334ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: Set TensorFlow and other package versions
  ansible.builtin.set_fact:
    tensorflow_version: "{{ tf_ver.value.tensorflow_version }}"
    bazel_version: "{{ tf_ver.value.bazel_version }}"
    onednn_ut_exclude: '{{ "-" + tf_ver.value.onednn_ut_exclude | join(" -") if onednn_enable_opt and tf_ver.value.onednn_ut_exclude else "" }}'
    clang_ut_exclude: '{{ "-" + tf_ver.value.unit_tests_clang_exclude | join(" -") if clang_build and tf_ver.value.unit_tests_clang_exclude else "" }}'
    gcc_ut_exclude: '{{ "-" + tf_ver.value.unit_tests_gcc_exclude | join(" -") if not clang_build and tf_ver.value.unit_tests_gcc_exclude else "" }}'
    image_prefix: "{{ tf_ver.value.image_prefix }}"

- name: Set build dir for TensorFlow{{ variant_name }} {{ tensorflow_version }}
  ansible.builtin.set_fact:
    tensorflow_build_dir: "{{ build_dir }}/tensorflow{{ variant_name }}-{{ tensorflow_version }}"

- name: Remove TensorFlow{{ variant_name }} {{ tensorflow_version }} sources from previous build
  ansible.builtin.file:
    path: "{{ tensorflow_build_dir }}/"
    state: absent

- name: Fetch TensorFlow
  ansible.builtin.include_tasks:
    file: fetch.yml

- name: Build TensorFlow for each Python version (dual abi)
  ansible.builtin.include_role:
    name: tensorflow_in_container
    tasks_from: dual-abi-build.yml
  loop: "{{ tf_ver.value.python_versions }}"
  loop_control:
    loop_var: py_ver