Skip to content

Commit 052d2f1

Browse files
committed
[Frontend] Support multi reduction dim + Add Diffusion model test
1 parent c98e5fe commit 052d2f1

File tree

5 files changed

+584
-59
lines changed

5 files changed

+584
-59
lines changed

.github/workflows/pytorchsim_test.yml

Lines changed: 189 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ jobs:
2020
name: Run test_add.py
2121
runs-on: self-hosted
2222
steps:
23+
- name: Log in to GitHub Container Registry
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
2330
- name: Run test_add.py
2431
run: |
2532
echo "Running test_add.py"
@@ -34,6 +41,13 @@ jobs:
3441
name: Run test_activation.py
3542
runs-on: self-hosted
3643
steps:
44+
- name: Log in to GitHub Container Registry
45+
uses: docker/login-action@v3
46+
with:
47+
registry: ghcr.io
48+
username: ${{ github.actor }}
49+
password: ${{ secrets.GITHUB_TOKEN }}
50+
3751
- name: Run test_activation.py
3852
run: |
3953
echo "Running test_activation.py"
@@ -48,6 +62,13 @@ jobs:
4862
name: Run test_batchnorm.py
4963
runs-on: self-hosted
5064
steps:
65+
- name: Log in to GitHub Container Registry
66+
uses: docker/login-action@v3
67+
with:
68+
registry: ghcr.io
69+
username: ${{ github.actor }}
70+
password: ${{ secrets.GITHUB_TOKEN }}
71+
5172
- name: Run test_batchnorm.py
5273
run: |
5374
echo "Running test_batchnorm.py"
@@ -62,6 +83,13 @@ jobs:
6283
name: Run test_bmm.py
6384
runs-on: self-hosted
6485
steps:
86+
- name: Log in to GitHub Container Registry
87+
uses: docker/login-action@v3
88+
with:
89+
registry: ghcr.io
90+
username: ${{ github.actor }}
91+
password: ${{ secrets.GITHUB_TOKEN }}
92+
6593
- name: Run test_bmm.py
6694
run: |
6795
echo "Running test_bmm.py"
@@ -76,6 +104,13 @@ jobs:
76104
name: Run test_cnn.py
77105
runs-on: self-hosted
78106
steps:
107+
- name: Log in to GitHub Container Registry
108+
uses: docker/login-action@v3
109+
with:
110+
registry: ghcr.io
111+
username: ${{ github.actor }}
112+
password: ${{ secrets.GITHUB_TOKEN }}
113+
79114
- name: Run test_cnn.py
80115
run: |
81116
echo "Running test_cnn.py"
@@ -90,6 +125,13 @@ jobs:
90125
name: Run test_conv2d.py
91126
runs-on: self-hosted
92127
steps:
128+
- name: Log in to GitHub Container Registry
129+
uses: docker/login-action@v3
130+
with:
131+
registry: ghcr.io
132+
username: ${{ github.actor }}
133+
password: ${{ secrets.GITHUB_TOKEN }}
134+
93135
- name: Run test_conv2d.py
94136
run: |
95137
echo "Running test_conv2d.py"
@@ -104,6 +146,13 @@ jobs:
104146
name: Run test_matmul.py
105147
runs-on: self-hosted
106148
steps:
149+
- name: Log in to GitHub Container Registry
150+
uses: docker/login-action@v3
151+
with:
152+
registry: ghcr.io
153+
username: ${{ github.actor }}
154+
password: ${{ secrets.GITHUB_TOKEN }}
155+
107156
- name: Run test_matmul.py
108157
run: |
109158
echo "Running test_matmul.py"
@@ -118,6 +167,13 @@ jobs:
118167
name: Run test_reduce.py
119168
runs-on: self-hosted
120169
steps:
170+
- name: Log in to GitHub Container Registry
171+
uses: docker/login-action@v3
172+
with:
173+
registry: ghcr.io
174+
username: ${{ github.actor }}
175+
password: ${{ secrets.GITHUB_TOKEN }}
176+
121177
- name: Run test_reduce.py
122178
run: |
123179
echo "Running test_reduce.py"
@@ -132,6 +188,13 @@ jobs:
132188
name: Run test_softmax.py
133189
runs-on: self-hosted
134190
steps:
191+
- name: Log in to GitHub Container Registry
192+
uses: docker/login-action@v3
193+
with:
194+
registry: ghcr.io
195+
username: ${{ github.actor }}
196+
password: ${{ secrets.GITHUB_TOKEN }}
197+
135198
- name: Run test_softmax.py
136199
run: |
137200
echo "Running test_softmax.py"
@@ -146,6 +209,13 @@ jobs:
146209
name: Run test_transpose2D.py
147210
runs-on: self-hosted
148211
steps:
212+
- name: Log in to GitHub Container Registry
213+
uses: docker/login-action@v3
214+
with:
215+
registry: ghcr.io
216+
username: ${{ github.actor }}
217+
password: ${{ secrets.GITHUB_TOKEN }}
218+
149219
- name: Run test_transpose2D.py
150220
run: |
151221
echo "Running test_transpose2D.py"
@@ -160,6 +230,13 @@ jobs:
160230
name: Run test_view3D_2D.py
161231
runs-on: self-hosted
162232
steps:
233+
- name: Log in to GitHub Container Registry
234+
uses: docker/login-action@v3
235+
with:
236+
registry: ghcr.io
237+
username: ${{ github.actor }}
238+
password: ${{ secrets.GITHUB_TOKEN }}
239+
163240
- name: Run test_view3D_2D.py
164241
run: |
165242
echo "Running test_view3D_2D.py"
@@ -174,6 +251,13 @@ jobs:
174251
name: Run test_layernorm.py
175252
runs-on: self-hosted
176253
steps:
254+
- name: Log in to GitHub Container Registry
255+
uses: docker/login-action@v3
256+
with:
257+
registry: ghcr.io
258+
username: ${{ github.actor }}
259+
password: ${{ secrets.GITHUB_TOKEN }}
260+
177261
- name: Run test_layernorm.py
178262
run: |
179263
echo "Running test_layernorm.py"
@@ -188,6 +272,13 @@ jobs:
188272
name: Run test_mlp.py
189273
runs-on: self-hosted
190274
steps:
275+
- name: Log in to GitHub Container Registry
276+
uses: docker/login-action@v3
277+
with:
278+
registry: ghcr.io
279+
username: ${{ github.actor }}
280+
password: ${{ secrets.GITHUB_TOKEN }}
281+
191282
- name: Run test_mlp.py
192283
run: |
193284
echo "Running test_mlp.py"
@@ -233,6 +324,13 @@ jobs:
233324
name: Run test_transformer.py
234325
runs-on: self-hosted
235326
steps:
327+
- name: Log in to GitHub Container Registry
328+
uses: docker/login-action@v3
329+
with:
330+
registry: ghcr.io
331+
username: ${{ github.actor }}
332+
password: ${{ secrets.GITHUB_TOKEN }}
333+
236334
- name: Run test_transformer.py
237335
run: |
238336
echo "Running test_transformer.py"
@@ -247,6 +345,13 @@ jobs:
247345
name: Run test_transpose3D.py
248346
runs-on: self-hosted
249347
steps:
348+
- name: Log in to GitHub Container Registry
349+
uses: docker/login-action@v3
350+
with:
351+
registry: ghcr.io
352+
username: ${{ github.actor }}
353+
password: ${{ secrets.GITHUB_TOKEN }}
354+
250355
- name: Run test_transpose3D.py
251356
run: |
252357
echo "Running test_transpose3D.py"
@@ -261,6 +366,13 @@ jobs:
261366
name: Run test_sparsity.py
262367
runs-on: self-hosted
263368
steps:
369+
- name: Log in to GitHub Container Registry
370+
uses: docker/login-action@v3
371+
with:
372+
registry: ghcr.io
373+
username: ${{ github.actor }}
374+
password: ${{ secrets.GITHUB_TOKEN }}
375+
264376
- name: Run test_sparsity.py
265377
run: |
266378
echo "Running test_sparsity.py"
@@ -275,6 +387,13 @@ jobs:
275387
name: Run test_pool.py
276388
runs-on: self-hosted
277389
steps:
390+
- name: Log in to GitHub Container Registry
391+
uses: docker/login-action@v3
392+
with:
393+
registry: ghcr.io
394+
username: ${{ github.actor }}
395+
password: ${{ secrets.GITHUB_TOKEN }}
396+
278397
- name: Run test_pool.py
279398
run: |
280399
echo "Running test_pool.py"
@@ -289,6 +408,13 @@ jobs:
289408
name: Run test_perceptron.py
290409
runs-on: self-hosted
291410
steps:
411+
- name: Log in to GitHub Container Registry
412+
uses: docker/login-action@v3
413+
with:
414+
registry: ghcr.io
415+
username: ${{ github.actor }}
416+
password: ${{ secrets.GITHUB_TOKEN }}
417+
292418
- name: Run test_single_perceptron.py
293419
run: |
294420
echo "Running test_single_perceptron.py"
@@ -303,6 +429,13 @@ jobs:
303429
name: Run test_fusion
304430
runs-on: self-hosted
305431
steps:
432+
- name: Log in to GitHub Container Registry
433+
uses: docker/login-action@v3
434+
with:
435+
registry: ghcr.io
436+
username: ${{ github.actor }}
437+
password: ${{ secrets.GITHUB_TOKEN }}
438+
306439
- name: Run test_addmm_residual.py
307440
run: |
308441
echo "Running test_addmm_residual.py"
@@ -387,6 +520,13 @@ jobs:
387520
name: Run test_moe
388521
runs-on: self-hosted
389522
steps:
523+
- name: Log in to GitHub Container Registry
524+
uses: docker/login-action@v3
525+
with:
526+
registry: ghcr.io
527+
username: ${{ github.actor }}
528+
password: ${{ secrets.GITHUB_TOKEN }}
529+
390530
- name: Run test_moe.py
391531
run: |
392532
echo "Running test_moe.py"
@@ -401,6 +541,13 @@ jobs:
401541
name: Run test_mistral
402542
runs-on: self-hosted
403543
steps:
544+
- name: Log in to GitHub Container Registry
545+
uses: docker/login-action@v3
546+
with:
547+
registry: ghcr.io
548+
username: ${{ github.actor }}
549+
password: ${{ secrets.GITHUB_TOKEN }}
550+
404551
- name: Run test_mistral.py
405552
run: |
406553
echo "Running test_mistral.py"
@@ -415,6 +562,13 @@ jobs:
415562
name: Run test_vit
416563
runs-on: self-hosted
417564
steps:
565+
- name: Log in to GitHub Container Registry
566+
uses: docker/login-action@v3
567+
with:
568+
registry: ghcr.io
569+
username: ${{ github.actor }}
570+
password: ${{ secrets.GITHUB_TOKEN }}
571+
418572
- name: Run test_vit.py
419573
run: |
420574
echo "Running test_vit.py"
@@ -425,16 +579,41 @@ jobs:
425579
-e TORCHSIM_SPAD_SIZE="${{ inputs.spad_size }}" \
426580
${{ inputs.image_name }} python3 PyTorchSim/tests/test_vit.py
427581
582+
test_diffusion:
583+
name: Run test_diffusion
584+
runs-on: self-hosted
585+
steps:
586+
- name: Log in to GitHub Container Registry
587+
uses: docker/login-action@v3
588+
with:
589+
registry: ghcr.io
590+
username: ${{ github.actor }}
591+
password: ${{ secrets.GITHUB_TOKEN }}
592+
593+
- name: Run test_diffusion.py
594+
run: |
595+
echo "Running test_diffusion.py"
596+
docker run --rm \
597+
-v /tmp/torchsim-ci/${GITHUB_SHA}:/dump \
598+
-e TORCHSIM_DUMP_PATH=/dump \
599+
-e TORCHSIM_VECTOR_LANE="${{ inputs.vector_lane }}" \
600+
-e TORCHSIM_SPAD_SIZE="${{ inputs.spad_size }}" \
601+
${{ inputs.image_name }} python3 PyTorchSim/tests/Diffusion/test_diffusion.py
602+
428603
test_indirect:
429604
name: Run test_indirect
430605
runs-on: self-hosted
431-
env:
432-
GIT_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
433606
steps:
607+
- name: Log in to GitHub Container Registry
608+
uses: docker/login-action@v3
609+
with:
610+
registry: ghcr.io
611+
username: ${{ github.actor }}
612+
password: ${{ secrets.GITHUB_TOKEN }}
613+
434614
- name: Run test_indirect.py
435615
run: |
436616
echo "Running test_indirect.py"
437-
echo $GIT_ACCESS_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
438617
docker run --rm \
439618
-v /tmp/torchsim-ci/${GITHUB_SHA}:/dump \
440619
-e TORCHSIM_DUMP_PATH=/dump \
@@ -445,13 +624,17 @@ jobs:
445624
test_scheduler:
446625
name: Run test_scheduler
447626
runs-on: self-hosted
448-
env:
449-
GIT_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
450627
steps:
628+
- name: Log in to GitHub Container Registry
629+
uses: docker/login-action@v3
630+
with:
631+
registry: ghcr.io
632+
username: ${{ github.actor }}
633+
password: ${{ secrets.GITHUB_TOKEN }}
634+
451635
- name: Run test_scheduler.py
452636
run: |
453637
echo "Running test_scheduler.py"
454-
echo $GIT_ACCESS_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
455638
docker run --rm \
456639
-v /tmp/torchsim-ci/${GITHUB_SHA}:/dump \
457640
-e TORCHSIM_DUMP_PATH=/dump \

Dockerfile.base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2
4242
rm *.tar.gz
4343

4444
# Install torchsim dependency
45-
RUN apt install ninja-build && pip install onnx matplotlib && pip install --user conan==1.56.0
45+
RUN apt install ninja-build && pip install onnx matplotlib && pip install --user conan==1.56.0 && pip install "transformers<4.44"
4646

4747
ENV RISCV=/workspace/riscv
4848
ENV PATH=$RISCV/bin:$PATH

0 commit comments

Comments
 (0)