From 56a06f7a06c6a7e9426eaa59119d7e3b55a64f48 Mon Sep 17 00:00:00 2001 From: Michael Melesse Date: Fri, 21 Oct 2022 20:17:30 +0000 Subject: [PATCH] add debug steps --- scripts/amd/debug.sh | 12 +++++++----- scripts/amd/run.sh | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/amd/debug.sh b/scripts/amd/debug.sh index 45cd57ba0..aa6b2a141 100644 --- a/scripts/amd/debug.sh +++ b/scripts/amd/debug.sh @@ -4,10 +4,12 @@ sudo apt install gdb -y # export AMD_LOG_LEVEL=3 # export HIP_LAUNCH_BLOCKING=1 -gdb -ex "set pagination off" \ - -ex "file python" \ +gdb -ex "file python" \ + -ex 'run -m pytest --capture=tee-sys --verbose "python/test/unit/language/test_core.py::test_empty_kernel[float32]"' \ + -ex "set pagination off" \ -ex "set confirm off" \ - -ex "break 1" \ - -ex 'run -m pytest --capture=tee-sys --verbose "python/test/unit/language/test_core.py::test_load_and_store_op[float32-2]"' \ - -ex "q" \ + -ex "break _exit" \ + -ex "commands" + -ex "run" + -ex 'end' \ 2>&1 | tee /dockerx/pytorch/test_core_gdb.log diff --git a/scripts/amd/run.sh b/scripts/amd/run.sh index 3bdea1a4e..fcfaac2a3 100644 --- a/scripts/amd/run.sh +++ b/scripts/amd/run.sh @@ -10,8 +10,8 @@ chmod -R 777 $LOG_DIR bash scripts/amd/clean.sh # bash scripts/amd/deps.sh bash scripts/amd/build.sh -bash scripts/amd/test.sh 2>&1 |tee $LOG_DIR/test.log -# bash scripts/amd/debug.sh +# bash scripts/amd/test.sh 2>&1 |tee $LOG_DIR/test.log +bash scripts/amd/debug.sh # bash scripts/amd/backtrace.sh 2>&1 |tee $LOG_DIR/backtrace.log