mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
.github: Enable onnx tests (#66513)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66513 These were missed in the migration of onnx to github actions. Adds ort tests with 2 shards for the onnx workflow Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Test Plan: Imported from OSS Reviewed By: malfet Differential Revision: D31591512 Pulled By: seemethere fbshipit-source-id: 4a8bb3f0e62ff98ee77d3d8afc905f4e02db6f24
This commit is contained in:
parent
93d326c868
commit
06a156efc7
|
|
@ -151,21 +151,24 @@ fi
|
|||
# Some Caffe2 tests fail when run using AVX512 ISA, see https://github.com/pytorch/pytorch/issues/66111
|
||||
export DNNL_MAX_CPU_ISA=AVX2
|
||||
|
||||
pip install --user pytest-sugar
|
||||
"$PYTHON" \
|
||||
-m pytest \
|
||||
-x \
|
||||
-v \
|
||||
--disable-warnings \
|
||||
--junit-xml="$pytest_reports_dir/result.xml" \
|
||||
--ignore "$caffe2_pypath/python/test/executor_test.py" \
|
||||
--ignore "$caffe2_pypath/python/operator_test/matmul_op_test.py" \
|
||||
--ignore "$caffe2_pypath/python/operator_test/pack_ops_test.py" \
|
||||
--ignore "$caffe2_pypath/python/mkl/mkl_sbn_speed_test.py" \
|
||||
--ignore "$caffe2_pypath/python/trt/test_pt_onnx_trt.py" \
|
||||
${rocm_ignore_test[@]} \
|
||||
"$caffe2_pypath/python" \
|
||||
"${EXTRA_TESTS[@]}"
|
||||
# Should still run even in the absence of SHARD_NUMBER
|
||||
if [[ "${SHARD_NUMBER:-1}" == "1" ]]; then
|
||||
pip install --user pytest-sugar
|
||||
"$PYTHON" \
|
||||
-m pytest \
|
||||
-x \
|
||||
-v \
|
||||
--disable-warnings \
|
||||
--junit-xml="$pytest_reports_dir/result.xml" \
|
||||
--ignore "$caffe2_pypath/python/test/executor_test.py" \
|
||||
--ignore "$caffe2_pypath/python/operator_test/matmul_op_test.py" \
|
||||
--ignore "$caffe2_pypath/python/operator_test/pack_ops_test.py" \
|
||||
--ignore "$caffe2_pypath/python/mkl/mkl_sbn_speed_test.py" \
|
||||
--ignore "$caffe2_pypath/python/trt/test_pt_onnx_trt.py" \
|
||||
${rocm_ignore_test[@]} \
|
||||
"$caffe2_pypath/python" \
|
||||
"${EXTRA_TESTS[@]}"
|
||||
fi
|
||||
|
||||
#####################
|
||||
# torchvision tests #
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ fi
|
|||
|
||||
# onnxruntime only support py3
|
||||
# "Python.h" not found in py2, needed by TorchScript custom op compilation.
|
||||
if [[ "$BUILD_ENVIRONMENT" == *ort_test1* ]]; then
|
||||
if [[ "$BUILD_ENVIRONMENT" == *ort_test1* || "${SHARD_NUMBER}" == "1" ]]; then
|
||||
# These exclusions are for tests that take a long time / a lot of GPU
|
||||
# memory to run; they should be passing (and you will test them if you
|
||||
# run them locally
|
||||
|
|
@ -78,7 +78,7 @@ if [[ "$BUILD_ENVIRONMENT" == *ort_test1* ]]; then
|
|||
"$top_dir/test/onnx/test_pytorch_onnx_shape_inference.py"
|
||||
fi
|
||||
|
||||
if [[ "$BUILD_ENVIRONMENT" == *ort_test2* ]]; then
|
||||
if [[ "$BUILD_ENVIRONMENT" == *ort_test2* || "${SHARD_NUMBER}" == "2" ]]; then
|
||||
# Update the loop for new opsets
|
||||
for i in $(seq 10 14); do
|
||||
pytest "${args[@]}" \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user