pytorch/caffe2/python/onnx/tests/onnx_backend_test.py
Lu Fang c39216f8c4 Automatic update of fbcode/onnx to bff0b8835870c7df7762ef43498d000d2d8ffb52 (#11346)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11346

Previous import was 1b09eb14c2c781fae078fa6b1c0390ba6fc0898c

Included changes:
- **[bff0b88](https://github.com/onnx/onnx/commit/bff0b88)**: Add DynamicSlice experimental op (#1377) <James Reed>
- **[91a7b8e](https://github.com/onnx/onnx/commit/91a7b8e)**: statCoverage(model) (#1246) <Akshay Chalana>
- **[36643c6](https://github.com/onnx/onnx/commit/36643c6)**: fix the doc for softmax (#1374) <Lu Fang>
- **[8c64acd](https://github.com/onnx/onnx/commit/8c64acd)**: Silence usused result warning in ONNXIFI wrapper cleanup. Fix #1344 (#1371) <Marat Dukhan>
- **[53b20f6](https://github.com/onnx/onnx/commit/53b20f6)**: Add the ability to deprecate an OpSchema (#1317) <Ryan Hill>
- **[8aec4e2](https://github.com/onnx/onnx/commit/8aec4e2)**: [Anderspapitto patch] fix the shape inference for broadcasting (#1368) <Lu Fang>

Reviewed By: jamesr66a

Differential Revision: D9691533

fbshipit-source-id: 6aff6ce04ade37182e2ffe9bc83eb86846bc722d
2018-09-06 17:39:57 -07:00

68 lines
3.0 KiB
Python

## @package onnx
# Module caffe2.python.onnx.tests.onnx_backend_test
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import unittest
import onnx.backend.test
import caffe2.python.onnx.backend as c2
# This is a pytest magic variable to load extra plugins
pytest_plugins = 'onnx.backend.test.report',
backend_test = onnx.backend.test.BackendTest(c2, __name__)
backend_test.exclude(r'(test_hardsigmoid' # Does not support Hardsigmoid.
'|test_hardmax' # Does not support Hardmax.
'|test_cast.*FLOAT16.*' # Does not support Cast on Float16.
'|test_depthtospace.*' # Does not support DepthToSpace.
'|test_reduce_l1.*' # Does not support ReduceL1.
'|test_reduce_l2.*' # Does not support ReduceL2.
'|test_reduce_log_sum.*' # Does not support ReduceLogSum.
'|test_reduce_prod.*' # Does not support ReduceProd.
'|test_reduce_sum_square.*' # Does not support ReduceSumSquare
'|test_tile.*' # Tile's Caffe2 implementation needs some tweak
'|test_lstm.*' # Seems LSTM case has some problem
'|test_simple_rnn.*' # Seems simple RNN case has some problem
'|test_gru.*' # Seems GRU case has some problem
'|test_prelu.*' # PRelu is not compliant with ONNX yet
'|test_operator_repeat.*' # Tile is not compliant with ONNX yet
'|test_.*pool_.*same.*' # Does not support pool same.
'|test_maxpool_with_argmax.*' # MaxPool outputs indices in different format.
'|test_convtranspose.*' # ConvTranspose needs some more complicated translation
'|test_mvn.*' # MeanVarianceNormalization is experimental and not supported.
'|test_dynamic_slice.*' # MeanVarianceNormalization is experimental and not supported.
')')
# Quick patch to unbreak master CI, is working on the debugging.
backend_test.exclude('(test_cast_.*'
'|test_Conv1d_.*cuda'
'|test_Conv3d_groups_cuda'
'|test_rnn_seq_length'
'|test_operator_add.*_cuda'
'|test_operator_lstm_cuda'
'|test_operator_rnn.*_cuda'
'|test_lrn_default_cuda)')
# Temporarily skip some ONNX backend tests with broadcasting.
backend_test.exclude('(test_pow_bcast'
')')
# Skip vgg to speed up CI
if 'JENKINS_URL' in os.environ:
backend_test.exclude(r'(test_vgg19|test_vgg)')
# import all test cases at global scope to make them visible to python.unittest
globals().update(backend_test
.enable_report()
.test_cases)
if __name__ == '__main__':
unittest.main()