Skip to content

Commit

Permalink
#0: Add some test_prefetcher/test_dispatcher tests to CI for slow/fas…
Browse files Browse the repository at this point in the history
…t dispatch variants respectively

 - More to come
  • Loading branch information
kmabeeTT committed Mar 27, 2024
1 parent 42db9fb commit 4dd38c3
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/scripts/run_cpp_fd2_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#/bin/bash

set -eo pipefail

if [[ -z "$TT_METAL_HOME" ]]; then
echo "Must provide TT_METAL_HOME in environment" 1>&2
exit 1
fi

if [[ ! -z "$TT_METAL_SLOW_DISPATCH_MODE" ]]; then


#############################################
# TEST_PREFETCHER TESTS #
#############################################

TT_METAL_SLOW_DISPATCH_MODE=1 ./build/test/tt_metal/perf_microbenchmark/dispatch/test_prefetcher -t 0 -i 3 # Smoke Test
TT_METAL_SLOW_DISPATCH_MODE=1 ./build/test/tt_metal/perf_microbenchmark/dispatch/test_prefetcher -t 1 -i 3 # Random Test
TT_METAL_SLOW_DISPATCH_MODE=1 ./build/test/tt_metal/perf_microbenchmark/dispatch/test_prefetcher -t 2 -i 3 # PCIE Test
TT_METAL_SLOW_DISPATCH_MODE=1 ./build/test/tt_metal/perf_microbenchmark/dispatch/test_prefetcher -t 3 -i 3 # Paged DRAM Read Test
# FIXME Failing TT_METAL_SLOW_DISPATCH_MODE=1 ./build/test/tt_metal/perf_microbenchmark/dispatch/test_prefetcher -t 4 -i 3 # Paged DRAM Write + Read Test

# Testcase: Paged Write Cmd. 256 pages, 224b size.
TT_METAL_SLOW_DISPATCH_MODE=1 ./build/test/tt_metal/perf_microbenchmark/dispatch/test_prefetcher -t 4 -i 1 -dpgs 224 -dpgr 256

else


#############################################
# TEST_DISPATCHER TESTS #
#############################################

# Paged Write CMD

# Testcase: 512 page, CQDispatchWritePagedCmd.page_size is 16B, same as dispatch buffer.
./build/test/tt_metal/perf_microbenchmark/dispatch/test_dispatcher -i 1 -w 0 -t 2 -wx 0 -wy 1 -min 16 -max 16 -lps 4 -pbs 1 -np 512
./build/test/tt_metal/perf_microbenchmark/dispatch/test_dispatcher -i 1 -w 0 -t 3 -wx 0 -wy 1 -min 16 -max 16 -lps 4 -pbs 1 -np 512
# Testcase: 256 Pages, Bigger CQDispatchWritePagedCmd.page_size than dispatch buffer page size. Write page size is 2048 Bytes dispatch buffer is 1024 Bytes
./build/test/tt_metal/perf_microbenchmark/dispatch/test_dispatcher -i 1 -w 0 -t 2 -wx 0 -wy 1 -min 2048 -max 2048 -lps 10 -pbs 1 -np 128
./build/test/tt_metal/perf_microbenchmark/dispatch/test_dispatcher -i 1 -w 0 -t 3 -wx 0 -wy 1 -min 2048 -max 2048 -lps 10 -pbs 1 -np 128
# Testcase: Arbitrary non-even numbers. This caught some test issues with overflowing start_page one test implementation.
./build/test/tt_metal/perf_microbenchmark/dispatch/test_dispatcher -i 1 -w 0 -t 2 -wx 0 -wy 1 -min 16 -max 16 -lps 5 -pbs 275 -np 13
./build/test/tt_metal/perf_microbenchmark/dispatch/test_dispatcher -i 1 -w 0 -t 3 -wx 0 -wy 1 -min 16 -max 16 -lps 5 -pbs 275 -np 13
# 11.7 GB/s whb0 - DRAM
./build/test/tt_metal/perf_microbenchmark/dispatch/test_dispatcher -w 1000 -t 2 -wx 0 -wy 1 -min 8192 -max 8192 -lps 13 -pbs 2 -np 128 -i 1000

fi
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ fi
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME

# New FD2 cpp tests.
./test/scripts/run_cpp_fd2_tests.sh

./tests/scripts/run_python_api_unit_tests.sh

./tests/scripts/run_cpp_unit_tests.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ fi
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME

# New FD2 cpp tests.
./test/scripts/run_cpp_fd2_tests.sh

./tests/scripts/run_cpp_unit_tests.sh

echo "Checking docs build..."
Expand Down

0 comments on commit 4dd38c3

Please sign in to comment.