Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
82fd85c
[feature] WIP Support arbitrary matrix shapes
Xeratec Sep 24, 2024
7d07f84
[change] Speedup CI by removing Python Dependencies
Xeratec Sep 24, 2024
2401587
Added debug.py to print matrices
Oct 13, 2024
f6d1100
Small changes in the debug.py file
Oct 13, 2024
c80f81f
Small changes in ita_controller.sv
Oct 15, 2024
d993c04
Started with the bias padding not finished yet
Oct 16, 2024
267850e
Bias padding solution with exactly 8 errors for each phase
Oct 20, 2024
8534850
Added additional buffer for bias values
Oct 21, 2024
08fa963
No buffering in the controller
Oct 21, 2024
abf4d18
Changed count_q foto (count_q-1) for the bias padding
Oct 23, 2024
fd7ae83
Added waves
Oct 23, 2024
22e835c
Added ctrl.ff_size for feedforward layer
Oct 25, 2024
64732e4
Bias padding works now but with quick fix
Oct 25, 2024
8f0d19a
count_q - 1 solution works for one tile
Oct 29, 2024
3c6040c
This version works for data_S127_E50_P64_F64_H1_B1 but not for data_S…
Oct 29, 2024
0094c11
No ebugs for bias padding detected one bug without bias in phase 5
Oct 30, 2024
2a04d89
Just errors in phase 5 and 6
Oct 30, 2024
aab0df5
No bugs in all phases
Oct 30, 2024
64978c1
Bias padding for all phases without bugs
Oct 31, 2024
d433625
Added test vectors in the gitlab-ci
Nov 8, 2024
8d4de04
Fixes in gitlab-ci
Nov 8, 2024
55ac726
Added license on top sim_ita_tb_wave_important.tcl
Nov 8, 2024
bf27488
Pipelining test
Nov 8, 2024
83290ae
Changed bias for test vectors in gitlab-ci
Nov 8, 2024
3db2ff7
Fixed synthesize errors
Nov 18, 2024
0ec7089
Fixed synthesize error
Nov 18, 2024
510b243
Started to add the triangular mask logic
Nov 14, 2024
3a61237
Upper triangular mask works for one tile
Nov 16, 2024
980a755
Test for multiple tiles
Nov 18, 2024
0109e78
This version works for one tile
Nov 18, 2024
f0a1605
Simulation error
Nov 19, 2024
457266c
Fixed simulation error
Nov 19, 2024
b7a2554
Pipelined step_q
Nov 20, 2024
3063d62
Changing the branch to adapt the golden model
Nov 21, 2024
c06cfa2
Changed the softmac function in the golden model
Nov 23, 2024
1c71277
Error in golden model
Nov 24, 2024
966e7d6
Errors in streamingPartialSoftmax function not solved
Nov 25, 2024
4bd29e3
Only four wrong values for 1 tile
Nov 26, 2024
07771e9
Four errors left for one tile
Nov 27, 2024
557ac19
Still searching for the reason for the four errors
Nov 29, 2024
b267458
Started to add the logic for more than one tile
Dec 1, 2024
d0ccc19
Works for two tiles but only with index smaller than 64
Dec 2, 2024
6d5c804
Test with s=511
Dec 2, 2024
b9bd447
Works now for multiple tiles but not extensively tested yet
Dec 3, 2024
2841115
Upper triangular mask works for multiple tiles
Dec 4, 2024
5612e8d
All triangular mask shapes work
Dec 5, 2024
b3068b1
Added functionality for the strided mask but not tested yet
Dec 8, 2024
9dbbd8e
Made new masking module
Dec 12, 2024
27a0e37
Added more masks in the golden model
Dec 13, 2024
343b6a9
Added upper and lower strided masks
Dec 13, 2024
b18f1d8
Added the strided sliding window mask but not working yet
Dec 16, 2024
a915d5b
Changes for automated tests
Jan 10, 2025
b400e51
Tested and synthesized
Jan 13, 2025
e38cd36
hwpe tb setup script with masking
Ludi-1 Feb 24, 2025
2443aee
mask working in hwpe tb
Ludi-1 Feb 26, 2025
ca34e72
clean up code and repo
Ludi-1 Mar 3, 2025
f2b8232
clean up whitespace
Ludi-1 Mar 3, 2025
8e01074
run script to cmd mode
Ludi-1 Mar 3, 2025
c11c5b2
Merge pull request #1 from Ludi-1/strided_mask_power_of_two
Ludi-1 Mar 3, 2025
105f448
Merge branch 'main' into strided_mask_power_of_two
Ludi-1 Mar 3, 2025
399455c
update softmax shift parameter
Ludi-1 Mar 4, 2025
c1861c1
clean sim
Ludi-1 Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 78 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ generate_testvectors:
stage: test
script:
- !reference [.setup_test, script]
- python testGenerator.py -H 1 -S 64 -E 64 -P 64 -F 64 --activation gelu
- python testGenerator.py -H 1 -S 128 -E 192 -P 256 -F 256 --activation gelu
- python testGenerator.py -H 1 -S 192 -E 256 -P 128 -F 128 --activation relu
- python testGenerator.py -H 1 -S 64 -E 64 -P 64 -F 64 --activation gelu --skip-vector-validation
- python testGenerator.py -H 1 -S 128 -E 192 -P 256 -F 256 --activation gelu --skip-vector-validation
- python testGenerator.py -H 1 -S 192 -E 256 -P 128 -F 128 --activation relu --skip-vector-validation
- python testGenerator.py -H 1 -S 1 -E 2 -P 3 -F 3 --activation gelu --skip-vector-validation
- python testGenerator.py -H 1 -S 1 -E 2 -P 3 -F 3 --activation relu --skip-vector-validation
- python testGenerator.py -H 1 -S 63 -E 62 -P 61 -F 61 --activation relu --skip-vector-validation
- python testGenerator.py -H 1 -S 65 -E 130 -P 195 -F 195 --activation relu --skip-vector-validation
- python testGenerator.py -H 1 -S 127 -E 190 -P 253 -F 253 --activation relu --skip-vector-validation
- python testGenerator.py -H 1 -S 511 -E 511 -P 127 -F 63 --activation relu --skip-vector-validation
- python testGenerator.py -H 1 -S 63 -E 63 -P 50 -F 129 --activation gelu --skip-vector-validation
- python testGenerator.py -H 1 -S 255 -E 63 -P 511 -F 511 --activation identity --skip-vector-validation
Comment on lines +29 to +39
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is --skip-vector-validation required for all?

artifacts:
paths:
- simvectors
Expand Down Expand Up @@ -94,6 +102,73 @@ run_sim:
- make sim VSIM_FLAGS=-c s=$S e=$E p=$P f=$F bias=1 activation=$activation no_stalls=$no_stalls single_attention=$single_attention
- ./modelsim/return_status.sh modelsim/build/transcript $S $E $P $F ita_tb

run_sim_padding:
stage: sim
needs:
- generate_testvectors
parallel:
matrix:
- S: 1
E: 2
P: 3
F: 3
activation: gelu
no_stalls: 0
single_attention: 0
- S: 1
E: 2
P: 3
F: 3
activation: relu
no_stalls: 0
single_attention: 0
- S: 63
E: 62
P: 61
F: 61
activation: relu
no_stalls: 0
single_attention: 0
- S: 65
E: 130
P: 195
F: 195
activation: relu
no_stalls: 0
single_attention: 0
- S: 127
E: 190
P: 253
F: 253
activation: relu
no_stalls: 0
single_attention: 0
- S: 511
E: 511
P: 127
F: 63
activation: relu
no_stalls: 0
single_attention: 0
- S: 63
E: 63
P: 50
F: 129
activation: gelu
no_stalls: 0
single_attention: 0
- S: 255
E: 63
P: 511
F: 511
activation: identity
no_stalls: 0
single_attention: 0
script:
- make bender
- make sim VSIM_FLAGS=-c s=$S e=$E p=$P f=$F bias=1 activation=$activation no_stalls=$no_stalls single_attention=$single_attention
- ./modelsim/return_status.sh modelsim/build/transcript $S $E $P $F ita_tb

run_hwpe_sim:
stage: sim
needs:
Expand Down
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"-S${input:seq_len}",
"-E${input:emb_len}",
"-P${input:prj_len}",
"--no-bias"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change shouldn't be required

],
}
],
Expand Down
3 changes: 0 additions & 3 deletions .yapfignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed? By mistake?

This file was deleted.

4 changes: 2 additions & 2 deletions Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ packages:
- common_verification
- tech_cells_generic
common_verification:
revision: 9c07fa860593b2caabd9b5681740c25fac04b878
version: 0.2.3
revision: fb1885f48ea46164a10568aeff51884389f67ae3
version: 0.2.5
source:
Git: https://github.com/pulp-platform/common_verification.git
dependencies: []
Expand Down
1 change: 1 addition & 0 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ sources:
# Individual source files are simple string entries:
- src/ita_package.sv
- src/ita_accumulator.sv
- src/ita_masking.sv
- src/ita_controller.sv
- src/ita_dotp.sv
- src/ita_fifo_controller.sv
Expand Down
27 changes: 25 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ BENDER_INSTALL_DIR = ${INSTALL_DIR}/bender
VENV_BIN=venv/bin/

BENDER_VERSION = 0.28.1
SIM_PATH ?= modelsim/build
SIM_FOLDER ?= build
SIM_PATH ?= modelsim/${SIM_FOLDER}
SYNTH_PATH = synopsys

BENDER_TARGETS = -t rtl -t test
Expand All @@ -34,7 +35,29 @@ else ifeq ($(activation), relu)
else
activation_int = 0
endif
vlog_defs += -DNO_STALLS=$(no_stalls) -DSINGLE_ATTENTION=$(single_attention) -DSEQ_LENGTH=$(s) -DEMBED_SIZE=$(e) -DPROJ_SPACE=$(p) -DFF_SIZE=$(f) -DBIAS=$(bias) -DACTIVATION=$(activation_int)

mask ?= none
ifeq ($(mask), upper_triangular)
mask_int = 1
else ifeq ($(mask), lower_triangular)
mask_int = 2
else ifeq ($(mask), strided)
mask_int = 3
else ifeq ($(mask), upper_strided)
mask_int = 4
else ifeq ($(mask), lower_strided)
mask_int = 5
else ifeq ($(mask), sliding_window)
mask_int = 6
else ifeq ($(mask), strided_sliding_window)
mask_int = 7
else
mask_int = 0
endif

i ?= 1

vlog_defs += -DNO_STALLS=$(no_stalls) -DSINGLE_ATTENTION=$(single_attention) -DSEQ_LENGTH=$(s) -DEMBED_SIZE=$(e) -DPROJ_SPACE=$(p) -DFF_SIZE=$(f) -DBIAS=$(bias) -DACTIVATION=$(activation_int) -DMASK=$(mask_int) -DMASK_INDEX=$(i)

ifeq ($(target), sim_ita_hwpe_tb)
BENDER_TARGETS += -t ita_hwpe -t ita_hwpe_test
Expand Down
Loading
Loading