Skip to content

Commit 9f71431

Browse files
Gaudi sw-stack update to ver. 1.21.0 (#16)
Signed-off-by: Pawel Szewc <[email protected]>
1 parent a0afc16 commit 9f71431

File tree

4 files changed

+42
-22
lines changed

4 files changed

+42
-22
lines changed

.github/workflows/_gaudi_hpu_benchmark.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ on:
3838
type: string
3939
default: '3.10'
4040
description: 'The python version to use'
41+
rel_ver:
42+
required: true
43+
type: string
44+
description: 'The release version of torch_hpu to use'
4145

4246
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
4347
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
@@ -100,7 +104,7 @@ jobs:
100104
uses: actions/checkout@v4
101105
with:
102106
repository: HabanaAI/gaudi-pytorch-bridge
103-
ref: v1.20.0
107+
ref: v${{ inputs.rel_ver }}
104108
path: torch_hpu
105109

106110
- name: Install pip dependencies

.github/workflows/_gaudi_hpu_build_torch_hpu.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
type: string
2525
default: '3.10'
2626
description: 'The python version to use'
27+
rel_ver:
28+
required: true
29+
type: string
30+
description: 'The release version of torch_hpu to use'
2731
outputs:
2832
torch-hpu-artifact:
2933
description: 'The distribution artifact name of torch_hpu'
@@ -48,6 +52,8 @@ jobs:
4852
env:
4953
HABANA_VISIBLE_DEVICES: all
5054
OMPI_MCA_btl_vader_single_copy_mechanism: none
55+
REL_VERSION: ${{inputs.rel_ver}}
56+
BASE_INC: "/usr/include/habanalabs"
5157
options: >-
5258
--ipc host
5359
--cap-add sys_nice
@@ -92,14 +98,14 @@ jobs:
9298
run: |
9399
mkdir torch_hpu && cd torch_hpu
94100
# apt update -y && apt install -y curl gnupg pciutils wget
95-
# wget 'https://vault.habana.ai/artifactory/gaudi-installer/latest/habanalabs-installer.sh'
101+
wget "https://vault.habana.ai/artifactory/gaudi-installer/$REL_VERSION/habanalabs-installer.sh"
96102
export HABANA_SOFTWARE_STACK="$(pwd)"
97103
export PYTORCH_MODULES_ROOT_PATH="$HABANA_SOFTWARE_STACK/gaudi-pytorch-bridge"
98104
git clone https://github.com/HabanaAI/gaudi-pytorch-bridge $PYTORCH_MODULES_ROOT_PATH
99105
100-
# IFS=- read -r VERSION BUILD <<EOF
101-
# $(bash habanalabs-installer.sh -v)
102-
# EOF
106+
IFS=- read -r VERSION BUILD <<EOF
107+
$(bash habanalabs-installer.sh -v)
108+
EOF
103109
# "${PYTORCH_MODULES_ROOT_PATH}"/scripts/install_torch_fork.sh "$VERSION" "$BUILD"
104110
105111
mkdir 3rd-parties
@@ -115,13 +121,10 @@ jobs:
115121
sed -i 's/namespace nlohmann/namespace nlohmannV340/; s/nlohmann::/nlohmannV340::/g' json/single_include/nlohmann/json.hpp
116122
117123
popd
118-
git clone --depth 1 --branch 1.20.0-543 https://github.com/HabanaAI/HCL.git
119-
git clone --depth 1 --branch main https://github.com/HabanaAI/Intel_Gaudi3_Software.git
124+
pip install -r "$PYTORCH_MODULES_ROOT_PATH"/requirements.txt
125+
pip install habana-media-loader==$VERSION.$BUILD
120126
121-
ln -s /usr/include/habanalabs/ /usr/include/habanalabs/include
122-
ln -s /usr/lib/habanalabs/libaeon.so.1 /usr/lib/habanalabs/libaeon.so
123-
patch -p1 <$PYTORCH_MODULES_ROOT_PATH/.devops/patches/Intel_Gaudi3_Software.patch
124-
cp $PYTORCH_MODULES_ROOT_PATH/.devops/patches/media_pytorch_proxy.h /usr/include/habanalabs/media_pytorch_proxy.h
127+
chmod +w /usr/lib/habanalabs/
125128
126129
- name: Build torch_hpu
127130
working-directory: torch_hpu
@@ -130,20 +133,21 @@ jobs:
130133
export THIRD_PARTIES_ROOT="$HABANA_SOFTWARE_STACK/3rd-parties"
131134
132135
export HCL_ROOT="$HABANA_SOFTWARE_STACK/HCL/hcl/"
133-
export HL_LOGGER_INCLUDE_DIRS="$HABANA_SOFTWARE_STACK/HCL/dependencies/swtools_sdk/hl_logger/include;$THIRD_PARTIES_ROOT"
134-
export MEDIA_ROOT=/usr/include/habanalabs/
135-
export SPECS_EXT_ROOT="$HABANA_SOFTWARE_STACK/Intel_Gaudi3_Software/specs_external/"
136-
export SYNAPSE_ROOT=/usr/include/habanalabs/
137-
export SYNAPSE_UTILS_ROOT=/usr/include/habanalabs/
136+
export HCL_INCLUDE_DIR=$BASE_INC/
137+
export HL_LOGGER_INCLUDE_DIRS=$BASE_INC/hl_logger
138+
export MEDIA_ROOT=$(python -c "import habana_frameworks.mediapipe, os;print(os.path.dirname(habana_frameworks.mediapipe.__file__))")
139+
export SPECS_EXT_ROOT=$BASE_INC
140+
export SYNAPSE_ROOT=$BASE_INC
141+
export SYNAPSE_INCLUDE_DIR=$BASE_INC
142+
export SYNAPSE_UTILS_ROOT=$BASE_INC
143+
export SYNAPSE_UTILS_INCLUDE_DIR=$BASE_INC
138144
139145
export BUILD_ROOT="$HABANA_SOFTWARE_STACK/builds"
140146
export BUILD_ROOT_LATEST=/usr/lib/habanalabs/
141147
export PYTORCH_MODULES_RELEASE_BUILD="$BUILD_ROOT/pytorch_modules_release" # the release build artifact directory
142148
export PYTORCH_MODULES_DEBUG_BUILD="$BUILD_ROOT/pytorch_modules_debug" # the debug build artifact directory
143149
export PYTORCH_MODULES_ROOT_PATH="$HABANA_SOFTWARE_STACK/gaudi-pytorch-bridge"
144150
145-
pip install -r "$PYTORCH_MODULES_ROOT_PATH"/requirements.txt
146-
147151
"$PYTORCH_MODULES_ROOT_PATH"/.devops/build.py -cir
148152
149153
- name: List distribution package
@@ -195,4 +199,4 @@ jobs:
195199
196200
- name: Cleanup workspace
197201
if: always()
198-
run: rm -rf ${{ github.workspace }}/*
202+
run: rm -rf ${{ github.workspace }}/*

.github/workflows/_gaudi_hpu_ut.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ on:
3838
type: string
3939
default: '3.10'
4040
description: 'The python version to use'
41+
rel_ver:
42+
required: true
43+
type: string
44+
description: 'The release version of torch_hpu to use'
4145

4246
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
4347
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
@@ -100,7 +104,7 @@ jobs:
100104
uses: actions/checkout@v4
101105
with:
102106
repository: HabanaAI/gaudi-pytorch-bridge
103-
ref: v1.20.0
107+
ref: v${{ inputs.rel_ver }}
104108
path: torch_hpu
105109

106110
- name: Install pip dependencies

.github/workflows/gaudi_hpu_test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ on:
4949
required: true
5050
type: choice
5151
options:
52+
- vault.habana.ai/gaudi-docker/1.21.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest
5253
- vault.habana.ai/gaudi-docker/1.20.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest
5354
- vault.habana.ai/gaudi-docker/1.19.2/ubuntu22.04/habanalabs/pytorch-installer-2.5.1:latest
54-
default: 'vault.habana.ai/gaudi-docker/1.20.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest'
55+
default: 'vault.habana.ai/gaudi-docker/1.21.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest'
5556
description: 'The docker image which will be loaded'
5657
device:
5758
required: true
@@ -77,10 +78,13 @@ jobs:
7778
prepare:
7879
name: Prepare
7980
runs-on: ubuntu-latest
81+
env:
82+
REL_VERSION: "1.21.0"
8083
outputs:
8184
runner: ${{ steps.set-env.outputs.runner }}
8285
image: ${{ steps.set-env.outputs.image }}
8386
device: ${{ steps.set-env.outputs.device }}
87+
rel_ver: ${{ steps.set-env.outputs.rel_ver }}
8488
ref: ${{ steps.list-ref.outputs.ref }}
8589
pr-number: ${{ steps.list-ref.outputs.pr_number }}
8690
steps:
@@ -89,7 +93,8 @@ jobs:
8993
run: |
9094
echo "runner=${{ github.event.inputs.runner || 'linux-gaudi3' }}" >> $GITHUB_OUTPUT
9195
echo "device=${{ github.event.inputs.device || '0' }}" >> $GITHUB_OUTPUT
92-
echo "image=${{ github.event.inputs.image || 'vault.habana.ai/gaudi-docker/1.20.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest' }}" >> $GITHUB_OUTPUT
96+
echo "image=${{ github.event.inputs.image || 'vault.habana.ai/gaudi-docker/1.21.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest' }}" >> $GITHUB_OUTPUT
97+
echo "rel_ver=$REL_VERSION" >> $GITHUB_OUTPUT
9398
9499
- name: List ref to the PyTorch branch
95100
id: list-ref
@@ -128,6 +133,7 @@ jobs:
128133
image: ${{ needs.prepare.outputs.image }}
129134
device: ${{ needs.prepare.outputs.device }}
130135
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
136+
rel_ver: ${{ needs.prepare.outputs.rel_ver }}
131137

132138
test:
133139
name: Test torch_hpu
@@ -147,6 +153,7 @@ jobs:
147153
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
148154
torch-hpu-artifact: ${{ needs.build.outputs.torch-hpu-artifact }}
149155
torch-hpu-dl-artifact: ${{ needs.build.outputs.torch-hpu-dl-artifact }}
156+
rel_ver: ${{ needs.prepare.outputs.rel_ver }}
150157

151158
benchmark:
152159
name: Run benchmarks
@@ -167,3 +174,4 @@ jobs:
167174
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
168175
torch-hpu-artifact: ${{ needs.build.outputs.torch-hpu-artifact }}
169176
torch-hpu-dl-artifact: ${{ needs.build.outputs.torch-hpu-dl-artifact }}
177+
rel_ver: ${{ needs.prepare.outputs.rel_ver }}

0 commit comments

Comments
 (0)