Skip to content

Commit

Permalink
Fixing weight stationary and modifying CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
ritikraj7 committed Sep 7, 2023
1 parent 1168755 commit 588ef36
Showing 1 changed file with 30 additions and 22 deletions.
52 changes: 30 additions & 22 deletions test/scripts/function_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,56 @@ path="./"
sed -i "s/run_name = scale_example_run_32x32_os/run_name = scale_example_run_32x32_ws/" $path/configs/scale.cfg
sed -i "s/Dataflow : os/Dataflow : ws/" $path/configs/scale.cfg
sed -i "s/save_disk_space=True/save_disk_space=False/" $path/scalesim/scale.py
# sed -i "s/verbose=True/verbose=False/" $path/scalesim/scale.py

source $path/venv/bin/activate

python3 $path/scalesim/scale.py -c $path/configs/scale.cfg -t $path/topologies/conv_nets/alexnet_part.csv
python3 $path/scalesim/scale.py -c $path/configs/scale.cfg -t $path/topologies/conv_nets/alexnet_part.csv -p $path/test_runs

CMP1=$(cmp $path/../test_runs/scale_example_run_32x32_ws/BANDWIDTH_REPORT.csv $path/test/golden_trace/BANDWIDTH_REPORT.csv)
CMP2=$(cmp $path/../test_runs/scale_example_run_32x32_ws/COMPUTE_REPORT.csv $path/test/golden_trace/COMPUTE_REPORT.csv)
CMP3=$(cmp $path/../test_runs/scale_example_run_32x32_ws/DETAILED_ACCESS_REPORT.csv $path/test/golden_trace/DETAILED_ACCESS_REPORT.csv)
CMP4=$(cmp $path/../test_runs/scale_example_run_32x32_ws/layer0/FILTER_DRAM_TRACE.csv $path/test/golden_trace/layer0/FILTER_DRAM_TRACE.csv)
CMP5=$(cmp $path/../test_runs/scale_example_run_32x32_ws/layer0/FILTER_SRAM_TRACE.csv $path/test/golden_trace/layer0/FILTER_SRAM_TRACE.csv)
CMP6=$(cmp $path/../test_runs/scale_example_run_32x32_ws/layer0/IFMAP_DRAM_TRACE.csv $path/test/golden_trace/layer0/IFMAP_DRAM_TRACE.csv)
CMP7=$(cmp $path/../test_runs/scale_example_run_32x32_ws/layer0/IFMAP_SRAM_TRACE.csv $path/test/golden_trace/layer0/IFMAP_SRAM_TRACE.csv)
CMP8=$(cmp $path/../test_runs/scale_example_run_32x32_ws/layer0/OFMAP_DRAM_TRACE.csv $path/test/golden_trace/layer0/OFMAP_DRAM_TRACE.csv)
CMP9=$(cmp $path/../test_runs/scale_example_run_32x32_ws/layer0/OFMAP_SRAM_TRACE.csv $path/test/golden_trace/layer0/OFMAP_SRAM_TRACE.csv)
CMP1=$(cmp $path/test_runs/scale_example_run_32x32_ws/BANDWIDTH_REPORT.csv $path/test/golden_trace/BANDWIDTH_REPORT.csv)
CMP2=$(cmp $path/test_runs/scale_example_run_32x32_ws/COMPUTE_REPORT.csv $path/test/golden_trace/COMPUTE_REPORT.csv)
CMP3=$(cmp $path/test_runs/scale_example_run_32x32_ws/DETAILED_ACCESS_REPORT.csv $path/test/golden_trace/DETAILED_ACCESS_REPORT.csv)
CMP4=$(cmp $path/test_runs/scale_example_run_32x32_ws/layer0/FILTER_DRAM_TRACE.csv $path/test/golden_trace/layer0/FILTER_DRAM_TRACE.csv)
CMP5=$(cmp $path/test_runs/scale_example_run_32x32_ws/layer0/FILTER_SRAM_TRACE.csv $path/test/golden_trace/layer0/FILTER_SRAM_TRACE.csv)
CMP6=$(cmp $path/test_runs/scale_example_run_32x32_ws/layer0/IFMAP_DRAM_TRACE.csv $path/test/golden_trace/layer0/IFMAP_DRAM_TRACE.csv)
CMP7=$(cmp $path/test_runs/scale_example_run_32x32_ws/layer0/IFMAP_SRAM_TRACE.csv $path/test/golden_trace/layer0/IFMAP_SRAM_TRACE.csv)
CMP8=$(cmp $path/test_runs/scale_example_run_32x32_ws/layer0/OFMAP_DRAM_TRACE.csv $path/test/golden_trace/layer0/OFMAP_DRAM_TRACE.csv)
CMP9=$(cmp $path/test_runs/scale_example_run_32x32_ws/layer0/OFMAP_SRAM_TRACE.csv $path/test/golden_trace/layer0/OFMAP_SRAM_TRACE.csv)


if [ "$CMP1" != "" ]; then
echo "Output does not match!"
exit 125
echo "$CMP1"
exit 1
elif [ "$CMP2" != "" ]; then
echo "Output does not match!"
exit 125
echo "$CMP2"
exit 1
elif [ "$CMP3" != "" ]; then
echo "Output does not match!"
exit 125
echo "$CMP3"
exit 1
elif [ "$CMP4" != "" ]; then
echo "Output does not match!"
exit 125
echo "$CMP4"
exit 1
elif [ "$CMP5" != "" ]; then
echo "Output does not match!"
exit 125
echo "Output does not match!"
echo "$CMP5"
exit 1
elif [ "$CMP6" != "" ]; then
echo "Output does not match!"
exit 125
echo "Output does not match!"
echo "$CMP6"
exit 1
elif [ "$CMP7" != "" ]; then
echo "Output does not match!"
exit 125
echo "$CMP7"
exit 1
elif [ "$CMP8" != "" ]; then
echo "Output does not match!"
exit 125
echo "$CMP8"
exit 1
elif [ "$CMP9" != "" ]; then
echo "Output does not match!"
exit 125
echo "$CMP9"
exit 1
fi

0 comments on commit 588ef36

Please sign in to comment.