Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Better support for ir_version#82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sdpython merged 3 commits intomainfromo116
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion_unittests/ut_light_api/test_backend_export.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -242,7 +242,7 @@ def run_node(cls, node, inputs, device=None, outputs_info=None, **kwargs):

# The following tests are too slow with the reference implementation (Conv).
backend_test.exclude(
"(FLOAT8|BFLOAT16|_opt_|_3d_|_momentum_|_4d_"
"(FLOAT8|BFLOAT16|INT4|_opt_|_3d_|_momentum_|_4d_|int4"
"|test_adagrad"
"|test_adam"
"|test_ai_onnx_ml_"
Expand DownExpand Up@@ -270,6 +270,8 @@ def run_node(cls, node, inputs, device=None, outputs_info=None, **kwargs):
"|test_squeezenet"
"|test_vgg19"
"|test_zfnet512"
"|test_range_float_type_positive_delta_expanded"
"|test_range_int32_type_negative_delta_expanded"
")"
)

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -149,7 +149,7 @@ def run_node(cls, node, inputs, device=None, outputs_info=None, **kwargs):
"|test_scan_sum)"
)

if onnx_opset_version() <21:
if onnx_opset_version() <200:
# The following tests are using types not supported by NumPy.
# They could be if method to_array is extended to support custom
# types the same as the reference implementation does
Expand All@@ -164,8 +164,10 @@ def run_node(cls, node, inputs, device=None, outputs_info=None, **kwargs):
"|test_cast_no_saturate_"
"|_to_FLOAT8"
"|_FLOAT8"
"|INT4"
"|test_quantizelinear_e4m3fn"
"|test_quantizelinear_e5m2"
"|test_scatter_with"
")"
)

Expand Down
5 changes: 5 additions & 0 deletionsonnx_array_api/graph_api/graph_builder.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -156,6 +156,7 @@ def __init__(
optimization_options: Optional[OptimizationOptions] = None,
args: Optional[List[Any]] = None,
verbose: int = 0,
ir_version: Optional[int] = None,
):
self.optimization_options = optimization_options or OptimizationOptions()
self.as_function = as_function
Expand All@@ -170,6 +171,7 @@ def __init__(
if isinstance(target_opset_or_existing_proto, int)
else target_opset_or_existing_proto
)
self.ir_version = ir_version
self.nodes = []
self.initializers_dict = {}
self.inputs = []
Expand All@@ -186,6 +188,7 @@ def __init__(
), "input_names must be empty if the input is an existing model."
proto = target_opset_or_existing_proto
self.opsets = {d.domain: d.version for d in proto.opset_import}
self.ir_version = ir_version or target_opset_or_existing_proto.ir_version
self.nodes = list(proto.graph.node)
self.initializers_dict = {i.name: i for i in proto.graph.initializer}
self.initializers_dict.update(
Expand DownExpand Up@@ -674,6 +677,8 @@ def to_onnx(
if self.verbose:
print("[GraphBuilder] onh.make_model")
model = oh.make_model(graph, opset_imports=opsets)
if self.ir_version:
model.ir_version = self.ir_version
return model

def _check_order_node(self, ind: int, node: NodeProto, existing: Set[str]):
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp