mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
This is a combination of 6 commits. use local bitcode This is a combination of 3 commits. add bit code to repo update test change bit code path move bit code update path update scripts update test fix path issue
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# clear
|
|
set -x
|
|
|
|
# export MLIR_ENABLE_DUMP=1
|
|
# export LLVM_IR_ENABLE_DUMP=1
|
|
# export AMDGCN_ENABLE_DUMP=1
|
|
|
|
# log dir
|
|
ROOT_DIR=$(pwd)
|
|
LOG_DIR=$ROOT_DIR/log_$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)
|
|
rm -rf $LOG_DIR
|
|
mkdir -p $LOG_DIR
|
|
chmod -R 777 $LOG_DIR
|
|
|
|
sh scripts/amd/clean.sh
|
|
|
|
# UNIT_TEST="python/test/unit/language/test_core_amd.py"
|
|
# UNIT_TEST="python/test/unit/language/test_core.py::test_empty_kernel[float32]"
|
|
# UNIT_TEST="python/test/unit/language/test_core.py::test_bin_op"
|
|
# UNIT_TEST="python/test/unit/language/test_core.py::test_bin_op[float32-float32-+]"
|
|
# UNIT_TEST="python/test/unit/language/test_core.py::test_bin_op[int8-float16-%]"
|
|
UNIT_TEST="python/test/unit/language/test_elementwise.py"
|
|
|
|
# check for backtrace
|
|
if [ "$1" == "backtrace" ]; then
|
|
sudo apt install gdb -y
|
|
|
|
COMMAND="-m pytest --capture=tee-sys --verbose $UNIT_TEST"
|
|
gdb python \
|
|
-ex "set pagination off" \
|
|
-ex "run $COMMAND" \
|
|
-ex "backtrace" \
|
|
-ex "set confirm off" \
|
|
-ex "q" \
|
|
2>&1 | tee $LOG_DIR/backtrace.log
|
|
|
|
else
|
|
pytest --capture=tee-sys -rfs --verbose "$UNIT_TEST" 2>&1 | tee $LOG_DIR/unit_test.log
|
|
fi
|