From 02a7ad53e097bf4e8b2fd89ae6d10d10e544dfcf Mon Sep 17 00:00:00 2001 From: Ted Themistokleous Date: Thu, 25 Sep 2025 15:14:01 +0000 Subject: [PATCH 1/3] Put pai launcher script in MIGraphX and modify build scripts --- tools/build_and_test_onnxrt.sh | 1 + tools/pai_test_launcher.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 tools/pai_test_launcher.sh diff --git a/tools/build_and_test_onnxrt.sh b/tools/build_and_test_onnxrt.sh index f9178f8c1c9..d7d495a938b 100755 --- a/tools/build_and_test_onnxrt.sh +++ b/tools/build_and_test_onnxrt.sh @@ -26,6 +26,7 @@ set -e ulimit -c unlimited +cp tools/pai_test_launcher.sh /onnxruntime/tools/ci_build/github/pai/pai_test_launcher.sh cd /onnxruntime pip3 install -r requirements-dev.txt # Add newer cmake to the path diff --git a/tools/pai_test_launcher.sh b/tools/pai_test_launcher.sh new file mode 100755 index 00000000000..e3d531aea75 --- /dev/null +++ b/tools/pai_test_launcher.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +build_dir=${1:-"."} +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +echo "Warning: The following tests are EXCLUDED on PAI agent:" +gtest_filter="-" +while read line; do + gtest_filter="$gtest_filter:$line" + echo "$line" +done <$script_dir/pai-excluded-tests.txt +echo "" + +echo "Running ./onnxruntime_test_all .." +$build_dir/onnxruntime_test_all --gtest_filter=$gtest_filter From 052853e748ad9af8232624a408747a7fe13d3145 Mon Sep 17 00:00:00 2001 From: Ted Themistokleous Date: Thu, 25 Sep 2025 17:43:26 +0000 Subject: [PATCH 2/3] Update changes for provider_test_launcher to use onnxruntime_provider_tests --- tools/build_and_test_onnxrt.sh | 2 ++ tools/pai_provider_test_launcher.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 tools/pai_provider_test_launcher.sh diff --git a/tools/build_and_test_onnxrt.sh b/tools/build_and_test_onnxrt.sh index d7d495a938b..6039ae75984 100755 --- a/tools/build_and_test_onnxrt.sh +++ b/tools/build_and_test_onnxrt.sh @@ -27,6 +27,7 @@ set -e ulimit -c unlimited cp tools/pai_test_launcher.sh /onnxruntime/tools/ci_build/github/pai/pai_test_launcher.sh +cp tools/pai_provider_test_launcher.sh /onnxruntime/tools/ci_build/github/pai/pai_provider_test_launcher.sh cd /onnxruntime pip3 install -r requirements-dev.txt # Add newer cmake to the path @@ -44,3 +45,4 @@ echo 'InferenceSessionTests.CheckRunProfilerWithSessionOptions2' >> ../../../too echo 'InferenceSessionTests.Test3LayerNestedSubgraph' >> ../../../tools/ci_build/github/pai/migraphx-excluded-tests.txt echo 'InferenceSessionTests.Test2LayerNestedSubgraph' >> ../../../tools/ci_build/github/pai/migraphx-excluded-tests.txt ../../../tools/ci_build/github/pai/pai_test_launcher.sh || (gdb ./onnxruntime_test_all core -batch -ex bt && exit 1) +../../../tools/ci_build/github/pai/pai_provider_test_launcher.sh || (gdb ./onnxruntime_provider_test core -batch -ex bt && exit 1) diff --git a/tools/pai_provider_test_launcher.sh b/tools/pai_provider_test_launcher.sh new file mode 100755 index 00000000000..7b3cd4b94b3 --- /dev/null +++ b/tools/pai_provider_test_launcher.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +build_dir=${1:-"."} +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +echo "Warning: The following tests are EXCLUDED on PAI agent:" +gtest_filter="-" +while read line; do + gtest_filter="$gtest_filter:$line" + echo "$line" +done <$script_dir/pai-excluded-tests.txt +echo "" + +echo "Running ./onnxruntime_provider_test .." +$build_dir/onnxruntime_provider_test --gtest_filter=$gtest_filter From cca57202e9d015fb9f755f12bdeb8d3176996532 Mon Sep 17 00:00:00 2001 From: Ted Themistokleous Date: Thu, 25 Sep 2025 18:05:27 +0000 Subject: [PATCH 3/3] Update license --- tools/pai_provider_test_launcher.sh | 24 ++++++++++++++++++++++++ tools/pai_test_launcher.sh | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/tools/pai_provider_test_launcher.sh b/tools/pai_provider_test_launcher.sh index 7b3cd4b94b3..c16d23ec64d 100755 --- a/tools/pai_provider_test_launcher.sh +++ b/tools/pai_provider_test_launcher.sh @@ -1,3 +1,27 @@ +##################################################################################### +# The MIT License (MIT) +# +# Copyright (c) 2015-2025 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +##################################################################################### + #!/bin/bash build_dir=${1:-"."} diff --git a/tools/pai_test_launcher.sh b/tools/pai_test_launcher.sh index e3d531aea75..c50d6866646 100755 --- a/tools/pai_test_launcher.sh +++ b/tools/pai_test_launcher.sh @@ -1,3 +1,27 @@ +##################################################################################### +# The MIT License (MIT) +# +# Copyright (c) 2015-2025 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +##################################################################################### + #!/bin/bash build_dir=${1:-"."}