Skip to content

Commit

Permalink
Merge branch 'main' into AXI-INFER
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio Barone committed Sep 9, 2022
2 parents c13ce8e + 0dcfc49 commit d859441
Show file tree
Hide file tree
Showing 144 changed files with 10,557 additions and 1,161 deletions.
8 changes: 5 additions & 3 deletions .github/actions/perf-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ runs:
if [[ ! -z "${{ inputs.score }}" ]]; then
score="-s ${{ inputs.score }}"
fi
worse_count="0"
python ./etc/scripts/perf_diff.py -d ${{inputs.datapoints}} $score -o $COMPARE_CSV --returnfail "main-reports/${{inputs.test-id}}.csv" "${{inputs.new-results}}" || worse_count=$?
if [[ "$worse_count" != "0" ]]; then
worse_count=$(python ./etc/scripts/perf_diff.py -d ${{inputs.datapoints}} $score -o $COMPARE_CSV "main-reports/${{inputs.test-id}}.csv" "${{inputs.new-results}}" 3>&2 2>&1 1>&3)
if [[ "$worse_count" == "-1" ]]; then
echo "::warning:: Benchmark suite is different from main"
elif [[ "$worse_count" != "0" ]]; then
outcsv="$COMPARE_CSV"
echo "::warning:: Performance are worse than main for ${{inputs.test-id}}: $worse_count benchmarks have degraded performance"
fi
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/reusable-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,25 @@ jobs:
include:
- basename: softfloat
script: ./examples/softfloat/generic_softfloat.sh
batch: "5CSEMA5F31C6_6.6,5CSEMA5F31C6_10.0,5SGXEA7N2F45C1_3.3,5SGXEA7N2F45C1_10.0,EP2C70F896C6-R_10.0,5CSEMA5F31C6_6.6 --flopoco,5CSEMA5F31C6_10.0 --flopoco,5SGXEA7N2F45C1_3.3 --flopoco,5SGXEA7N2F45C1_10.0 --flopoco,EP2C70F896C6-R_10.0 --flopoco"
batch: "5CSEMA5F31C6_6.6,5CSEMA5F31C6_10.0,5SGXEA7N2F45C1_3.3,5SGXEA7N2F45C1_10.0,5CSEMA5F31C6_6.6 --flopoco,5CSEMA5F31C6_10.0 --flopoco,5SGXEA7N2F45C1_3.3 --flopoco,5SGXEA7N2F45C1_10.0 --flopoco"
- basename: truefloat
script: ./examples/truefloat/generic_truefloat.sh
args: -c=--evaluation=CYCLES
batch: "5CSEMA5F31C6_6.6,5CSEMA5F31C6_10.0,5SGXEA7N2F45C1_3.3,5SGXEA7N2F45C1_10.0,EP2C70F896C6-R_10.0"
batch: "5CSEMA5F31C6_6.6,5CSEMA5F31C6_10.0,5SGXEA7N2F45C1_3.3,5SGXEA7N2F45C1_10.0"
- basename: libm
script: ./examples/libm/generic_libm.sh
batch: "5SGXEA7N2F45C1_3.3,5SGXEA7N2F45C1_5.0,5SGXEA7N2F45C1_10.0,EP2C70F896C6-R_10.0"
batch: "5SGXEA7N2F45C1_3.3,5SGXEA7N2F45C1_5.0,5SGXEA7N2F45C1_10.0"
- basename: libm-flopoco
script: ./examples/libm/generic_libm.sh
batch: "5SGXEA7N2F45C1_3.3 --flopoco,5SGXEA7N2F45C1_5.0 --flopoco,5SGXEA7N2F45C1_10.0 --flopoco,EP2C70F896C6-R_10.0 --flopoco"
batch: "5SGXEA7N2F45C1_3.3 --flopoco,5SGXEA7N2F45C1_5.0 --flopoco,5SGXEA7N2F45C1_10.0 --flopoco"
- basename: CHStone_O2
script: ./examples/CHStone/generic_CHStone.sh
args: -c=--experimental-setup=BAMBU-BALANCED-MP -lchstone_aa_list
batch: "5CSEMA5F31C6_10.0,5CSEMA5F31C6_15.0,5SGXEA7N2F45C1_5.0,5SGXEA7N2F45C1_10.0,EP2C70F896C6-R_10.0,EP2C70F896C6-R_15.0"
batch: "5CSEMA5F31C6_10.0,5CSEMA5F31C6_15.0,5SGXEA7N2F45C1_5.0,5SGXEA7N2F45C1_10.0"
- basename: CHStone_O3
script: ./examples/CHStone/generic_CHStone.sh
args: -c=--experimental-setup=BAMBU-PERFORMANCE-MP -lchstone_altera_O3_list
batch: "5CSEMA5F31C6_10.0,5CSEMA5F31C6_15.0,5SGXEA7N2F45C1_5.0,5SGXEA7N2F45C1_10.0,EP2C70F896C6-R_10.0,EP2C70F896C6-R_15.0"
batch: "5CSEMA5F31C6_10.0,5CSEMA5F31C6_15.0,5SGXEA7N2F45C1_5.0,5SGXEA7N2F45C1_10.0"
- basename: hls_study
script: ./examples/hls_study/generic_hls_study.sh
batch: "5SGXEA7N2F45C1_2.5 --aligned-access"
Expand Down
11 changes: 11 additions & 0 deletions documentation/tutorial_fpl_2022/01-introduction/Exercise1/bambu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
script=$(readlink -e $0)
root_dir=$(dirname $script)

rm -rf icrc1
mkdir -p icrc1
cd icrc1
echo "#synthesis of icrc1"
bambu ../icrc.c --top-fname=icrc1 \
--generate-tb=../test_icrc1.xml --simulator=VERILATOR --simulate \
-v2 --print-dot --pretty-print=a.c "$@" |& tee icrc1.log
14 changes: 14 additions & 0 deletions documentation/tutorial_fpl_2022/01-introduction/Exercise1/icrc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
unsigned short icrc1(unsigned short crc, unsigned char onech)
{
int i;
unsigned short ans=(crc^onech << 8);

for (i=0;i<8;i++) {
if (ans & 0x8000)
ans = (ans <<= 1) ^ 4129;
else
ans <<= 1;
}
return ans;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
void min_max(int * input, int num_elements, int * max, int * min)
{
int local_max = input[0];
int local_min = input[0];
int i = 0;
for(i = 0; i < num_elements; i++)
{
if(input[i] > local_max)
{
local_max = input[i];
}
else if(input[i] < local_min)
{
local_min = input[i];
}
}
*min = local_min;
*max = local_max;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
bambu minmax.c --generate-tb=testbench.xml --simulate "$@" |& tee log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<function>
<testbench input="{0,1,2,3,4}" num_elements="5" max="{0}" min="{0}"/>
<testbench input="{0,1,2,3,4,5,6,7,8,9}" num_elements="10" max="{0}" min="{0}"/>
<testbench input="{0,0,0,0,0,0,0,0,0,0}" num_elements="10" max="{0}" min="{0}"/>
<testbench input="{0}" num_elements="1" max="{0}" min="{0}"/>
</function>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
bambu matmul.ll --top-fname=main_kernel --generate-tb=test.xml --simulate --simulator=VERILATOR --compiler=I386_CLANG12 "$@" |& tee log.txt
Loading

0 comments on commit d859441

Please sign in to comment.