@@ -58,13 +58,14 @@ concurrency:
5858permissions : read-all
5959
6060jobs :
61- build-and-test :
61+ build-image :
6262 strategy :
6363 matrix :
64- config : [
65- { name: c7g, label: ah-ubuntu_22_04-c7g_8x-100 }
66- ]
67-
64+ config :
65+ [
66+ { name: c7g, label: ah-ubuntu_22_04-c7g_8x-100 },
67+ { name: c8g, label: ah-ubuntu_22_04-c8g_8x }
68+ ]
6869 runs-on : ${{ matrix.config.label }}
6970 steps :
7071 - name : Checkout Tool-Solutions
8182 env :
8283 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8384
84- - name : Run smoke tests
85+ - name : Save image as a artifact
86+ run : docker save toolsolutions-pytorch:latest -o toolsolutions-pytorch-image-${{ matrix.config.name }}.tar
87+
88+ - name : Upload build artifact
89+ uses : actions/upload-artifact@v4
90+ with :
91+ name : toolsolutions-pytorch-image-${{ matrix.config.name }}
92+ path : toolsolutions-pytorch-image-${{ matrix.config.name }}.tar
93+ compression-level : 9
94+ retention-days : 1
95+
96+ test :
97+ needs : build-image
98+ strategy :
99+ matrix :
100+ config :
101+ [
102+ { name: c7g, label: ah-ubuntu_22_04-c7g_8x-100 },
103+ { name: c8g, label: ah-ubuntu_22_04-c8g_8x }
104+ ]
105+ onednn_fpmath_mode : [FP32, BF16]
106+ runs-on : ${{ matrix.config.label }}
107+ env :
108+ ONEDNN_DEFAULT_FPMATH_MODE : ${{ matrix.onednn_fpmath_mode }}
109+
110+ steps :
111+ - name : Download image artifact
112+ uses : actions/download-artifact@v5
113+ with :
114+ name : toolsolutions-pytorch-image-${{ matrix.config.name }}
115+ path : .
116+
117+ - name : Set up Docker
118+ uses : docker/setup-docker-action@v4
119+
120+ - name : Load Docker image
121+ run : docker load -i toolsolutions-pytorch-image-${{ matrix.config.name }}.tar
122+
123+ - name : Run smoke tests for
85124 run : docker run --rm toolsolutions-pytorch:latest ./test-examples.sh
86125
87126 - name : Run unit tests
0 commit comments