@@ -45,102 +45,29 @@ concurrency:
4545permissions : read-all
4646
4747jobs :
48- build-image :
49- strategy :
50- matrix :
51- config :
52- [
53- { name: c7g, label: ah-ubuntu_24_04-c7g_8x-100 },
54- { name: c8g, label: ah-ubuntu_24_04-c8g_8x }
55- ]
56- runs-on : ${{ matrix.config.label }}
57- env :
58- CCACHE_LOCAL_DIR : ${{ github.workspace }}/Tool-Solutions/ML-Frameworks/pytorch-aarch64/.ccache
59- TORCH_BUILD_CONTAINER_ID_FILE : ${{ github.workspace }}/Tool-Solutions/ML-Frameworks/pytorch-aarch64/.torch_build_container_id
60- steps :
61- - name : Checkout Tool-Solutions
62- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63- with :
64- path : Tool-Solutions
65-
66- - name : Set up Docker
67- uses : docker/setup-docker-action@v4
68-
69- - name : Create unique cache key from the year and week (YYYY-WW)
70- id : cache_suffix
71- run : echo "week=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT"
72-
73- # Restore cache if available. GitHub automatically evicts cache entries that have not been
74- # accessed for over 7 days. We rotate the cache key weekly; if no cache exists for the
75- # current week, a cache from a previous week (via the prefix restore key) will be restored
76- # and then saved under the current week's key at the end of the job. This effectively limits
77- # the cache to at most two weeks of cache data.
78- - name : Restore ccache cache
79- uses : actions/cache@v5
80- with :
81- path : ${{ env.CCACHE_LOCAL_DIR }}
82- key : ccache-${{ matrix.config.name }}-${{ steps.cache_suffix.outputs.week }}
83- restore-keys : |
84- ccache-${{ matrix.config.name }}-
85-
86- - name : Build Tool-Solutions PyTorch
87- working-directory : ${{ github.workspace }}/Tool-Solutions/ML-Frameworks/pytorch-aarch64
88- run : ${{ github.workspace }}/Tool-Solutions/ML-Frameworks/pytorch-aarch64/build.sh
89- env :
90- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91- CCACHE_LOCAL_DIR : ${{ env.CCACHE_LOCAL_DIR }}
92- CCACHE_MAXSIZE : 2G
93-
94- - name : Print ccache disk usage
95- run : du -sh "${{ env.CCACHE_LOCAL_DIR }}" || true
96-
97- - name : Report final ccache build stats
98- run : docker exec "$(cat ${{ env.TORCH_BUILD_CONTAINER_ID_FILE }})" ccache -s || true
99-
100- - name : Save image as an artifact
101- run : docker save toolsolutions-pytorch:latest -o toolsolutions-pytorch-image-${{ matrix.config.name }}.tar
102-
103- - name : Upload build artifact
104- uses : actions/upload-artifact@v5
105- with :
106- name : toolsolutions-pytorch-image-${{ matrix.config.name }}
107- path : toolsolutions-pytorch-image-${{ matrix.config.name }}.tar
108- compression-level : 9
109- retention-days : 1
110-
111- test :
112- needs : build-image
113- strategy :
114- fail-fast : false
115- matrix :
116- config :
117- [
118- { name: c7g, label: ah-ubuntu_24_04-c7g_8x-100 },
119- { name: c8g, label: ah-ubuntu_24_04-c8g_8x }
120- ]
121- onednn_fpmath_mode : [FP32, BF16]
122- runs-on : ${{ matrix.config.label }}
123- steps :
124- - name : Download image artifact
125- uses : actions/download-artifact@v5
126- with :
127- name : toolsolutions-pytorch-image-${{ matrix.config.name }}
128- path : .
129-
130- - name : Set up Docker
131- uses : docker/setup-docker-action@v4
132-
133- - name : Load Docker image
134- run : docker load -i toolsolutions-pytorch-image-${{ matrix.config.name }}.tar
135-
136- - name : Run smoke tests
137- run : |
138- docker run --rm \
139- -e ONEDNN_DEFAULT_FPMATH_MODE=${{ matrix.onednn_fpmath_mode }} \
140- toolsolutions-pytorch:latest ./test-examples.sh
141-
142- - name : Run unit tests
143- run : |
144- docker run --rm \
145- -e ONEDNN_DEFAULT_FPMATH_MODE=${{ matrix.onednn_fpmath_mode }} \
146- toolsolutions-pytorch:latest ./run_unit_tests.sh
48+ run-c6g :
49+ name : " c6g - build & test"
50+ uses : ./.github/workflows/_pytorch-single-platform.yml
51+ with :
52+ target_name : c6g
53+ runner_label : ah-ubuntu_22_04-c6g_8x-100
54+ onednn_fpmath_modes_json : ' ["FP32"]'
55+ secrets : inherit
56+
57+ run-c7g :
58+ name : " c7g - build & test"
59+ uses : ./.github/workflows/_pytorch-single-platform.yml
60+ with :
61+ target_name : c7g
62+ runner_label : ah-ubuntu_24_04-c7g_8x-100
63+ onednn_fpmath_modes_json : ' ["FP32","BF16"]'
64+ secrets : inherit
65+
66+ run-c8g :
67+ name : " c8g - build & test"
68+ uses : ./.github/workflows/_pytorch-single-platform.yml
69+ with :
70+ target_name : c8g
71+ runner_label : ah-ubuntu_24_04-c8g_8x
72+ onednn_fpmath_modes_json : ' ["FP32","BF16"]'
73+ secrets : inherit
0 commit comments