-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Onnxruntime parity checks to CI #1938
Changes from all commits
8b40e9b
075f551
75f9244
39b097c
97d4bb6
c9b6a28
41c4398
33de83c
6938c71
5c98fcb
1530ec2
3c1c718
fbacefc
0b2bcf2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
##################################################################################### | ||
# The MIT License (MIT) | ||
# | ||
# Copyright (c) 2015-2023 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. | ||
##################################################################################### | ||
set -e | ||
|
||
ulimit -c unlimited | ||
|
||
cd /onnxruntime | ||
pip3 install -r requirements-dev.txt | ||
# Add newer cmake to the path | ||
export PATH="/opt/cmake/bin:$PATH" | ||
export CXXFLAGS="-D__HIP_PLATFORM_AMD__=1 -w" | ||
./build.sh --config Release --cmake_extra_defines CMAKE_HIP_COMPILER=/opt/rocm/llvm/bin/clang++ --update --build --build_wheel --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) --skip_tests --rocm_home /opt/rocm --use_migraphx --migraphx_home /opt/rocm --rocm_version=`cat /opt/rocm/.info/version-dev` --allow_running_as_root | ||
|
||
#install onnxruntime wheel for parity tests | ||
cd build/Linux/Release | ||
pip3 install dist/*.whl |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
##################################################################################### | ||
# The MIT License (MIT) | ||
# | ||
# Copyright (c) 2015-2023 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. | ||
##################################################################################### | ||
set -e | ||
|
||
#Go to folder with parity checks | ||
cd /workspace/onnxruntime/onnxruntime/test/python/transformers/ | ||
|
||
#Install latest stable torch version | ||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is 5.4.2 really the latest stable? Would this even be compatible with ROCm 5.7 or 6.0? How useful would this be if the version of migx being tested is 5.7 or 6.0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't touched this in a while I can update. |
||
|
||
#Parity checks asked by microsoft. Ensure these are running and work with MIGraphX changes | ||
python test_parity_gelu.py --no_optimize | ||
|
||
python test_parity_layernorm.py --no_optimize | ||
|
||
python test_parity_huggingface_gpt_attention.py |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
##################################################################################### | ||
# The MIT License (MIT) | ||
# | ||
# Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved. | ||
# Copyright (c) 2015-2023 Advanced Micro Devices, Inc. All rights reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. License checker will flag this. Change to 2024 |
||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -21,21 +21,9 @@ | |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
##################################################################################### | ||
|
||
set -e | ||
|
||
ulimit -c unlimited | ||
|
||
cd /onnxruntime | ||
pip3 install -r requirements-dev.txt | ||
# Add newer cmake to the path | ||
export PATH="/opt/cmake/bin:$PATH" | ||
export CXXFLAGS="-D__HIP_PLATFORM_AMD__=1 -w" | ||
./build.sh --config Release --cmake_extra_defines CMAKE_HIP_COMPILER=/opt/rocm/llvm/bin/clang++ --update --build --build_wheel --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) --skip_tests --rocm_home /opt/rocm --use_migraphx --migraphx_home /opt/rocm --rocm_version=`cat /opt/rocm/.info/version-dev` --allow_running_as_root | ||
|
||
cd build/Linux/Release | ||
#Add test launcher for onnxrt tests | ||
|
||
echo 'InferenceSessionTests.CheckRunProfilerWithSessionOptions' >> ../../../tools/ci_build/github/pai/migraphx-excluded-tests.txt | ||
echo 'InferenceSessionTests.CheckRunProfilerWithSessionOptions2' >> ../../../tools/ci_build/github/pai/migraphx-excluded-tests.txt | ||
echo 'InferenceSessionTests.Test3LayerNestedSubgraph' >> ../../../tools/ci_build/github/pai/migraphx-excluded-tests.txt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now support the latest onnx version. 1.10.2 is too old and doesn't have a bug fix about model location changes. I would rather there be a requirements file to handle test specific items.