Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
df16a13
Working matmul with cluster_it != 0
Jun 23, 2023
7825955
Fixed header file generator and source code.
Jun 26, 2023
aca6689
Added cluster index input in timer functions.
Jul 24, 2023
4ef7bbc
Fixed references to code sections.
Aug 11, 2023
f844cc4
Adapted mchan tests header files to new memory map.
Aug 12, 2023
ffbb263
Removed some mchan tests from pulp_cluster-mchan-tests.yaml because CI
Aug 13, 2023
1fc2c42
Added RedMulE test.
Sep 9, 2023
7ee9073
Cleaner HWPE test integration, added DMA-based tensors
Sep 11, 2023
5489a97
Updated HWPE test, restored old CI script for mchan tests
Sep 30, 2023
6054589
Added carfield-related regressions.
Oct 24, 2023
f55e676
Added DMR matmul to carfield regressions.
Oct 30, 2023
2f73220
Add test for the FPUs of the cluster cores
Oct 3, 2023
1b76c54
Rename application in makefiles
Jan 26, 2024
d16fe2b
Change matmul golden.
Jan 27, 2024
b85310f
Add YAML script for the CI.
Feb 10, 2024
8c9dc7e
Update headers in parallel bare tests.
Feb 10, 2024
cf35cd0
Add yaml file to automate execution of Carfield tests
ricted98 Feb 12, 2024
6d31694
Merge pull request #10 from pulp-platform/rt/automate-carfield-regres…
yvantor Feb 13, 2024
11479f8
Added regression test for TCDM scrubber,
Feb 27, 2024
460e60d
Fix error-checking function.
Feb 28, 2024
60fc494
Merge pull request #11 from pulp-platform/yt/tcdm-scrubber
yvantor Feb 28, 2024
28823bc
Add fault injection capabilities to selected tests
ricted98 Feb 28, 2024
8c22bb3
Update ECC test to inject single or multiple bitflips
ricted98 Mar 6, 2024
1563f08
Use XOR over OR in ECC test return condition
ricted98 Mar 6, 2024
e2f8b83
Merge pull request #12 from pulp-platform/rt/fault-injection
yvantor Mar 9, 2024
ad3aeef
Fix fault injection toggle via CLI
ricted98 Mar 11, 2024
4fb88f0
Merge pull request #13 from pulp-platform/rt/fault-injection
yvantor Mar 13, 2024
126a1c5
Add astral target.
Mar 23, 2024
b7ad8bf
Add N-EUREKA regression test (not fully self-checking, very minimal)
FrancescoConti Mar 26, 2024
921d02f
Fix version of pulp-nnx
FrancescoConti Mar 26, 2024
aa5803a
Use symlinks to avoid code duplication
ricted98 Mar 27, 2024
1601f56
Update carfield.yaml
ricted98 Mar 27, 2024
3900938
Merge pull request #15 from pulp-platform/yt/tout-config
yvantor Mar 27, 2024
832c4fc
Merge pull request #16 from pulp-platform/fconti/neureka
yvantor Mar 27, 2024
2329b5a
Update astral target
ricted98 Mar 29, 2024
484768e
Fix ECC scrubber test return value
ricted98 Mar 29, 2024
f220679
Merge pull request #17 from pulp-platform/rt/align-astral
yvantor Apr 8, 2024
c4af4dd
Added softex tests
belanoa May 7, 2024
9da7fb2
Merge pull request #18 from belanoa/ab/softmax-integration
yvantor May 9, 2024
26dc475
Remove submodule SSH.
May 15, 2024
9fe04d0
Merge pull request #19 from pulp-platform/yt/submodule
yvantor May 15, 2024
c58da1f
Added link to softex test
belanoa May 20, 2024
90551fa
Updated softex test
belanoa May 27, 2024
2ee29de
Add fault injection in redmule regression to test ECC HCI
LuigiGhionda May 30, 2024
6660fcd
Add fault injection in neureka regression to test ECC HCI
LuigiGhionda May 31, 2024
979c0b2
Merge pull request #20 from belanoa/ab/softmax-integration
yvantor May 31, 2024
fc7f5da
Merge pull request #21 from pulp-platform/lg/hci_ecc
yvantor Jun 25, 2024
b1c3f82
Add redmule_softclear, redmule_256iter tests
FrancescoConti Aug 23, 2024
53d7aee
Remove hardcoded addresses in softex and redmule tests
Dec 9, 2024
c8ac022
Move reliability tests to their own directory
Dec 10, 2024
a61fc85
Neureka: add configuration for the pulp cluster
Dec 10, 2024
1cbed9e
Add cluster icache fault injection test
micprog Jul 31, 2024
799c996
Move icache_fi_conv16 tests to reliability_tests directory
Dec 19, 2024
06b73a8
Fix neureka's check_output function
LuigiGhionda Feb 16, 2025
be5f94c
Add define to redmule and neureka tests to skip ecc-related checks if…
LuigiGhionda Feb 16, 2025
d43cb0d
Update `.gitignore`
LuigiGhionda Feb 16, 2025
afc44a4
add 3 tests for XpulpNN(v2)
da-gazzi Jun 11, 2024
953d7ee
add TNN tests
da-gazzi Jun 13, 2024
3500577
add required utility functions to baremetal NN tests
da-gazzi Jun 27, 2024
66f9b1d
add a first (almost trivial) iDMA test
da-gazzi Jun 27, 2024
2e30d30
update NN tests to use generic runtime DMA functions
da-gazzi Jun 28, 2024
ee2dd1c
fix iDMA test dma calls
da-gazzi Jun 28, 2024
2b086b7
add iDMA zeroMem test
da-gazzi Jul 1, 2024
acf08a7
add forgotten iDMA ZeroMem test :^)
da-gazzi Jul 2, 2024
0071e0c
add iDMA test using all cores in all directions
da-gazzi Jul 2, 2024
4d9e726
[update] add neureka tests to regression
arpansur Jul 16, 2024
029a11d
[add] idma_pointwise test
arpansur Jul 22, 2024
e6e973f
First commit IDMA tests
DanielKellerM Oct 22, 2024
3d7e76b
Add wide port AXI test
DanielKellerM Oct 31, 2024
4256dca
feat: Add IDMA 2D transfers
DanielKellerM Nov 4, 2024
9ead1c0
[optimization] Simplified memory access using direct pointers and arr…
DanielKellerM Nov 4, 2024
dc4fcae
[new] 3D transfers regresion test, change mem initialisation
DanielKellerM Feb 3, 2025
b3e132c
Updated Readme + changes in 1d stimuli generator
May 30, 2025
3baf986
cherry-pick multi core tests
Jun 3, 2025
74c0c6c
update to use updated functions from the HAL
DanielKellerM Jun 3, 2025
3f8a572
update tests to use L1 and L2 wait functions
DanielKellerM Jun 13, 2025
506ddf1
Few updates to iDMA tests
Jun 6, 2025
20b1692
Updated iDMA tests: memory allocation through pi_malloc functions and…
Jun 10, 2025
5df50fc
Updated iMDA tests: added QUICK mode for non-random inputs testing
Jun 11, 2025
dbe54a0
Minor change on idma_multi_core: moved synch_barrier out of for loop
Jun 11, 2025
10b0bfc
Updated tests: initialize test_status to NB_CORES and decrease when n…
Jun 11, 2025
968b2d3
Some clean-up and minor changes
Jun 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
/**/*~
!boot_code/crt0.S
/simplified-runtime.xml
**.log
**.ini
**.wlf
**transcript
**.dbg
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hwpe/neureka/pulp-nnx"]
path = hwpe/neureka/pulp-nnx
url = https://github.com/pulp-platform/pulp-nnx
19 changes: 19 additions & 0 deletions astral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
astral:
parMatrixMul8:
path: ./astral/parMatrixMul8
command: make clean all run
parMatrixMul16:
path: ./astral/parMatrixMul16
command: make clean all run
parMatrixMul32:
path: ./astral/parMatrixMul32
command: make clean all run
dmr_matmul:
path: ./astral/dmr_matmul
command: make clean all run
redmule:
path: ./astral/redmule
command: make clean all run
neureka:
path: ./astral/neureka
command: make clean all run
1 change: 1 addition & 0 deletions astral/dmr_matmul
1 change: 1 addition & 0 deletions astral/ecc_test
5 changes: 5 additions & 0 deletions astral/hello/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PULP_APP = test
PULP_APP_SRCS = hello.c
PULP_CFLAGS = -O3

include $(PULP_SDK_HOME)/install/rules/pulp.mk
24 changes: 24 additions & 0 deletions astral/hello/hello.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (C) 2018 ETH Zurich and University of Bologna
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <stdio.h>

int main()
{
printf("Hello !\n");

return 0;
}
1 change: 1 addition & 0 deletions astral/icache_fi_conv16
1 change: 1 addition & 0 deletions astral/neureka
8 changes: 8 additions & 0 deletions astral/parMatrixMul16/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PULP_APP = test
PULP_APP_SRCS = matrixMul.c

PULP_CFLAGS = -O3

include $(PULP_SDK_HOME)/install/rules/pulp.mk

#pulp-bench-reg --name=parMatrixMul16.cycles --module=pulp_rtl_testset --pipeline=$(PIPELINE) --artefact=pulp_rtl_testset --cmd="make run -f Makefile.sdk" --probe-regexp='matrixMul -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(16)" --probe-regexp='matrixMulTranspose -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(16),transposed"
54 changes: 54 additions & 0 deletions astral/parMatrixMul16/gen_stimuli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python

import sys
import random


def write_arr(f, name, arr):
f.write('const short %s[] = {\n' % name)
for v in arr:
f.write('%d,\n' % (v))
f.write('};\n\n')
return

################################################################################
f = open('parMatrixMul16_stimuli.h', 'w')


SIZE = 24
RANGE = int(2**7/SIZE)

m_a = []
m_b = []
m_exp = []

for i in range(0,SIZE):
for j in range(0,SIZE):
a = random.randint(-RANGE, RANGE-1)
b = random.randint(-RANGE, RANGE-1)

m_a.append(a)
m_b.append(b)

for i in range(0,SIZE):
for j in range(0,SIZE):
r = 0

for k in range (0,SIZE):
r = r + m_a[i * SIZE + k] * m_b[k * SIZE + j]

m_exp.append(r)


write_arr(f, 'm_a', m_a)
write_arr(f, 'm_b', m_b)
write_arr(f, 'm_exp', m_exp)

f.write('#define SIZE %d\n' % SIZE)


f.write('__attribute__ ((section(".heapsram"))) short g_mA[SIZE][SIZE];\n')
f.write('__attribute__ ((section(".heapsram"))) short g_mB[SIZE][SIZE];\n')
f.write('__attribute__ ((section(".heapsram"))) short g_mC[SIZE][SIZE];\n')
f.write('__attribute__ ((section(".heapsram"))) short g_mB_tmp[SIZE][SIZE];\n')

177 changes: 177 additions & 0 deletions astral/parMatrixMul16/matrixMul.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
/*
* Copyright (C) 2018 ETH Zurich and University of Bologna
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* Mantainer: Luca Valente, [email protected]
*/

#include "pulp.h"

#include "parMatrixMul16_stimuli.h"

void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)());
void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)());

testcase_t testcases[] = {
{ .name = "matrixMul", .test = check_matrix_mul },
{ .name = "matrixMulTranspose", .test = check_matrix_mul_transpose },
{0, 0}
};

unsigned int num_cores;

int main()
{
if (rt_cluster_id() != 0)
return bench_cluster_forward(0);

num_cores = get_core_num();

if(rt_core_id() < num_cores) {
run_suite(testcases);
}

synch_barrier();

return 0;
}

void matrix_init();
unsigned int matrix_check();

void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()) {
int core_id;
unsigned int i, j, k;
unsigned int chunk;
unsigned int lb, ub;

core_id = get_core_id();

// number of rows each core has to multiply
chunk = SIZE / num_cores;
// lower bound
lb = core_id * chunk;
// upper bound
ub = lb + chunk;

if(core_id == 0) {
matrix_init();
}

if(num_cores != 1) synch_barrier();

// start benchmark
start();

for(i = lb; i < ub; i++) {
for(j = 0; j < SIZE; j++) {
g_mC[i][j] = 0;

for(k = 0; k < SIZE; k++) {
g_mC[i][j] += g_mA[i][k] * g_mB[k][j];
}
}
}

if(num_cores != 1) synch_barrier();

stop();

if(core_id == 0) {
result->errors = matrix_check();
}
}

void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()) {
int core_id;
unsigned int i, j, k;
unsigned int chunk;
unsigned int lb, ub;

core_id = get_core_id();

// number of rows each core has to multiply
chunk = SIZE / num_cores;
// lower bound
lb = core_id * chunk;
// upper bound
ub = lb + chunk;

if(core_id == 0) {
matrix_init();
}

if(num_cores != 1) synch_barrier();

// start benchmark
start();

// transpose array before using it
for(i = lb; i < ub; i++) {
for(j = 0; j < SIZE; j++) {
g_mB_tmp[i][j] = g_mB[j][i];
}
}

if(num_cores != 1) synch_barrier();

for(i = lb; i < ub; i++) {
for(j = 0; j < SIZE; j++) {
g_mC[i][j] = 0;

for(k = 0; k < SIZE; k++) {
g_mC[i][j] += g_mA[i][k] * g_mB_tmp[j][k];
}
}
}

if(num_cores != 1) synch_barrier();

stop();

if(core_id == 0) {
result->errors = matrix_check();
}
}

void matrix_init() {
unsigned int i, j;

// init, copy to TCDM
for(i = 0; i < SIZE; i++) {
for(j = 0; j < SIZE; j++) {
g_mA[i][j] = m_a[i * SIZE + j];
g_mB[i][j] = m_b[i * SIZE + j];
g_mC[i][j] = 0;
}
}
}

unsigned int matrix_check() {
unsigned int errors = 0;
unsigned int i, j;
// check
for(i = 0; i < SIZE; i++) {
for(j = 0; j < SIZE; j++) {
if(g_mC[i][j] != m_exp[i * SIZE + j]) {
printf("At index %d, %d\n", i, j, 0, 0);
errors++;
}
}
}

return errors;
}
Loading