pytorch/test/onnx
Thiago Crepaldi a8f40b39ce Update all ONNX symbolics with new JitScalarType API (#87245)
Fixes https://github.com/pytorch/pytorch/issues/84365 and more

This PR addresses not only the issue above, but the entire family of issues related to `torch._C.Value.type()` parsing when `scalarType()` or `dtype()` is not available.

This issue exists before `JitScalarType` was introduced, but the new implementation refactored the bug in because the new api `from_name` and `from_dtype` requires parsing `torch._C.Value.type()` to get proper inputs, which is exactly the root cause for this family of bugs.

Therefore `from_name` and `from_dtype` must be called when the implementor knows the `name` and `dtype` without parsing a `torch._C.Value`. To handle the corner cases hidden within `torch._C.Value`, a new `from_value` API was introduced and it should be used in favor of the former ones for most cases. The new API is safer and doesn't require type parsing from user, triggering JIT asserts in the core of pytorch.

Although CI is passing for all tests, please review carefully all symbolics/helpers refactoring to make sure the meaning/intetion of the old call are not changed in the new call

Pull Request resolved: https://github.com/pytorch/pytorch/pull/87245
Approved by: https://github.com/justinchuby, https://github.com/BowenBao
2022-11-03 03:01:33 +00:00
..
assets
expect [ONNX] Disable ONNX ceil_mode and count_include_pad to aligntorch ceil_mode results in corner case (#87892) 2022-10-29 11:35:10 +00:00
internal [ONNX] Renable assert diagnostic test (#85999) 2022-10-13 17:19:36 +00:00
model_defs [ONNX] Enable script tests based on recent exporter changes (#77254) 2022-06-08 17:18:49 +00:00
autograd_helper.py
debug_embed_params.py Apply ufmt linter to all py files under test/onnx (#81335) 2022-07-15 18:51:38 +00:00
export_onnx_tests_filter.py [ONNX] Clean up unit tests, rename files and improve import style (#81141) 2022-07-12 00:00:49 +00:00
export_onnx_tests_generator.py Apply ufmt linter to all py files under test/onnx (#81335) 2022-07-15 18:51:38 +00:00
onnx_test_common.py [ONNX] Rename constants for clarity (#84645) 2022-09-09 01:22:14 +00:00
pytorch_helper.py
pytorch_test_common.py [ONNX] Clarify phrasing of skipScriptTest/skipTraceTest decorators (#86216) 2022-10-13 17:20:35 +00:00
test_autograd_funs.py [onnx] Add support for autograd function inlining in ONNX_ATEN_FALLBACK mode (#85736) 2022-10-14 21:58:01 +00:00
test_caffe2_common.py Apply ufmt linter to all py files under test/onnx (#81335) 2022-07-15 18:51:38 +00:00
test_custom_ops.py Add 'share_from_this' to 'torch::jit::Graph' (#87343) 2022-10-28 23:51:44 +00:00
test_export_modes.py [Reland][ONNX] Move all torch.onnx.export related tests to test/onnx (#87292) 2022-11-01 14:22:46 +00:00
test_models.py [ONNX] Clarify phrasing of skipScriptTest/skipTraceTest decorators (#86216) 2022-10-13 17:20:35 +00:00
test_models_onnxruntime.py [ONNX] Add acceptable_error_percentage to backend tests (#82622) 2022-08-12 21:04:29 +00:00
test_models_quantized_onnxruntime.py [ONNX] Add quantized model tests to CI (#80398) 2022-07-28 21:25:29 +00:00
test_onnx_opset.py [ONNX] Add runtime type checking to export (#83673) 2022-08-25 21:24:37 +00:00
test_operators.py [ONNX] Apply Common Subexpression Elimination pass to ONNX export (#85665) 2022-09-27 21:26:32 +00:00
test_pytorch_helper.py Apply ufmt linter to all py files under test/onnx (#81335) 2022-07-15 18:51:38 +00:00
test_pytorch_jit_onnx.py [ONNX] Add script/trace different flatten and move optional type tests to runtime (#83184) 2022-08-30 18:23:24 +00:00
test_pytorch_onnx_caffe2.py Apply ufmt linter to all py files under test/onnx (#81335) 2022-07-15 18:51:38 +00:00
test_pytorch_onnx_caffe2_quantized.py [quant][ao_migration] torch.nn.quantized.modulestorch.ao.nn.quantized.modules (#78713) 2022-08-25 16:50:33 +00:00
test_pytorch_onnx_no_runtime.py [ONNX] Add 0d-tensor test case in runtime check (#87212) 2022-11-02 16:04:21 +00:00
test_pytorch_onnx_onnxruntime.py Update all ONNX symbolics with new JitScalarType API (#87245) 2022-11-03 03:01:33 +00:00
test_pytorch_onnx_onnxruntime_cuda.py [ONNX] refactor test_pytorch_onnx_onnxruntime_cuda.py (#84218) 2022-08-30 18:38:21 +00:00
test_pytorch_onnx_shape_inference.py [ONNX] Fix reduce node shape inference (#85765) 2022-09-29 03:38:52 +00:00
test_symbolic_helper.py
test_utility_funs.py [ONNX] Reland: Update training state logic to support ScriptedModule (#86745) 2022-10-14 19:44:47 +00:00
test_verification.py [ONNX] Add script/trace different flatten and move optional type tests to runtime (#83184) 2022-08-30 18:23:24 +00:00
test_verify.py Apply ufmt linter to all py files under test/onnx (#81335) 2022-07-15 18:51:38 +00:00
verify.py [ONNX] replace all _C._flatten to torch.jit._flatten (#83598) 2022-09-01 00:31:28 +00:00