Skip to content

Commit cc719ae

Browse files
authored
Merge branch 'main' into attributes-rework
2 parents 271e811 + bd39fe7 commit cc719ae

37 files changed

+645
-520
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
context: .
5959
project: 7grh10615f
60-
platforms: linux/amd64,linux/arm64
60+
platforms: linux/amd64
6161
push: true
6262
tags: ${{ steps.meta.outputs.tags }}
6363
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,13 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.28.0-rc3/cmake-3.
4040
cd cmake-3.28.0-rc3 && ./bootstrap &&\
4141
make && make install
4242

43-
# Install an older version of ScaLP that still has the `then` keyword
44-
# This is required by the `flopoco` library
45-
WORKDIR /home
46-
RUN git clone https://digidev.digi.e-technik.uni-kassel.de/git/scalp.git &&\
47-
cd scalp && git checkout 8f1bdf61ed4d893e7b1370edb62187a19e921960 &&\
48-
mkdir build && cd build &&\
49-
cmake .. && make &&\
50-
cmake --install . --prefix /usr/local
51-
5243
# Install FloPoCo 4.1
5344
WORKDIR /home
54-
RUN git clone --branch flopoco-4.1 https://gitlab.com/flopoco/flopoco &&\
55-
cd flopoco && git checkout f3d76595c01f84cee57ae67eee1ceb31a6fe93bc &&\
56-
mkdir build && cd build &&\
57-
cmake -GNinja .. && ninja &&\
58-
ln -s /home/flopoco/build/code/FloPoCoBin/flopoco /usr/bin/flopoco
45+
RUN git clone https://gitlab.com/flopoco/flopoco &&\
46+
cd flopoco && git checkout 418ee8b71fe2c4976cbc0a92924683fa73162128 &&\
47+
make sysdeps CONFIG=docker &&\
48+
make CONFIG=docker &&\
49+
make install CONFIG=docker
5950

6051
# Install GHDL 3.0.0
6152
WORKDIR /home

apps/blas/axpy/harness.fil

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import "apps/blas/axpy/axpy.fil";
2+
import "primitives/reshape.fil";
3+
4+
comp Harness[W, N, MultsN, AddsN]<'G:II>(
5+
go: interface['G],
6+
a: ['G, 'G+1] W,
7+
x: ['G, 'G+1] W*N,
8+
y: ['G, 'G+1] W*N
9+
) -> (
10+
out: ['G+L, 'G+L+1] W*N
11+
) with {
12+
some L where L > 0;
13+
some II where II > 0;
14+
} where W > 0,
15+
N > 0,
16+
MultsN > 0,
17+
AddsN > 0,
18+
N % MultsN == 0,
19+
MultsN % AddsN == 0
20+
{
21+
x_vec := new SplitWire[W, N]<'G>(x);
22+
y_vec := new SplitWire[W, N]<'G>(y);
23+
24+
a := new Axpy[W, N, MultsN, AddsN];
25+
run_a := a<'G>(a, x_vec.out{0..N}, y_vec.out{0..N});
26+
27+
out_flat := new ConcatBundle[W, N]<'G+a::L>(run_a.out{0..N});
28+
out = out_flat.out;
29+
30+
II := a::II;
31+
L := a::L;
32+
}

apps/blas/axpy/ports.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"inputs": {
3+
"a": {
4+
"type": "scalar"
5+
},
6+
"x": {
7+
"type": "matrix",
8+
"dim": [4,1]
9+
},
10+
"y": {
11+
"type": "matrix",
12+
"dim": [4,1]
13+
}
14+
},
15+
"outputs": {
16+
"out": {
17+
"type": "matrix",
18+
"dim": [4,1]
19+
}
20+
}
21+
}

apps/blas/axpy/test.expect

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/blas/axpy/test.fil

Lines changed: 19 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,27 @@
1-
import "apps/blas/axpy/axpy.fil";
1+
import "apps/blas/axpy/harness.fil";
22

3-
comp main<'G:II>(
3+
comp main[W, N, MultsN, AddsN]<'G:II>(
44
go: interface['G],
55
a: ['G, 'G+1] W,
6-
x_0: ['G, 'G+1] W,
7-
x_1: ['G, 'G+1] W,
8-
x_2: ['G, 'G+1] W,
9-
x_3: ['G, 'G+1] W,
10-
x_4: ['G, 'G+1] W,
11-
x_5: ['G, 'G+1] W,
12-
x_6: ['G, 'G+1] W,
13-
x_7: ['G, 'G+1] W,
14-
x_8: ['G, 'G+1] W,
15-
x_9: ['G, 'G+1] W,
16-
x_10: ['G, 'G+1] W,
17-
x_11: ['G, 'G+1] W,
18-
x_12: ['G, 'G+1] W,
19-
x_13: ['G, 'G+1] W,
20-
x_14: ['G, 'G+1] W,
21-
x_15: ['G, 'G+1] W,
22-
y_0: ['G, 'G+1] W,
23-
y_1: ['G, 'G+1] W,
24-
y_2: ['G, 'G+1] W,
25-
y_3: ['G, 'G+1] W,
26-
y_4: ['G, 'G+1] W,
27-
y_5: ['G, 'G+1] W,
28-
y_6: ['G, 'G+1] W,
29-
y_7: ['G, 'G+1] W,
30-
y_8: ['G, 'G+1] W,
31-
y_9: ['G, 'G+1] W,
32-
y_10: ['G, 'G+1] W,
33-
y_11: ['G, 'G+1] W,
34-
y_12: ['G, 'G+1] W,
35-
y_13: ['G, 'G+1] W,
36-
y_14: ['G, 'G+1] W,
37-
y_15: ['G, 'G+1] W,
6+
x: ['G, 'G+1] W*N,
7+
y: ['G, 'G+1] W*N
388
) -> (
39-
out_0: ['G+L, 'G+L+1] W,
40-
out_1: ['G+L, 'G+L+1] W,
41-
out_2: ['G+L, 'G+L+1] W,
42-
out_3: ['G+L, 'G+L+1] W,
43-
out_4: ['G+L, 'G+L+1] W,
44-
out_5: ['G+L, 'G+L+1] W,
45-
out_6: ['G+L, 'G+L+1] W,
46-
out_7: ['G+L, 'G+L+1] W,
47-
out_8: ['G+L, 'G+L+1] W,
48-
out_9: ['G+L, 'G+L+1] W,
49-
out_10: ['G+L, 'G+L+1] W,
50-
out_11: ['G+L, 'G+L+1] W,
51-
out_12: ['G+L, 'G+L+1] W,
52-
out_13: ['G+L, 'G+L+1] W,
53-
out_14: ['G+L, 'G+L+1] W,
54-
out_15: ['G+L, 'G+L+1] W,
9+
out: ['G+L, 'G+L+1] W*N
5510
) with {
56-
let M = 8;
57-
let N = 16;
58-
let W = 32;
59-
let A = 8;
6011
some L where L > 0;
6112
some II where II > 0;
62-
} {
63-
64-
A := new Axpy[W, N, M, A];
65-
66-
bundle x[N]: ['G, 'G+1] W;
67-
bundle y[N]: ['G, 'G+1] W;
68-
69-
x{0} = x_0; x{1} = x_1; x{2} = x_2; x{3} = x_3;
70-
x{4} = x_4; x{5} = x_5; x{6} = x_6; x{7} = x_7;
71-
x{8} = x_8; x{9} = x_9; x{10} = x_10; x{11} = x_11;
72-
x{12} = x_12; x{13} = x_13; x{14} = x_14; x{15} = x_15;
73-
74-
y{0} = y_0; y{1} = y_1; y{2} = y_2; y{3} = y_3;
75-
y{4} = y_4; y{5} = y_5; y{6} = y_6; y{7} = y_7;
76-
y{8} = y_8; y{9} = y_9; y{10} = y_10; y{11} = y_11;
77-
y{12} = y_12; y{13} = y_13; y{14} = y_14; y{15} = y_15;
78-
79-
L := A::L;
80-
II := A::II;
81-
82-
a := A<'G>(a, x{0..N}, y{0..N});
83-
84-
out_0 = a.out{0}; out_1 = a.out{1}; out_2 = a.out{2}; out_3 = a.out{3};
85-
out_4 = a.out{4}; out_5 = a.out{5}; out_6 = a.out{6}; out_7 = a.out{7};
86-
out_8 = a.out{8}; out_9 = a.out{9}; out_10 = a.out{10}; out_11 = a.out{11};
87-
out_12 = a.out{12}; out_13 = a.out{13}; out_14 = a.out{14}; out_15 = a.out{15};
13+
} where W > 0,
14+
N > 0,
15+
MultsN > 0,
16+
AddsN > 0,
17+
N % MultsN == 0,
18+
MultsN % AddsN == 0
19+
{
20+
21+
har := new Harness[W, N, MultsN, AddsN];
22+
h := har<'G>(a, x, y);
23+
out = h.out;
24+
25+
II := har::II;
26+
L := har::L;
8827
}

apps/blas/axpy/test.fil.data

Lines changed: 0 additions & 35 deletions
This file was deleted.

apps/blas/axpy/test.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
params.main = [4, 4, 4, 4]

apps/blas/dot/harness.fil

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import "apps/blas/dot/dot.fil";
2+
import "primitives/reshape.fil";
3+
4+
comp Harness[W, N, MultsN]<'G:II>(
5+
go: interface['G],
6+
x: ['G, 'G+1] W*N,
7+
y: ['G, 'G+1] W*N
8+
) -> (
9+
out: ['G+L, 'G+L+1] W
10+
) with {
11+
some L where L > 0;
12+
some II where II > 0;
13+
} where W > 0,
14+
N > 0,
15+
MultsN > 0
16+
{
17+
x_vec := new SplitWire[W, N]<'G>(x);
18+
y_vec := new SplitWire[W, N]<'G>(y);
19+
20+
d := new Dot[W, N, MultsN];
21+
run_d := d<'G>(x_vec.out{0..N}, y_vec.out{0..N});
22+
23+
out = run_d.out;
24+
25+
II := d::II;
26+
L := d::L;
27+
}

apps/blas/dot/ports.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"inputs": {
3+
"x": {
4+
"type": "matrix",
5+
"dim": [4,1]
6+
},
7+
"y": {
8+
"type": "matrix",
9+
"dim": [4,1]
10+
}
11+
},
12+
"outputs": {
13+
"out": {
14+
"type": "scalar"
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)