Skip to content

Commit

Permalink
#3764: Fix T3K CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-tenstorrent committed Jul 4, 2024
1 parent 4b17762 commit 72f7d76
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
43 changes: 21 additions & 22 deletions tests/scripts/run_profiler_regressions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,6 @@ source scripts/tools_setup_common.sh

set -eo pipefail

run_additional_T3000_test(){
remove_default_log_locations
mkdir -p $PROFILER_ARTIFACTS_DIR

./tt_metal/tools/profiler/profile_this.py -c "pytest tests/tt_eager/python_api_testing/unit_testing/misc/test_all_gather.py::test_all_gather_on_t3000_post_commit[mem_config0-input_dtype0-8-1-input_shape1-0-layout1]" > $PROFILER_ARTIFACTS_DIR/test_out.log

cat $PROFILER_ARTIFACTS_DIR/test_out.log

if cat $PROFILER_ARTIFACTS_DIR/test_out.log | grep "SKIPPED"
then
echo "No verification as test was skipped"
else
echo "Verifying test results"
runDate=$(ls $PROFILER_OUTPUT_DIR/)
LINE_COUNT=9 #1 header + 8 devices
res=$(verify_perf_line_count "$PROFILER_OUTPUT_DIR/$runDate/ops_perf_results_$runDate.csv" "$LINE_COUNT")
echo $res
fi
}

run_async_mode_T3000_test(){
#Some tests here do not skip grayskull
if [ "$ARCH_NAME" != "grayskull" ]; then
Expand All @@ -47,6 +27,27 @@ run_async_mode_T3000_test(){
fi
}

run_additional_T3000_test(){
remove_default_log_locations
mkdir -p $PROFILER_ARTIFACTS_DIR

./tt_metal/tools/profiler/profile_this.py -c "pytest tests/tt_eager/python_api_testing/unit_testing/misc/test_all_gather.py::test_all_gather_on_t3000_post_commit[mem_config0-input_dtype0-8-1-input_shape1-0-layout1]" > $PROFILER_ARTIFACTS_DIR/test_out.log

cat $PROFILER_ARTIFACTS_DIR/test_out.log

if cat $PROFILER_ARTIFACTS_DIR/test_out.log | grep "SKIPPED"
then
echo "No verification as test was skipped"
else
echo "Verifying test results"
runDate=$(ls $PROFILER_OUTPUT_DIR/)
LINE_COUNT=9 #1 header + 8 devices
res=$(verify_perf_line_count "$PROFILER_OUTPUT_DIR/$runDate/ops_perf_results_$runDate.csv" "$LINE_COUNT")
echo $res
run_async_mode_T3000_test
fi
}

run_profiling_test(){
if [[ -z "$ARCH_NAME" ]]; then
echo "Must provide ARCH_NAME in environment" 1>&2
Expand All @@ -60,8 +61,6 @@ run_profiling_test(){

run_additional_T3000_test

run_async_mode_T3000_test

TT_METAL_DEVICE_PROFILER=1 pytest $PROFILER_TEST_SCRIPTS_ROOT/test_device_profiler.py

remove_default_log_locations
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/impl/program/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void DisablePersistentKernelCache() { enable_persistent_kernel_cache = false; }
std::atomic<uint64_t> Program::program_counter = 0;

Program::Program() :
id(program_counter++), worker_crs_({}), local_circular_buffer_allocation_needed_(false), loaded_onto_device(false) {
id(program_counter++), global_id(0), worker_crs_({}), local_circular_buffer_allocation_needed_(false), loaded_onto_device(false) {
std::set<CoreType> supported_core_types = {CoreType::WORKER, CoreType::ETH};
for (const auto &core_type : supported_core_types) {
kernels_.insert({core_type, {}});
Expand Down

0 comments on commit 72f7d76

Please sign in to comment.