Files
pytorch/caffe2/python/onnx/tests/onnx_backend_test.py
Lu Fang 7e4ac8b851 Automatic update of fbcode/onnx to 7988d8360b11e6003560076e9b1d4aa426db3244 (#25959)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25959

Previous import was 28ca699b69b5a31892619defca2391044a9a6052

Included changes:
- **[7988d836](https://github.com/onnx/onnx/commit/7988d836)**: Supporting negative axes for all existing onnx ops (#2281) <Negin Raoof>
- **[5ca0a09e](https://github.com/onnx/onnx/commit/5ca0a09e)**: Update managingexperimentalops.md (#1981) <Joseph Spisak>
- **[bc0495c1](https://github.com/onnx/onnx/commit/bc0495c1)**: Fix link to community docs in readme (#2261) <Prasanth Pulavarthi>
- **[2fdb3ef6](https://github.com/onnx/onnx/commit/2fdb3ef6)**: move map and sequence types to onnx domain, (#2244) <Ke Zhang>
- **[568b65aa](https://github.com/onnx/onnx/commit/568b65aa)**: Improve compatiblity with proto3 and enable reading attributes (#2288) <Dmitri Smirnov>
- **[1f350f2c](https://github.com/onnx/onnx/commit/1f350f2c)**: Remove type info for loop variadic input in Loop op used to compose the Range op (#2287) <Hariharan Seshadri>
- **[eb139446](https://github.com/onnx/onnx/commit/eb139446)**: Add Foundation WG to working-groups.md (#2276) <Ryan Loney>
- **[4eabc4b3](https://github.com/onnx/onnx/commit/4eabc4b3)**: Fix testdata model for CumSum. Add exclusive attribute. (#2271) <jignparm>
- **[1a62afdb](https://github.com/onnx/onnx/commit/1a62afdb)**: Support GatherND operator in ONNX (#2106) <Hariharan Seshadri>
- **[0e330e9d](https://github.com/onnx/onnx/commit/0e330e9d)**: Support ScatterND operator in ONNX (#2220) <Bowen Bao>
- **[733f7a6a](https://github.com/onnx/onnx/commit/733f7a6a)**: Add Det to ONNX (#2233) <Bowen Bao>
- **[52187738](https://github.com/onnx/onnx/commit/52187738)**: Update the description of nearest_mode of resize op (#2257) <daquexian>
- **[64b4b686](https://github.com/onnx/onnx/commit/64b4b686)**: Adding sparse tensor to ONNX (#2019) <G. Ramalingam>
- **[c8a8b7cc](https://github.com/onnx/onnx/commit/c8a8b7cc)**: Support Range operator in ONNX (#2242) <Hariharan Seshadri>
- **[44b0d6d5](https://github.com/onnx/onnx/commit/44b0d6d5)**: Update resize op (#2057) <daquexian>
- **[7d907964](https://github.com/onnx/onnx/commit/7d907964)**: Add function to fuse dynamic quantization graph into 1 node (#2187) <Ashwini Khade>
- **[36f8e6d9](https://github.com/onnx/onnx/commit/36f8e6d9)**: Update logo_request.md (#2231) <Prasanth Pulavarthi>
- **[4eb737c8](https://github.com/onnx/onnx/commit/4eb737c8)**: Update Clip in opset 11 to support min/max as inputs instead of attributes (#2096) <Bowen Bao>
- **[a25e1388](https://github.com/onnx/onnx/commit/a25e1388)**: Fix segfault in tile shape inference (#2221) <daquexian>
- **[2dc273c7](https://github.com/onnx/onnx/commit/2dc273c7)**: update onehot shape inference to reflect the spec for depth input (#2224) <Ashwini Khade>
- **[665211c1](https://github.com/onnx/onnx/commit/665211c1)**: Add GatherElements Op and Rename ScatterElements (#2143) <Lara Haidar>
- **[3ba2e31a](https://github.com/onnx/onnx/commit/3ba2e31a)**: Unique (#2141) <liqunfu>
- **[5a5588ad](https://github.com/onnx/onnx/commit/5a5588ad)**: Clarify dimension variable scoping (#2211) <G. Ramalingam>
- **[fabe39d5](https://github.com/onnx/onnx/commit/fabe39d5)**: Liqun/topk sort (#2126) <liqunfu>
- **[453aa644](https://github.com/onnx/onnx/commit/453aa644)**: Update document for NMS (#2193) <Hector Li>
- **[34e28ec2](https://github.com/onnx/onnx/commit/34e28ec2)**: Handle negative 'axis' value in Split type and shape inferencing (#2177) <Scott McKay>
- **[28ec4583](https://github.com/onnx/onnx/commit/28ec4583)**: depth to space shuffle order (#2163) <Negin Raoof>
- **[98f72629](https://github.com/onnx/onnx/commit/98f72629)**: minor updates to fix links in readme (#2189) <Prasanth Pulavarthi>
- **[321d1467](https://github.com/onnx/onnx/commit/321d1467)**: Add check to disallow squeezing input axes which are not 1 (#2204) <Ashwini Khade>
- **[573f0dc9](https://github.com/onnx/onnx/commit/573f0dc9)**: fix a bug in fun shape inference (#2188) <Tang, Cheng>
- **[36dc7110](https://github.com/onnx/onnx/commit/36dc7110)**: Clarify ambiguity in gather spec regarding indices expectation (#2202) <Ashwini Khade>
- **[a2449673](https://github.com/onnx/onnx/commit/a2449673)**: Fix some minor issues in IR.md and Versioning.md (#2108) <edgchen1>
- **[349aff69](https://github.com/onnx/onnx/commit/349aff69)**: Skip install typing package for python >=3.5 (#2199) <bddppq>

Test Plan: ci

Reviewed By: bddppq, benoitsteiner

Differential Revision: D17296390

fbshipit-source-id: 9f9f5ce85d9694128008d756c2ea393bd4e0cb71
2019-09-12 12:15:03 -07:00

112 lines
5.7 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
from caffe2.python import core, workspace
core.SetEnginePref({}, {})
# 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_det.*' # Does not support Det
'|test_range.*' # Does not support Range
'|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_.*pool_.*ceil.*' # Does not support pool same.
'|test_maxpool_with_argmax.*' # MaxPool outputs indices in different format.
'|test_maxpool.*dilation.*' # MaxPool doesn't support dilation yet
'|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.
'|test_eyelike.*' # Needs implementation
'|test_maxunpool.*' # Needs implementation
'|test_acosh.*' # Needs implementation
'|test_asinh.*' # Needs implementation
'|test_atanh.*' # Needs implementation
'|test_onehot.*' # Needs implementation
'|test_scan.*' # Needs implementation
'|test_isnan.*' # Needs implementation
'|test_scatter.*' # Should be similar to ScatterAssign
'|test_constantofshape_int.*' # Needs implementation
'|test_shrink.*' # Needs implementation
'|test_strnorm.*' # Needs implementation
'|test_nonzero.*' # Needs implementation
'|test_tfidfvectorizer.*' # Needs implementation
'|test_top_k.*' # opset 10 is not supported yet
'|test_resize.*' # opset 10 is not supported yet
'|test_slice.*' # opset 10 is not supported yet
'|test_.*qlinear.*' # Skip quantized op test
'|test_.*quantize.*' # Skip quantized op test
'|test_.*matmulinteger.*' # Skip quantized op test
'|test_.*convinteger.*' # Skip quantized op test
'|test_isinf.*' # Needs implementation
'|test_mod.*' # Needs implementation
'|test_nonmaxsuppression.*' # Needs implementation
'|test_reversesequence.*' # Needs implementation
'|test_roialign.*' # Needs implementation
'|test_bitshift.*' # Needs implementation
'|test_round.*' # Needs implementation
'|test_cumsum.*' # Needs implementation
'|test_clip.*' # opset 11 is not supported yet
'|test_gather_elements.*' # opset 11 is not supported yet
'|test_scatter.*' # opset 11 is not supported yet
'|test_unique.*' # opset 11 is not supported yet
'|test_gathernd.*' # opset 11 is not supported yet
'|test_.*negative_ax.*' # negative axis is not supported yet
'|test_.*negative_ind.*' # negative axis is not supported yet
')')
# Quick patch to unbreak master CI, is working on the debugging.
backend_test.exclude('(test_cast_.*'
'|test_compress_.*'
'|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()