Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Implement driver update logic directly in linux_single_e2e.yml #10503

Merged
merged 3 commits into from
Jul 24, 2023
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
22 changes: 19 additions & 3 deletions .github/workflows/linux_single_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ on:
reset_gpu:
type: string
required: False
install_drivers:
type: string
required: False
env:
type: string
default: '{}'
Expand Down Expand Up @@ -96,6 +99,12 @@ on:
as we redefine it as part of this workflow.
default: '{"LIT_FILTER":""}'

install_drivers:
type: choice
options:
- false
- true

jobs:
lin_e2e_only:
name: ${{ inputs.name }}
Expand All @@ -114,7 +123,7 @@ jobs:
with:
ref: ${{ inputs.ref }}
sparse-checkout: |
devops/actions
devops
- name: Register cleanup after job is finished
uses: ./devops/actions/cleanup
- uses: ./devops/actions/cached_checkout
Expand All @@ -124,11 +133,18 @@ jobs:
merge_ref: ${{ inputs.merge_ref }}
cache_path: "/__w/repo_cache/"
- name: Install drivers
if: env.compute_runtime_tag != ''
if: inputs.install_drivers == 'true'
run: |
# TODO install into image
sudo apt install -yq jq
sudo cp devops/scripts/get_release.py /opt/
sudo -E devops/scripts/install_drivers.sh llvm/devops/dependencies.json --all
- name: Install drivers (deprecated CI interface)
if: env.compute_runtime_tag != '' && inputs.install_drivers != 'true'
run: |
if [ -e /opt/install_drivers.sh ]; then
# TODO pack this script into container
sudo cp llvm/devops/scripts/get_release.py /opt/
sudo cp devops/scripts/get_release.py /opt/
sudo -E /opt/install_drivers.sh --all
fi
- name: Source OneAPI TBB vars.sh
Expand Down
28 changes: 20 additions & 8 deletions devops/scripts/install_drivers.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
#!/bin/bash

CR_TAG=$compute_runtime_tag
IGC_TAG=$igc_tag
CM_TAG=$cm_tag
L0_TAG=$level_zero_tag
TBB_TAG=$tbb_tag
FPGA_TAG=$fpgaemu_tag
CPU_TAG=$cpu_tag
if [ -f "$1" ]; then
# Read data from the dependencies.json passed as the first argument.
CONFIG_FILE=$1
CR_TAG=$(jq -r '.linux.compute_runtime.github_tag' $CONFIG_FILE)
IGC_TAG=$(jq -r '.linux.igc.github_tag' $CONFIG_FILE)
CM_TAG=$(jq -r '.linux.cm.github_tag' $CONFIG_FILE)
L0_TAG=$(jq -r '.linux.level_zero.github_tag' $CONFIG_FILE)
TBB_TAG=$(jq -r '.linux.tbb.github_tag' $CONFIG_FILE)
FPGA_TAG=$(jq -r '.linux.fpgaemu.github_tag' $CONFIG_FILE)
CPU_TAG=$(jq -r '.linux.oclcpu.github_tag' $CONFIG_FILE)
else
CR_TAG=$compute_runtime_tag
IGC_TAG=$igc_tag
CM_TAG=$cm_tag
L0_TAG=$level_zero_tag
TBB_TAG=$tbb_tag
FPGA_TAG=$fpgaemu_tag
CPU_TAG=$cpu_tag
fi

TBB_INSTALLED=false

Expand Down Expand Up @@ -85,7 +97,7 @@ InstallFPGAEmu () {
cd $INSTALL_LOCATION
if [ -d "$INSTALL_LOCATION/fpgaemu" ]; then
echo "$INSTALL_LOCATION/fpgaemu exists and will be removed!"
rm -Rf $INSTALL_LOCATION/oclcpu;
rm -Rf $INSTALL_LOCATION/fpgaemu;
fi
python3 $LOCATION/get_release.py intel/llvm $FPGA_TAG \
| grep -E ".*fpgaemu.*tar.gz" \
Expand Down
Loading