Skip to content

Commit

Permalink
Merge pull request #2 from PINTO0309/graph_optim_param
Browse files Browse the repository at this point in the history
Increased supported data types
  • Loading branch information
PINTO0309 authored Mar 15, 2023
2 parents 69b76bd + f8418db commit d691bf0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sit4onnx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from sit4onnx.onnx_inference_test import inference, main

__version__ = '1.0.6'
__version__ = '1.0.7'
8 changes: 8 additions & 0 deletions sit4onnx/onnx_inference_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ class Color:


ONNX_DTYPES_TO_NUMPY_DTYPES: dict = {
f'{onnx.TensorProto.FLOAT16}': np.float16,
f'{onnx.TensorProto.FLOAT}': np.float32,
f'{onnx.TensorProto.DOUBLE}': np.float64,
f'{onnx.TensorProto.UINT8}': np.uint8,
f'{onnx.TensorProto.UINT16}': np.uint16,
f'{onnx.TensorProto.UINT32}': np.uint32,
f'{onnx.TensorProto.UINT64}': np.uint64,
f'{onnx.TensorProto.INT8}': np.int8,
f'{onnx.TensorProto.INT16}': np.int16,
f'{onnx.TensorProto.INT32}': np.int32,
f'{onnx.TensorProto.INT64}': np.int64,
}
Expand Down Expand Up @@ -225,6 +232,7 @@ def inference(
session_option = onnxruntime.SessionOptions()
session_option.log_severity_level = 4
session_option.intra_op_num_threads = intra_op_num_threads

if sub_info:
if onnx_execution_provider in ['openvino_cpu', 'openvino_gpu']:
session_option.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_DISABLE_ALL
Expand Down

0 comments on commit d691bf0

Please sign in to comment.