onnxscript 0.1.0.dev20231130__tar.gz → 0.1.0.dev20231201__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {onnxscript-0.1.0.dev20231130/onnxscript.egg-info → onnxscript-0.1.0.dev20231201}/PKG-INFO +2 -3
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/README.md +1 -2
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/__init__.py +1 -2
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/utils.py +0 -10
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/onnx_export_test.py +3 -2
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/evaluator.py +1 -1
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/graph_building.py +1 -1
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/core.py +128 -32
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/function_libs/torch_lib/ops_test_common.py +2 -2
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/function_libs/torch_lib/ops_test_data.py +40 -9
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201/onnxscript.egg-info}/PKG-INFO +2 -3
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/LICENSE +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/MANIFEST.in +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/VERSION +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/analysis.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/analysis_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/ast_utils.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/autocast.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/deprecation.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/param_manipulation.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/param_manipulation_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/runtime_typing.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/version_utils.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/onnx_backend.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/onnx_backend_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/onnx_export.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/converter.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/converter_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/_infra.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/context.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/decorator.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/formatter.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_address.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_artifact.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_artifact_change.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_artifact_content.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_artifact_location.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_attachment.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_code_flow.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_configuration_override.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_conversion.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_edge.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_edge_traversal.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_exception.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_external_properties.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_external_property_file_reference.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_external_property_file_references.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_fix.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_graph.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_graph_traversal.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_invocation.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_location.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_location_relationship.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_logical_location.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_message.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_multiformat_message_string.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_node.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_notification.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_physical_location.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_property_bag.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_rectangle.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_region.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_replacement.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_reporting_configuration.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_reporting_descriptor.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_reporting_descriptor_reference.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_reporting_descriptor_relationship.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_result.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_result_provenance.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_run.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_run_automation_details.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_sarif_log.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_special_locations.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_stack.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_stack_frame.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_suppression.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_thread_flow.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_thread_flow_location.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_tool.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_tool_component.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_tool_component_reference.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_translation_metadata.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_version_control_details.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_web_request.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/_web_response.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/sarif/version.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/utils.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/evaluator_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/tools/torch_lib/deduce_type_constraints.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/tools/torch_lib/deduce_type_constraints_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/tools/torch_lib/generate_aten_signatures.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/tools/torch_lib/generate_prims_signatures.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/_constants.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/_flags.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/graph_building_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/common.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/fft.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/linalg.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/nested.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/nn.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/prims.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/sparse.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/ops/special.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/registration.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/function_libs/torch_lib/tensor_typing.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/irbuilder.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/main.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset1.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset10.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset11.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset12.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset13.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset14.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset15.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset16.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset17.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset18.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset19.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset2.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset3.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset4.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset5.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset6.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset7.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset8.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset9.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset_ai_onnx_ml1.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset_ai_onnx_ml2.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset_ai_onnx_ml3.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_opset/_impl/opset_ai_onnx_preview_training1.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/onnx_types.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/py.typed +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/sourceinfo.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tensor.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tensor_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/testing.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/common/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/common/onnx_script_test_case.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/common/testutils.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/eager_mode_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/eager_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/external_tensor_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/function_libs/torch_lib/error_reproduction.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/function_libs/torch_lib/extra_opinfo.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/function_libs/torch_lib/ops_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/attr_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/gemmgelu.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/gemmgelu_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/if_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/onnxfns1A_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/onnxfns2_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/onnxfns_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/functions/ort_custom_ops.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/if_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/loop_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/__init__.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/attrref.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/cast_like.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/different_opset.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/dropout.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/eager_op.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/eg1.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/getitem.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/graph_attr.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/identity.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/if_statement.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/loops_break.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/loops_while.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/m1.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/multi.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/onnxfns1.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/onnxfns1A.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/onnxfns2.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/opt_input.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/opt_output.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/renaming.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/sequences.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/signal_dft.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/subfunction.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/models/type_double.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/onnx_types_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/tests/operator_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/type_annotation.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/type_annotation_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/values.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/values_test.py +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript.egg-info/SOURCES.txt +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript.egg-info/dependency_links.txt +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript.egg-info/requires.txt +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript.egg-info/top_level.txt +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/pyproject.toml +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/setup.cfg +0 -0
- {onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: onnxscript
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev20231201
|
|
4
4
|
Summary: Naturally author ONNX functions and models using a subset of Python
|
|
5
5
|
Home-page: https://onnxscript.ai/
|
|
6
6
|
Author-email: Microsoft Corporation <onnx@microsoft.com>
|
|
@@ -111,9 +111,8 @@ pytest onnxscript
|
|
|
111
111
|
import onnx
|
|
112
112
|
|
|
113
113
|
# We use ONNX opset 15 to define the function below.
|
|
114
|
-
from onnxscript import FLOAT
|
|
114
|
+
from onnxscript import FLOAT, script
|
|
115
115
|
from onnxscript import opset15 as op
|
|
116
|
-
from onnxscript import script
|
|
117
116
|
|
|
118
117
|
|
|
119
118
|
# We use the script decorator to indicate that
|
|
@@ -65,9 +65,8 @@ pytest onnxscript
|
|
|
65
65
|
import onnx
|
|
66
66
|
|
|
67
67
|
# We use ONNX opset 15 to define the function below.
|
|
68
|
-
from onnxscript import FLOAT
|
|
68
|
+
from onnxscript import FLOAT, script
|
|
69
69
|
from onnxscript import opset15 as op
|
|
70
|
-
from onnxscript import script
|
|
71
70
|
|
|
72
71
|
|
|
73
72
|
# We use the script decorator to indicate that
|
|
@@ -58,7 +58,7 @@ from .onnx_types import (
|
|
|
58
58
|
|
|
59
59
|
# isort: on
|
|
60
60
|
|
|
61
|
-
from ._internal.utils import external_tensor
|
|
61
|
+
from ._internal.utils import external_tensor
|
|
62
62
|
from .values import OnnxFunction, TracedOnnxFunction
|
|
63
63
|
|
|
64
64
|
try:
|
|
@@ -73,7 +73,6 @@ __all__ = [
|
|
|
73
73
|
"OnnxFunction",
|
|
74
74
|
"TracedOnnxFunction",
|
|
75
75
|
"proto2python",
|
|
76
|
-
"proto2text",
|
|
77
76
|
"external_tensor",
|
|
78
77
|
"graph",
|
|
79
78
|
"BFLOAT16",
|
|
@@ -14,16 +14,6 @@ from onnx import FunctionProto, ModelProto, TensorProto, ValueInfoProto
|
|
|
14
14
|
|
|
15
15
|
from onnxscript import tensor
|
|
16
16
|
|
|
17
|
-
# print utility unavailable in ONNX 1.12 or earlier:
|
|
18
|
-
# pylint: disable=unused-import, ungrouped-imports
|
|
19
|
-
try:
|
|
20
|
-
from onnx.printer import to_text as proto2text
|
|
21
|
-
except ImportError:
|
|
22
|
-
|
|
23
|
-
def proto2text(_: Any) -> str: # type: ignore[misc]
|
|
24
|
-
return "<print utility unavailable>"
|
|
25
|
-
|
|
26
|
-
|
|
27
17
|
# pylint: enable=unused-import, ungrouped-imports
|
|
28
18
|
|
|
29
19
|
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/onnx_export_test.py
RENAMED
|
@@ -11,6 +11,7 @@ import re
|
|
|
11
11
|
import unittest
|
|
12
12
|
from typing import Pattern
|
|
13
13
|
|
|
14
|
+
import onnx
|
|
14
15
|
import onnxruntime as ort
|
|
15
16
|
import parameterized
|
|
16
17
|
from onnxruntime.capi import onnxruntime_pybind11_state
|
|
@@ -273,7 +274,7 @@ class TestOnnxBackEnd(unittest.TestCase):
|
|
|
273
274
|
except Exception as e:
|
|
274
275
|
raise AssertionError(
|
|
275
276
|
f"Unable to load onnx for test {backend_test.name!r}.\n"
|
|
276
|
-
f"{
|
|
277
|
+
f"{onnx.printer.to_text(proto)}\n"
|
|
277
278
|
f"-----\n"
|
|
278
279
|
f"{backend_test.onnx_model}"
|
|
279
280
|
) from e
|
|
@@ -298,7 +299,7 @@ class TestOnnxBackEnd(unittest.TestCase):
|
|
|
298
299
|
except Exception as e:
|
|
299
300
|
raise AssertionError(
|
|
300
301
|
f"Unable to run test {backend_test.name!r} after conversion.\n"
|
|
301
|
-
f"{
|
|
302
|
+
f"{onnx.printer.to_text(proto)}"
|
|
302
303
|
) from e
|
|
303
304
|
|
|
304
305
|
backend_test.run(_load_function, _run_function)
|
|
@@ -480,7 +480,7 @@ def _call_ort(
|
|
|
480
480
|
raise EagerModeError(
|
|
481
481
|
f"Unable to create onnxruntime InferenceSession "
|
|
482
482
|
f"for executing {schema.domain}.{schema.name} op "
|
|
483
|
-
f"with onnx model\n{
|
|
483
|
+
f"with onnx model\n{onnx.printer.to_text(model)}"
|
|
484
484
|
) from e
|
|
485
485
|
|
|
486
486
|
try:
|
|
@@ -1029,7 +1029,7 @@ class TorchScriptGraph:
|
|
|
1029
1029
|
warnings.warn(f"ONNX model is invalid: {e}", stacklevel=1)
|
|
1030
1030
|
logging.debug(
|
|
1031
1031
|
"ONNX model:\n%s\n\nTorchScript graph:\n%s",
|
|
1032
|
-
|
|
1032
|
+
onnx.printer.to_text(onnx_model),
|
|
1033
1033
|
self.torch_graph,
|
|
1034
1034
|
)
|
|
1035
1035
|
return onnx_model
|
|
@@ -4505,40 +4505,30 @@ def aten_linear_backward(
|
|
|
4505
4505
|
|
|
4506
4506
|
@torch_op("aten::linspace", trace_only=True)
|
|
4507
4507
|
def aten_linspace(
|
|
4508
|
-
start:
|
|
4508
|
+
start: TFloat, end: TFloat, steps: int, dtype: int = FLOAT.dtype
|
|
4509
4509
|
) -> TensorType:
|
|
4510
4510
|
"""linspace(Scalar start, Scalar end, int steps, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor"""
|
|
4511
4511
|
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
start
|
|
4529
|
-
end
|
|
4530
|
-
steps = op.Cast(steps, to=FLOAT.dtype)
|
|
4531
|
-
|
|
4532
|
-
range_tensor = op.Range(zero, steps, one)
|
|
4533
|
-
|
|
4534
|
-
start = op.CastLike(start, end)
|
|
4535
|
-
step = op.Div(
|
|
4536
|
-
op.Sub(end, start),
|
|
4537
|
-
op.Sub(steps, one),
|
|
4512
|
+
# Reference: https://github.com/pytorch/pytorch/blob/b35ca2cb941b5ba90858322810ca85c31e4541fd/torch/_refs/__init__.py#L4896
|
|
4513
|
+
if steps == 0:
|
|
4514
|
+
return aten_full(op.Constant(value_ints=[0]), 0.0, dtype=dtype)
|
|
4515
|
+
if steps == 1:
|
|
4516
|
+
return aten_full(op.Constant(value_ints=[steps]), start, dtype=dtype)
|
|
4517
|
+
|
|
4518
|
+
rg = aten_arange_start(0, steps, dtype=dtype)
|
|
4519
|
+
start = op.Cast(start, to=dtype)
|
|
4520
|
+
end = op.Cast(end, to=dtype)
|
|
4521
|
+
steps_float = op.Cast(steps, to=dtype)
|
|
4522
|
+
one = op.Cast(1.0, to=dtype)
|
|
4523
|
+
two = op.Cast(2.0, to=dtype)
|
|
4524
|
+
steps_minus_1 = op.Cast(steps - 1, to=dtype)
|
|
4525
|
+
step = op.Div(op.Sub(end, start), steps_minus_1)
|
|
4526
|
+
return op.Where(
|
|
4527
|
+
rg < op.Div(steps_float, two),
|
|
4528
|
+
start + step * rg,
|
|
4529
|
+
end - step * (steps_float - one - rg),
|
|
4538
4530
|
)
|
|
4539
4531
|
|
|
4540
|
-
return op.Add(op.Mul(range_tensor, step), start)
|
|
4541
|
-
|
|
4542
4532
|
|
|
4543
4533
|
@torch_op("aten::log")
|
|
4544
4534
|
def aten_log(self: TFloatOrBFloat16) -> TFloatOrBFloat16:
|
|
@@ -6925,6 +6915,37 @@ def aten_roll(self: TTensor, shifts: INT64, dims: Sequence[int] = ()) -> TTensor
|
|
|
6925
6915
|
return result
|
|
6926
6916
|
|
|
6927
6917
|
|
|
6918
|
+
@torch_op("aten::roll", trace_only=True, complex=True)
|
|
6919
|
+
def aten_roll_complex(self: TTensor, shifts: INT64, dims: Sequence[int] = ()) -> TTensor:
|
|
6920
|
+
"""roll(Tensor self, int[1] shifts, int[1] dims=[]) -> Tensor"""
|
|
6921
|
+
|
|
6922
|
+
self_rank = len(self.shape)
|
|
6923
|
+
if self_rank == 1:
|
|
6924
|
+
return self
|
|
6925
|
+
|
|
6926
|
+
if self.shape[0] == 0: # empty tensor
|
|
6927
|
+
return self
|
|
6928
|
+
|
|
6929
|
+
self_real = op.Slice(self, [0], [1], axes=[-1])
|
|
6930
|
+
self_imag = op.Slice(self, [1], [2], axes=[-1])
|
|
6931
|
+
if not dims:
|
|
6932
|
+
# assert isinstance(shifts, int)
|
|
6933
|
+
shift_real = _aten_roll_shift_no_dim_onnx(self_real, shifts)
|
|
6934
|
+
shift_imag = _aten_roll_shift_no_dim_onnx(self_imag, shifts)
|
|
6935
|
+
|
|
6936
|
+
result = op.Concat(shift_real, shift_imag, axis=-1)
|
|
6937
|
+
|
|
6938
|
+
else:
|
|
6939
|
+
# assert len(shifts) == len(dims), but shifts is a tensor, dims is a list
|
|
6940
|
+
for i, dim in enumerate(dims):
|
|
6941
|
+
shift = op.Gather(shifts, i, axis=0)
|
|
6942
|
+
self_real = _aten_roll_shift_and_dim_onnx(self_real, shift, dim)
|
|
6943
|
+
self_imag = _aten_roll_shift_and_dim_onnx(self_imag, shift, dim)
|
|
6944
|
+
|
|
6945
|
+
result = op.Concat(self_real, self_imag, axis=-1)
|
|
6946
|
+
return result
|
|
6947
|
+
|
|
6948
|
+
|
|
6928
6949
|
@torch_op("aten::roll", private=True)
|
|
6929
6950
|
def _aten_roll_shift_no_dim_onnx(self: TTensor, shift: INT64) -> TTensor:
|
|
6930
6951
|
neg_1 = op.Constant(value_ints=[-1])
|
|
@@ -8266,10 +8287,47 @@ def aten_vander(
|
|
|
8266
8287
|
raise NotImplementedError()
|
|
8267
8288
|
|
|
8268
8289
|
|
|
8269
|
-
|
|
8290
|
+
@torch_op("aten::var", trace_only=True)
|
|
8291
|
+
def aten_var(self: TReal, unbiased: Optional[bool] = True) -> TReal:
|
|
8270
8292
|
"""var(Tensor self, bool unbiased=True) -> Tensor"""
|
|
8271
8293
|
|
|
8272
|
-
|
|
8294
|
+
# Assume bool(True) and int(1) are same in ONNX, so pass "unbiased" directly as "correction"
|
|
8295
|
+
# If not this case, should be explicitly set correction value according to unbiased value
|
|
8296
|
+
return _aten_var_onnx(self, correction=float(unbiased), keepdim=False)
|
|
8297
|
+
|
|
8298
|
+
|
|
8299
|
+
@torch_op("aten::var.dim", trace_only=True)
|
|
8300
|
+
def aten_var_dim(
|
|
8301
|
+
self: TReal, dim: int, unbiased: Optional[bool] = True, keepdim: Optional[bool] = False
|
|
8302
|
+
) -> TReal:
|
|
8303
|
+
"""var(Tensor self, int[1]? dim, bool unbiased=True, bool keepdim=False) -> Tensor"""
|
|
8304
|
+
|
|
8305
|
+
if isinstance(dim, int):
|
|
8306
|
+
dim = (dim,)
|
|
8307
|
+
dim_tensor = op.Constant(value_ints=dim)
|
|
8308
|
+
return _aten_var_dim_onnx(self, dim_tensor, correction=float(unbiased), keepdim=keepdim)
|
|
8309
|
+
|
|
8310
|
+
|
|
8311
|
+
@torch_op("aten::var.correction", trace_only=True)
|
|
8312
|
+
def aten_var_correction(
|
|
8313
|
+
self: TReal,
|
|
8314
|
+
dim: Optional[int] = None,
|
|
8315
|
+
correction: Optional[float] = None,
|
|
8316
|
+
keepdim: bool = False,
|
|
8317
|
+
) -> TReal:
|
|
8318
|
+
"""var.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> Tensor"""
|
|
8319
|
+
|
|
8320
|
+
if correction is None:
|
|
8321
|
+
correction = 1.0
|
|
8322
|
+
|
|
8323
|
+
if dim is None:
|
|
8324
|
+
var = _aten_var_onnx(self, correction, keepdim)
|
|
8325
|
+
else:
|
|
8326
|
+
if isinstance(dim, int):
|
|
8327
|
+
dim = (dim,)
|
|
8328
|
+
dim_tensor = op.Constant(value_ints=dim)
|
|
8329
|
+
var = _aten_var_dim_onnx(self, dim_tensor, correction, keepdim)
|
|
8330
|
+
return var
|
|
8273
8331
|
|
|
8274
8332
|
|
|
8275
8333
|
@torch_op("aten::var_mean", trace_only=True)
|
|
@@ -8355,12 +8413,50 @@ def _aten_var_mean_dim_onnx(
|
|
|
8355
8413
|
dim_size = op.Gather(self_shape, dim, axis=0)
|
|
8356
8414
|
numel_float = op.CastLike(op.ReduceProd(dim_size, keepdims=False), self)
|
|
8357
8415
|
mul = op.Mul(var, numel_float)
|
|
8358
|
-
sub = op.Sub(numel_float, correction)
|
|
8416
|
+
sub = op.Sub(numel_float, op.CastLike(correction, self))
|
|
8359
8417
|
var = op.Div(mul, sub)
|
|
8360
8418
|
|
|
8361
8419
|
return var, mean
|
|
8362
8420
|
|
|
8363
8421
|
|
|
8422
|
+
@torch_op("aten::var", private=True, traceable=True)
|
|
8423
|
+
def _aten_var_onnx(self: TReal, correction: float, keepdim: bool = False) -> TReal:
|
|
8424
|
+
mean = op.ReduceMean(self, keepdims=keepdim)
|
|
8425
|
+
sub_mean = op.Sub(self, mean)
|
|
8426
|
+
sqr_mean = op.Mul(sub_mean, sub_mean)
|
|
8427
|
+
var = op.ReduceMean(sqr_mean, keepdims=keepdim)
|
|
8428
|
+
# Adjust var according to correction value
|
|
8429
|
+
if correction > 0.0:
|
|
8430
|
+
self_shape = op.Shape(self)
|
|
8431
|
+
numel_float = op.CastLike(op.ReduceProd(self_shape, keepdims=False), self)
|
|
8432
|
+
mul = op.Mul(var, numel_float)
|
|
8433
|
+
sub = op.Sub(numel_float, op.CastLike(correction, self))
|
|
8434
|
+
var = op.Div(mul, sub)
|
|
8435
|
+
|
|
8436
|
+
return var
|
|
8437
|
+
|
|
8438
|
+
|
|
8439
|
+
@torch_op("aten::var.dim", private=True, traceable=True)
|
|
8440
|
+
def _aten_var_dim_onnx(
|
|
8441
|
+
self: TReal, dim: INT64, correction: float, keepdim: bool = False
|
|
8442
|
+
) -> TReal:
|
|
8443
|
+
dim = op.Reshape(dim, op.Constant(value_ints=[-1]))
|
|
8444
|
+
# Computer mean and var
|
|
8445
|
+
sub_mean = op.Sub(self, op.ReduceMean(self, dim, keepdims=True))
|
|
8446
|
+
sqr_mean = op.Mul(sub_mean, sub_mean)
|
|
8447
|
+
var = op.ReduceMean(sqr_mean, dim, keepdims=keepdim)
|
|
8448
|
+
# Adjust var according to correction value
|
|
8449
|
+
if correction > 0.0:
|
|
8450
|
+
self_shape = op.Shape(self)
|
|
8451
|
+
dim_size = op.Gather(self_shape, dim, axis=0)
|
|
8452
|
+
numel_float = op.CastLike(op.ReduceProd(dim_size, keepdims=False), self)
|
|
8453
|
+
mul = op.Mul(var, numel_float)
|
|
8454
|
+
sub = op.Sub(numel_float, op.CastLike(correction, self))
|
|
8455
|
+
var = op.Div(mul, sub)
|
|
8456
|
+
|
|
8457
|
+
return var
|
|
8458
|
+
|
|
8459
|
+
|
|
8364
8460
|
def aten_vdot(self: TensorType, other: TensorType) -> TensorType:
|
|
8365
8461
|
"""vdot(Tensor self, Tensor other) -> Tensor"""
|
|
8366
8462
|
|
|
@@ -359,7 +359,7 @@ def _format_model_and_input_information(onnx_model, inputs):
|
|
|
359
359
|
f"Inputs:\n"
|
|
360
360
|
f"{pprint.pformat(inputs)}\n"
|
|
361
361
|
f"Model:\n"
|
|
362
|
-
f"{
|
|
362
|
+
f"{onnx.printer.to_text(onnx_model)}"
|
|
363
363
|
)
|
|
364
364
|
|
|
365
365
|
|
|
@@ -526,7 +526,7 @@ def graph_executor(
|
|
|
526
526
|
onnx.checker.check_model(onnx_model, full_check=True)
|
|
527
527
|
except (onnx.checker.ValidationError, onnx.shape_inference.InferenceError) as e:
|
|
528
528
|
raise AssertionError(
|
|
529
|
-
f"ONNX model is invalid. Model:\n{
|
|
529
|
+
f"ONNX model is invalid. Model:\n{onnx.printer.to_text(onnx_model)}"
|
|
530
530
|
) from e
|
|
531
531
|
|
|
532
532
|
try:
|
|
@@ -876,6 +876,7 @@ TESTED_TORCHLIB_OPS: tuple[TorchLibOpInfo, ...] = (
|
|
|
876
876
|
"linspace",
|
|
877
877
|
core_ops.aten_linspace,
|
|
878
878
|
trace_only=True,
|
|
879
|
+
tolerance={torch.float16: (2e-2, 2e-3)},
|
|
879
880
|
)
|
|
880
881
|
.xfail(
|
|
881
882
|
dtypes=(torch.int64, torch.int32),
|
|
@@ -883,17 +884,9 @@ TESTED_TORCHLIB_OPS: tuple[TorchLibOpInfo, ...] = (
|
|
|
883
884
|
)
|
|
884
885
|
.xfail(
|
|
885
886
|
variant_name="tensor_overload",
|
|
886
|
-
dtypes=(torch.int64, torch.int32
|
|
887
|
+
dtypes=(torch.int64, torch.int32),
|
|
887
888
|
reason="fixme: Results do not match with PyTorch. https://github.com/microsoft/onnxscript/issues/854",
|
|
888
889
|
enabled_if=not version_utils.torch_older_than("2.2"),
|
|
889
|
-
)
|
|
890
|
-
.xfail(
|
|
891
|
-
dtypes=(torch.float16,),
|
|
892
|
-
reason="op 'Range' doesn't support float16.",
|
|
893
|
-
)
|
|
894
|
-
.skip(
|
|
895
|
-
matcher=lambda sample: len(sample.args) > 1 and sample.args[1] == 1,
|
|
896
|
-
reason="aten::linspace with steps=1 is not supported by its definition.",
|
|
897
890
|
),
|
|
898
891
|
TorchLibOpInfo("log", core_ops.aten_log),
|
|
899
892
|
TorchLibOpInfo("le", core_ops.aten_le),
|
|
@@ -2075,6 +2068,13 @@ TESTED_TORCHLIB_OPS: tuple[TorchLibOpInfo, ...] = (
|
|
|
2075
2068
|
trace_only=True,
|
|
2076
2069
|
input_wrangler=_roll_input_wrangler,
|
|
2077
2070
|
),
|
|
2071
|
+
TorchLibOpInfo(
|
|
2072
|
+
"roll",
|
|
2073
|
+
core_ops.aten_roll_complex,
|
|
2074
|
+
input_wrangler=_roll_input_wrangler,
|
|
2075
|
+
trace_only=True,
|
|
2076
|
+
complex=True,
|
|
2077
|
+
),
|
|
2078
2078
|
TorchLibOpInfo(
|
|
2079
2079
|
"scatter_reduce",
|
|
2080
2080
|
core_ops.aten_scatter_reduce,
|
|
@@ -2182,6 +2182,36 @@ TESTED_TORCHLIB_OPS: tuple[TorchLibOpInfo, ...] = (
|
|
|
2182
2182
|
matcher=lambda sample: len(sample.args) > 0 or "correction" not in sample.kwargs,
|
|
2183
2183
|
reason="this Aten overload only support when correction attribute exists",
|
|
2184
2184
|
),
|
|
2185
|
+
TorchLibOpInfo(
|
|
2186
|
+
"var",
|
|
2187
|
+
core_ops.aten_var,
|
|
2188
|
+
trace_only=True,
|
|
2189
|
+
).xfail(
|
|
2190
|
+
# kwargs must be empty
|
|
2191
|
+
matcher=lambda sample: len(sample.kwargs) > 0,
|
|
2192
|
+
reason="this Aten overload only support input[0]=tensor and input[1]=bool as input without any kwargs",
|
|
2193
|
+
),
|
|
2194
|
+
TorchLibOpInfo(
|
|
2195
|
+
"var_dim",
|
|
2196
|
+
core_ops.aten_var_dim,
|
|
2197
|
+
trace_only=True,
|
|
2198
|
+
).xfail(
|
|
2199
|
+
# kwargs["dim"] must exist, kwargs["correction"] must not exist
|
|
2200
|
+
matcher=lambda sample: not (
|
|
2201
|
+
sample.kwargs.get("dim", None) is not None
|
|
2202
|
+
and sample.kwargs.get("correction", None) is None
|
|
2203
|
+
),
|
|
2204
|
+
reason="this Aten overload only support with 'dim' argument and without 'correction' argument",
|
|
2205
|
+
),
|
|
2206
|
+
TorchLibOpInfo(
|
|
2207
|
+
"var_correction",
|
|
2208
|
+
core_ops.aten_var_correction,
|
|
2209
|
+
trace_only=True,
|
|
2210
|
+
).skip(
|
|
2211
|
+
# Don't accept input[1]=bool and 'correction' must be in kwargs
|
|
2212
|
+
matcher=lambda sample: len(sample.args) > 0 or "correction" not in sample.kwargs,
|
|
2213
|
+
reason="this Aten overload only support when correction attribute exists",
|
|
2214
|
+
),
|
|
2185
2215
|
TorchLibOpInfo("zeros_like", core_ops.aten_zeros_like, trace_only=True),
|
|
2186
2216
|
)
|
|
2187
2217
|
|
|
@@ -2279,6 +2309,7 @@ ops_test_common.duplicate_opinfo(OPS_DB, "ops.aten._softmax", ("ops.aten._softma
|
|
|
2279
2309
|
ops_test_common.duplicate_opinfo(OPS_DB, "round", ("round_decimals",))
|
|
2280
2310
|
ops_test_common.duplicate_opinfo(OPS_DB, "squeeze", ("squeeze_dim",))
|
|
2281
2311
|
ops_test_common.duplicate_opinfo(OPS_DB, "var_mean", ("var_mean_dim", "var_mean_correction"))
|
|
2312
|
+
ops_test_common.duplicate_opinfo(OPS_DB, "var", ("var_dim", "var_correction"))
|
|
2282
2313
|
ops_test_common.duplicate_opinfo(OPS_DB, "view_as_complex", ("view_as_complex_copy",))
|
|
2283
2314
|
ops_test_common.duplicate_opinfo(OPS_DB, "view_as_real", ("view_as_real_copy",))
|
|
2284
2315
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: onnxscript
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev20231201
|
|
4
4
|
Summary: Naturally author ONNX functions and models using a subset of Python
|
|
5
5
|
Home-page: https://onnxscript.ai/
|
|
6
6
|
Author-email: Microsoft Corporation <onnx@microsoft.com>
|
|
@@ -111,9 +111,8 @@ pytest onnxscript
|
|
|
111
111
|
import onnx
|
|
112
112
|
|
|
113
113
|
# We use ONNX opset 15 to define the function below.
|
|
114
|
-
from onnxscript import FLOAT
|
|
114
|
+
from onnxscript import FLOAT, script
|
|
115
115
|
from onnxscript import opset15 as op
|
|
116
|
-
from onnxscript import script
|
|
117
116
|
|
|
118
117
|
|
|
119
118
|
# We use the script decorator to indicate that
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/__init__.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/analysis.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/analysis_test.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/ast_utils.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/autocast.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/deprecation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/runtime_typing.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/_internal/version_utils.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/__init__.py
RENAMED
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/onnx_backend.py
RENAMED
|
File without changes
|
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/backend/onnx_export.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onnxscript-0.1.0.dev20231130 → onnxscript-0.1.0.dev20231201}/onnxscript/diagnostics/infra/_infra.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|