Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tinebp committed Dec 6, 2024
1 parent 896c593 commit 115ff2b
Show file tree
Hide file tree
Showing 5 changed files with 308 additions and 177 deletions.
6 changes: 3 additions & 3 deletions ci/regression.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ scope()
{
echo "begin scope tests..."

SCOPE_DEPTH=256 ./ci/blackbox.sh --driver=opae --app=demo --args="-n1" --scope
SCOPE_DEPTH=256 ./ci/blackbox.sh --driver=xrt --app=demo --args="-n1" --scope
SCOPE_DEPTH=128 ./ci/blackbox.sh --driver=opae --app=demo --args="-n1" --scope
SCOPE_DEPTH=128 ./ci/blackbox.sh --driver=xrt --app=demo --args="-n1" --scope

echo "debugging scope done!"
}
Expand All @@ -385,7 +385,7 @@ synthesis()
echo "begin synthesis tests..."

PREFIX=build_base make -C hw/syn/yosys clean
PREFIX=build_base CONFIGS="-DDPI_DISABLE -DEXT_F_DISABLE" make -C hw/syn/yosys synthesis
PREFIX=build_base CONFIGS="-DDPI_DISABLE -DEXT_F_DISABLE -DNUM_WARPS=2 -DNUM_THREADS=2" make -C hw/syn/yosys synthesis

echo "synthesis tests done!"
}
Expand Down
3 changes: 0 additions & 3 deletions perf/cache/cache_perf.log

This file was deleted.

24 changes: 12 additions & 12 deletions perf/cache/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ sgemm()
{
echo "begin cache tests"

CONFIGS="-DICACHE_NUM_WAYS=2" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' > ./perf/cache/cache_perf.log
echo -e "\n**************************************\n" >> ./perf/cache/cache_perf.log
CONFIGS="-DDCACHE_NUM_WAYS=2" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> ./perf/cache/cache_perf.log
echo -e "\n**************************************\n" >> ./perf/cache/cache_perf.log
CONFIGS="-DICACHE_NUM_WAYS=4" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> ./perf/cache/cache_perf.log
echo -e "\n**************************************\n" >> ./perf/cache/cache_perf.log
CONFIGS="-DDCACHE_NUM_WAYS=4" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> ./perf/cache/cache_perf.log
echo -e "\n**************************************\n" >> ./perf/cache/cache_perf.log
CONFIGS="-DICACHE_NUM_WAYS=8" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> ./perf/cache/cache_perf.log
echo -e "\n**************************************\n" >> ./perf/cache/cache_perf.log
CONFIGS="-DDCACHE_NUM_WAYS=8" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> ./perf/cache/cache_perf.log
CONFIGS="-DICACHE_NUM_WAYS=2" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' > cache_perf.log
echo -e "\n**************************************\n" >> cache_perf.log
CONFIGS="-DDCACHE_NUM_WAYS=2" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> cache_perf.log
echo -e "\n**************************************\n" >> cache_perf.log
CONFIGS="-DICACHE_NUM_WAYS=4" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> cache_perf.log
echo -e "\n**************************************\n" >> cache_perf.log
CONFIGS="-DDCACHE_NUM_WAYS=4" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> cache_perf.log
echo -e "\n**************************************\n" >> cache_perf.log
CONFIGS="-DICACHE_NUM_WAYS=8" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> cache_perf.log
echo -e "\n**************************************\n" >> cache_perf.log
CONFIGS="-DDCACHE_NUM_WAYS=8" ./ci/blackbox.sh --driver=rtlsim --app=sgemm --args="-n64" --perf=1 | grep 'PERF' >> cache_perf.log

echo "cache tests done!"
}
Expand All @@ -36,6 +36,6 @@ case $1 in
-h | --help ) usage
;;
* ) sgemm
;;
;;
esac
shift
25 changes: 12 additions & 13 deletions sim/common/softfloat_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,9 @@ static inline uint64_t rsqrte7(uint64_t val, int e, int s, bool sub) {
59, 58, 57, 56, 56, 55, 54, 53};

if (sub) {
while (extract64(sig, s - 1, 1) == 0) {
exp--;
sig <<= 1;
}
while (extract64(sig, s - 1, 1) == 0)
exp--, sig <<= 1;

sig = (sig << 1) & make_mask64(0, s);
}

Expand Down Expand Up @@ -358,9 +357,9 @@ float16_t f16_recip7(float16_t in) {
[[fallthrough]];
default: // +- normal
uA.ui = recip7(uA.ui, 5, 10, softfloat_roundingMode, sub, &round_abnormal);
if (round_abnormal)
softfloat_exceptionFlags |=
softfloat_flag_inexact | softfloat_flag_overflow;
if (round_abnormal) {
softfloat_exceptionFlags |= softfloat_flag_inexact | softfloat_flag_overflow;
}
break;
}

Expand Down Expand Up @@ -401,9 +400,9 @@ float32_t f32_recip7(float32_t in) {
[[fallthrough]];
default: // +- normal
uA.ui = recip7(uA.ui, 8, 23, softfloat_roundingMode, sub, &round_abnormal);
if (round_abnormal)
softfloat_exceptionFlags |=
softfloat_flag_inexact | softfloat_flag_overflow;
if (round_abnormal) {
softfloat_exceptionFlags |= softfloat_flag_inexact | softfloat_flag_overflow;
}
break;
}

Expand Down Expand Up @@ -444,9 +443,9 @@ float64_t f64_recip7(float64_t in) {
[[fallthrough]];
default: // +- normal
uA.ui = recip7(uA.ui, 11, 52, softfloat_roundingMode, sub, &round_abnormal);
if (round_abnormal)
softfloat_exceptionFlags |=
softfloat_flag_inexact | softfloat_flag_overflow;
if (round_abnormal) {
softfloat_exceptionFlags |= softfloat_flag_inexact | softfloat_flag_overflow;
}
break;
}

Expand Down
Loading

0 comments on commit 115ff2b

Please sign in to comment.