Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activation unit #1

Merged
merged 210 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
c087fb8
build(requirements): add pytorch
gamzeisl Sep 3, 2024
a17a7ee
build(requirements): add pytest
gamzeisl Sep 3, 2024
840f9f7
test(py-ita): add feedforward size parameter
TimonFercho Apr 28, 2024
5b273e4
test(test-generator): add feedforward parameter and adjust output path
TimonFercho Apr 28, 2024
43671fe
feat(py-ita): extend print_properties with feedforward size
TimonFercho Apr 28, 2024
cb9838d
feat(py-ita). implement floating point i_poly
TimonFercho Apr 28, 2024
ac44139
feat(py-ita): add i_poly_wrapper function
TimonFercho Apr 28, 2024
57a2520
build(requirements): add pytest-check
TimonFercho Apr 29, 2024
6babe4b
feat(py-ita): add symmetric (de-)quantization functions
TimonFercho Apr 29, 2024
963995b
feat(py-ita): add functions for floating point poly and erf
TimonFercho Apr 29, 2024
7718585
test(py-ita): add test for quantization, poly and erf functions
TimonFercho Apr 29, 2024
c7b7cde
fix(py-ita): fix q_c typo from definition
TimonFercho Apr 29, 2024
9eacf08
feat(py-ita): implement floating point i_gelu
TimonFercho Apr 29, 2024
1a89be3
test(py-ita): add i_gelu tests
TimonFercho Apr 29, 2024
0362520
fix(py-ita): fix ipoly types to avoid overflow
TimonFercho May 5, 2024
2e2fd90
refactor(py-ita): type i-gelu and i-erf
TimonFercho May 5, 2024
f9701e2
test(py-ita): clean up and pretty print
TimonFercho May 5, 2024
1e460c6
refactor(py-ita): fix typo
TimonFercho May 5, 2024
13d7e4e
test(py-ita): make scaling factor output more readable
TimonFercho May 5, 2024
b8298a8
test(py-ita): verify i-gelu domain interval [b, -b]
TimonFercho May 5, 2024
bd3d588
test(py-ita): add error plotting
TimonFercho May 5, 2024
0555a27
refactor(py-ita): rename variable
TimonFercho May 5, 2024
bd005fe
feat(py-ita): add missing imports
TimonFercho May 5, 2024
e5588a7
feat(py-ita): add gelu golden model based on random preactivation values
TimonFercho May 5, 2024
ab46f67
feat(ita-tb): adjustments for feedforward parameter
TimonFercho May 5, 2024
2cd0b5f
feat(return-status): adjust parameters and check number of outputs
TimonFercho May 5, 2024
0c96449
build(makefile): add feedforward parameter
TimonFercho May 5, 2024
1ced88d
build(gitlab-ci): adjust for new parameters
TimonFercho May 5, 2024
2651df8
fix(test-generator): typo in simvector path
TimonFercho May 5, 2024
8680d6a
fix(test-generator): fix and refactor simvector paths
TimonFercho May 5, 2024
51fd82c
feat(py-ita): write out gelu constants
TimonFercho May 6, 2024
e8d1d5e
feat(gelu-tb): add testbench skeleton
TimonFercho May 6, 2024
9fd8fa8
feat(accel-pkg): add gelu bit width parameters
TimonFercho May 6, 2024
505d9b2
feat(gelu): add initial scalar gelu
TimonFercho May 6, 2024
d2be389
build(bender): add gelu and gelu testbench
TimonFercho May 6, 2024
b7874df
feat(modelsim): add gelu simulation script
TimonFercho May 6, 2024
112f69c
build(modelsim): add gelu simulation target
TimonFercho May 6, 2024
5d427ba
test(gelu-tb): validate scalar gelu for all activations from precompu…
TimonFercho May 6, 2024
d53fa63
chore(gitignore): ignore vscode settings.json
TimonFercho May 6, 2024
fd07bb6
fix(py-ita): clip i-gelu within valid range -127, 127
TimonFercho May 12, 2024
0a4ffbd
test(py-ita): add tests for i-gelu edge cases
TimonFercho May 12, 2024
56ec4fe
refactor(gelu): explicitly sign-extend input to output bit width
TimonFercho May 12, 2024
bd18157
fix(gelu): clip input within valid bounds
TimonFercho May 12, 2024
35c970b
stlye(gelu): auto-format
gamzeisl Sep 3, 2024
4135e6f
feat(py-ita): implement i-gelu with requantization
TimonFercho May 12, 2024
9df9fd0
test(py-ita): add tests for i-gelu with requantization
TimonFercho May 12, 2024
41ca067
feat(py-ita): use 8 bit eps_mul for requantizer i-gelu
TimonFercho May 12, 2024
ab2ce89
test(py-ita): auto-format
TimonFercho May 12, 2024
828d4c4
feat(py-ita): write out i-gelu requantization constants
TimonFercho May 12, 2024
a617613
test(gelu): read and apply gelu requantization constants
TimonFercho May 12, 2024
c50f82e
feat(gelu): implement requantization
TimonFercho May 12, 2024
69dcae9
test(gelu): remove redundant print statements
TimonFercho May 12, 2024
ce6b980
refactor(gelu): rename types
TimonFercho May 12, 2024
4223674
refactor(gelu): use correct type for add
TimonFercho May 13, 2024
ff027cd
test(gelu): refactor to test higher-level activation module instead o…
gamzeisl Sep 3, 2024
3e54818
feat(relu): add RELU activation module
TimonFercho May 13, 2024
6e08608
feat(activation): add module which lifts GELU and RELU to match outpu…
TimonFercho May 13, 2024
812dc73
feat(accel-pkg): add enum to select activation function
TimonFercho May 13, 2024
268196c
build: adjust simulation and build files for activation testbench
gamzeisl Sep 3, 2024
5823ca1
test(activation): read activations in blocks of N_PE size
TimonFercho May 13, 2024
12c2581
test(activation): also verify ReLU and identity activations
TimonFercho May 13, 2024
1555fe8
test(activation-tb): extract validation function to reduce redandancies
TimonFercho May 13, 2024
00e92ef
test(activation-tb): rename variables holding gelu constants for clarity
TimonFercho May 13, 2024
c0c3177
refactor(py-ita): rename files for GELU constants for clarity
TimonFercho May 13, 2024
a78a55b
test(activation-tb): extract function which reads all GELU constants
TimonFercho May 13, 2024
b96681b
test(activation-tb): fix equality check + refactor reading of GELU co…
TimonFercho May 13, 2024
00b9986
test(activation-tb): parametrize function for reading GELU constants
TimonFercho May 13, 2024
cfba15d
refactor(activation): reorder inputs
TimonFercho May 13, 2024
da4dc6c
feat(accel-pkg): extend controller interface with constants for GELU …
TimonFercho May 13, 2024
0010200
feat(ita): insert activation module in datapath between requantizer a…
TimonFercho May 13, 2024
5797220
test(ita-tb): supply ITA with additional activation-related control s…
TimonFercho May 13, 2024
e4a78fe
feat(py-ita): implement almost symmetric quantization
TimonFercho May 16, 2024
b9e0dcc
test(py-ita): add simple test for almost symmetric quantization
TimonFercho May 16, 2024
d07f5fe
test(py-ita): fix last test case of quantize
TimonFercho May 16, 2024
414c18c
test(py-ita): use almost symmetric quantization instead of symmetric …
TimonFercho May 16, 2024
1265712
fix(ita): compute scaling factor based on almost symmetric quantization
TimonFercho May 16, 2024
04249e7
fix(gelu): remove edge case treatment of q=-128, no longer necessary …
TimonFercho May 16, 2024
e09fa65
refactor(activation): rename requant variables and extract typedefs
TimonFercho May 16, 2024
728890f
refactor(gelu): extract type for gelu output
TimonFercho May 17, 2024
0af5eb8
fix(py-ita): make sure to round before clipping and properly apply ha…
TimonFercho May 17, 2024
a3e4790
feat(py-ita): ensure requantization constants are unsigned and compen…
TimonFercho May 17, 2024
9236371
test(py-ita): reduce error tolerances
TimonFercho May 17, 2024
1cca3a8
feat(activation): apply requantization using existing vector module i…
gamzeisl Sep 3, 2024
2504a98
test(activation-tb): account for requantization latency
TimonFercho May 17, 2024
550cc4b
refactor(activation): reorder condition for clarity
gamzeisl Sep 3, 2024
94682d1
test(activation-tb): make sure to use the correct input file when exp…
TimonFercho May 17, 2024
7d41f51
refactor(fifo-controller): rename port for clarity
TimonFercho May 17, 2024
38a5ae9
fix(fifo-controller): delay insertion by two cycles to account for ac…
TimonFercho May 17, 2024
fd9f510
feat(activation): don't introduce unnecessary delay for RELU and IDEN…
gamzeisl Sep 3, 2024
00a589b
test(activation-tb): extend and refactor for requantized GELU
TimonFercho May 19, 2024
99cf753
feat(fifo-controller): let fifo insertion condition depend on activat…
TimonFercho May 19, 2024
68898bd
refactor(ita): rename fifo controller port
TimonFercho May 19, 2024
11b6a4e
refactor(relu): use typedef for clarity
TimonFercho May 19, 2024
2566f6e
feat(py-ita): allow choosing activation function for step 6
TimonFercho May 20, 2024
ed5a9d6
feat(ita): delay activation signal to keep in sync with activation input
TimonFercho May 20, 2024
0548c8c
test(ita-tb): make value mismatch info more verbose
TimonFercho May 20, 2024
abf0dbf
test(ita-tb): use RELU activation by default
TimonFercho May 20, 2024
f3abd65
feat(activation): fix activation latency to two cycles
gamzeisl Sep 3, 2024
4e44cc2
fix(fifo-controller): account for fixed latency of activation module
TimonFercho May 22, 2024
205e44e
fix(ita): account for fixed latency of activation module
TimonFercho May 22, 2024
131e871
test(ita-tb): use GELU activation by default
TimonFercho May 22, 2024
c8c13b1
feat(py-ita): use GELU activation by default
TimonFercho May 22, 2024
1f38b33
test(ita-tb): introduce activation parameter and set to identity by d…
TimonFercho May 22, 2024
4325925
feat(py-ita): allow setting activation function using command line ar…
TimonFercho May 22, 2024
2a57107
test(ita-tb): expose activation function as parameter
TimonFercho May 22, 2024
5566813
build(makefile): allow configuring activation function
TimonFercho May 22, 2024
ed2e0e4
test(activation-tb): fix latency
TimonFercho May 23, 2024
53b397c
refactor(accel_pkg): clean up typedefs
TimonFercho May 24, 2024
856d400
refactor(ita): remove unused first_inner_tile signal
TimonFercho May 24, 2024
f38296c
feat(activation): requantize relu output
TimonFercho May 24, 2024
1291b23
feat(py-ita): requantize relu output
TimonFercho May 24, 2024
4453b2e
test(activation-tb): read requantized relu output from generated file
TimonFercho May 24, 2024
07104d0
refactor(test-ITA): move plot files into subdir
TimonFercho May 25, 2024
fe22029
chore(gitignore): ignore pytest cache
TimonFercho May 25, 2024
74d933c
test(activation-tb): rewrite debug msg
TimonFercho May 25, 2024
b22f883
refactor(ita): rename gelu requant constants to more general activati…
TimonFercho May 25, 2024
9fd5301
build(requirements): set up pre-commit hooks for auto-formatting pyth…
TimonFercho May 25, 2024
80c978b
style: auto-format files with yapf
gamzeisl Sep 3, 2024
4d742d5
build(pre-commit-config): add some linters like checking for trailing…
TimonFercho May 25, 2024
8727522
style: fix trailing whitespace
gamzeisl Sep 3, 2024
cf8faca
test(py-ita): fix plot dir
TimonFercho May 26, 2024
6d9a208
refactor(ita): remove unused signals
TimonFercho May 25, 2024
1dbc91a
refactor(accel-pkg): reorganize for clarity
TimonFercho May 25, 2024
aeae700
feat(ita): add requantization controller which decouples state value …
gamzeisl Sep 3, 2024
9836319
refactor(requantizer): incorporate new requant_mode type
TimonFercho May 25, 2024
2d2e640
test(activation-tb): use new requant_mode type
TimonFercho May 25, 2024
35225e2
refactor: make enums camel case
TimonFercho May 25, 2024
92331b2
feat(accel-pkg): add feedforward layer type
TimonFercho May 25, 2024
7b92775
refactor(py-ita): extract apply_activation function
TimonFercho May 25, 2024
75fdc1f
refactor(py-ita): vectorize apply_activation
TimonFercho May 25, 2024
2f322c2
test(activation-tb): update file names of activation requant constants
TimonFercho May 25, 2024
a8d7db4
feat(py-ita): update file names of activation requant constants
TimonFercho May 25, 2024
1892a95
test(ita-tb): rename files of activation and gelu constants
TimonFercho May 25, 2024
5d97930
test(ita-tb): extend testbench to run a single feedforward layer with…
TimonFercho May 25, 2024
dae3de1
feat(py-ita): generate testvectors for feedforward layer
TimonFercho May 25, 2024
f134049
feat(requantization-controller): reuse requantization constants at in…
TimonFercho May 25, 2024
3169fad
feat(accel-pkg): extend interface with layer mode and number of feedf…
TimonFercho May 25, 2024
8d72902
feat(controller): extend FSM for feedforward layer
TimonFercho May 25, 2024
75098f5
feat(py-ita): execute arbitrary activation in feedforward layer
TimonFercho May 25, 2024
24d9a64
test(ita-tb): allow executing arbitrary activation function for feedf…
TimonFercho May 25, 2024
e00531f
feat(py-ita): add second stage with identity activation to feedforwar…
TimonFercho May 25, 2024
b3d5532
test(ita-tb): execute second stage with identity activation in feedfo…
TimonFercho May 25, 2024
2b79d2a
fix(ita): use correct imported function
TimonFercho Jun 9, 2024
80f7522
fix(py-ita): use instance field instead of removed local
TimonFercho Jun 9, 2024
aeaf93e
fix(py-ita): call correct functions
TimonFercho Jun 9, 2024
aba51ef
refactor(makefile): remove duplicate variable definitions
TimonFercho May 26, 2024
ea19197
refactor(ita-tb): rename projection size to projection space
TimonFercho May 26, 2024
876b25c
fix(py-ita): use RQS constants at index 0 for 2nd FF layer
TimonFercho Jun 9, 2024
5a89a08
fix(ita-tb): add missing required finish_number argument for $fatal call
TimonFercho Jun 10, 2024
a5fbba8
fix(hwpe-ita-tb): add missing required finish_number argument for $fa…
TimonFercho Jun 10, 2024
cba4498
refactor(accel-pkg): rename layer typedef
TimonFercho May 26, 2024
813bfbf
refactor(accel-pkg): reorder ctrl fields
TimonFercho May 26, 2024
cf6a2e6
test(ita-tb): use matching types
TimonFercho May 27, 2024
9924f64
refactor(ita-tb): rename activation constant variables
TimonFercho May 27, 2024
3369e98
refactor(ita-tb): rename index variable since it has no relationship …
TimonFercho May 27, 2024
6f9df58
fix(hwpe-ita-tb): fix simdir path
TimonFercho Jun 10, 2024
0bdfeed
fix(ita-package): update control engine to match control struct in ac…
TimonFercho Jun 10, 2024
129c3b7
test(hwpe-ita-tb): print correct base ptrs
TimonFercho Jun 10, 2024
5a1e5d6
fix(hwpe-ita-tb): create arrays of correct size so that indexing with…
TimonFercho Jun 10, 2024
dac05b2
feat(ita-package): reorder control engine type
TimonFercho Jun 10, 2024
1705931
refactor(ita-package): remove redundant definition of control engine …
TimonFercho Jun 10, 2024
e5a7cb2
feat(ita-package): extend register mapping for feedforward layer
TimonFercho Jun 10, 2024
23e4179
refactor(accel-pkg): explicitly state enum type to allow direct assig…
TimonFercho Jun 10, 2024
c005bad
style(ita-package): formatting
TimonFercho Jun 10, 2024
a6ff617
feat(hwpe-ita-tb): load constants and prepare registers for feedforwa…
TimonFercho Jun 10, 2024
43a0a37
feat(ita-ctrl): pass constants and control signals for feedforward la…
TimonFercho Jun 10, 2024
d0944c8
refactor(accel-pkg): explicitely compute N_STATES parameter
TimonFercho Jun 12, 2024
be561b9
refactor(py-ita): extract memfile constant
TimonFercho Jun 12, 2024
315d6ad
fix(py-ita): include all files in file list for hwpe
TimonFercho Jun 13, 2024
87577f5
perf(gelu): apply strength reduction to remove signed mult when compu…
TimonFercho Jun 18, 2024
c7eebf1
perf(gelu): reduce intermediate bitwidths
TimonFercho Jun 18, 2024
1615d6b
perf(gelu): use lower bitwidth for poly_d
TimonFercho Jun 18, 2024
17c1a21
feat(py-ita): export mempool and snitch cluster on demand
TimonFercho Jun 18, 2024
283e749
chore(gitlab-ci): use gelu activation for FF layer by default
TimonFercho Jun 18, 2024
26c55ff
feat(activation): pipeline gelu
gamzeisl Sep 3, 2024
5a35b46
feat(accel-pkg): increase FIFO depth to account for gelu pipelining
TimonFercho Jun 18, 2024
69ed6da
test(activation-tb): adjust for increased latency
TimonFercho Jun 18, 2024
3eabd07
test(ita-tb): fix input, weight and output timing
TimonFercho Jun 18, 2024
467e6b7
test(activation-tb): fix latency for identity
TimonFercho Jun 18, 2024
5dfc862
refactor(gelu): split up combinational block by stages
TimonFercho Jun 18, 2024
520cadd
perf(activation): reduce flop resources for RELU buffering by 70% by …
TimonFercho Jun 18, 2024
2e23829
fix(ita): delay activation control signal until end of activation com…
TimonFercho Jun 23, 2024
0ec18b9
perf(gelu): use calc_en signal to only compute during valid cycles
TimonFercho Jun 23, 2024
46120f2
test(activation): add extra calc_en input
TimonFercho Jun 23, 2024
ea4d762
refactor(accel-pkg): removed unused fields in control_t
TimonFercho Jun 26, 2024
866db19
test(ita-tb): don't reference unused control_t fields
TimonFercho Jun 26, 2024
9c0421f
refactor(gelu): merge gelu one and gelu b constants
TimonFercho Jun 28, 2024
22686fe
test(activation): removed unused signal
TimonFercho Jun 28, 2024
b264e91
fix(py-ita): correctly compute L2 error
gamzeisl Sep 3, 2024
9573935
refactor(ita-package): remove unused gelu one constant
TimonFercho Jun 28, 2024
fcda25d
chore(accel-pkg): increase fifo depth
TimonFercho Jul 18, 2024
beb4cfc
build(ci): fix mismatch of generated testvectors
TimonFercho Jul 18, 2024
90e4d13
feat(return-status): add ff checks
gamzeisl Sep 3, 2024
774ab10
change(hwpe-pkg): do not reuse regs for activations
gamzeisl Sep 4, 2024
f4c85d3
fix(ita_tb): lower input valid signal after handshake
gamzeisl Sep 4, 2024
00555ef
feat: add support for two layer ffn
gamzeisl Sep 4, 2024
29dce4c
fix(PyITA): correct random vector gen for ffn
gamzeisl Sep 4, 2024
6b18f84
feat(PyITA): write hwpe files for ffn
gamzeisl Sep 4, 2024
e1941c5
feat(hwpe_tb): extend to test ffn
gamzeisl Sep 4, 2024
82f56d9
fix(PyITA): correct typecast in gelu
gamzeisl Sep 4, 2024
a7a6e79
change(ci): add activation to hwpe sim
gamzeisl Sep 6, 2024
18bee9d
feat(PyITA): add separate requantization params for ffn
gamzeisl Sep 6, 2024
ac33aa5
feat(hw): add separate ffn requant params
gamzeisl Sep 6, 2024
2ab2114
[PyITA] Move GELU functions
gamzeisl Sep 24, 2024
7a22227
[ci] Add tests with relu
gamzeisl Sep 24, 2024
8ebfda6
[PyITA] Modify license headers
gamzeisl Sep 24, 2024
f54f25c
Remove config yaml file
gamzeisl Sep 24, 2024
dc5d411
Add header
gamzeisl Sep 24, 2024
b72dcbf
Fix python format
gamzeisl Sep 24, 2024
d5b724a
Add relu test vectors to ci
gamzeisl Sep 24, 2024
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ simvectors/

# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache/
*.py[cod]
*$py.class

Expand All @@ -22,10 +23,9 @@ dist
# Jupyter Notebook
.ipynb_checkpoints

# Ignore everything in .vscode except launch.json
# Ignore everything in .vscode with some exceptions
.vscode/*
!.vscode/launch.json
!.vscode/settings.json
!.vscode/c_cpp_properties.json

simvectors
Expand Down
31 changes: 25 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ generate_testvectors:
stage: test
script:
- !reference [.setup_test, script]
- python testGenerator.py -H 1 -S 64 -E 64 -P 64
- python testGenerator.py -H 1 -S 128 -E 192 -P 256
- 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
artifacts:
paths:
- simvectors
Expand All @@ -42,13 +43,22 @@ run_sim:
- S: 64
E: 64
P: 64
F: 64
activation: gelu
- S: 128
E: 192
P: 256
F: 256
activation: gelu
- S: 192
E: 256
P: 128
F: 128
activation: relu
script:
- make bender
- make sim VSIM_FLAGS=-c s=$S e=$E p=$P bias=1
- ./modelsim/return_status.sh modelsim/build/transcript $S $E ita_tb
- make sim VSIM_FLAGS=-c s=$S e=$E p=$P f=$F bias=1 activation=$activation
- ./modelsim/return_status.sh modelsim/build/transcript $S $E $P $F ita_tb

run_hwpe_sim:
stage: sim
Expand All @@ -59,10 +69,19 @@ run_hwpe_sim:
- S: 64
E: 64
P: 64
F: 64
activation: gelu
- S: 128
E: 192
P: 256
F: 256
activation: gelu
- S: 192
E: 256
P: 128
F: 128
activation: relu
script:
- make bender
- make sim VSIM_FLAGS=-c DEBUG=OFF target=sim_ita_hwpe_tb s=$S e=$E p=$P bias=1
- ./modelsim/return_status.sh modelsim/build/transcript $S $E hwpe_tb
- make sim VSIM_FLAGS=-c DEBUG=OFF target=sim_ita_hwpe_tb s=$S e=$E p=$P f=$F bias=1 activation=$activation
- ./modelsim/return_status.sh modelsim/build/transcript $S $E $P $F hwpe_tb
5 changes: 5 additions & 0 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ sources:
- src/ita_weight_controller.sv
- src/ita.sv
- src/ita_max_finder.sv
- src/ita_gelu.sv
- src/ita_relu.sv
- src/ita_activation.sv
- src/ita_requantization_controller.sv

# HWPE sources
- target: ita_hwpe
Expand All @@ -72,6 +76,7 @@ sources:
- src/tb/ita_tb.sv
- src/tb/clk_rst_gen.sv
- src/tb/rst_gen.sv
- src/tb/activation_tb.sv

# HWPE TB sources
- target: ita_hwpe_test
Expand Down
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ target ?= sim_ita_tb

no_stalls ?= 0
s ?= 64
p ?= 64
e ?= 64
e ?= 128
p ?= 192
f ?= 256
bias ?= 0
vlog_defs += -DNO_STALLS=$(no_stalls) -DSEQ_LENGTH=$(s) -DPROJ_SPACE=$(p) -DEMBED_SIZE=$(e) -DBIAS=$(bias)
activation ?= identity
ifeq ($(activation), gelu)
activation_int = 1
else ifeq ($(activation), relu)
activation_int = 2
else
activation_int = 0
endif
vlog_defs += -DNO_STALLS=$(no_stalls) -DSEQ_LENGTH=$(s) -DEMBED_SIZE=$(e) -DPROJ_SPACE=$(p) -DFF_SIZE=$(f) -DBIAS=$(bias) -DACTIVATION=$(activation_int)

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