Skip to content

update with onnx 1.11 release#10441

Merged
liqunfu merged 31 commits intomasterfrom
liqun/validate_onnx1.11
Mar 8, 2022
Merged

update with onnx 1.11 release#10441
liqunfu merged 31 commits intomasterfrom
liqun/validate_onnx1.11

Conversation

@liqunfu
Copy link
Copy Markdown
Contributor

@liqunfu liqunfu commented Jan 31, 2022

Description:
Update with onnx 1.11.0 release,
Fix build breaks due to new onnx 1.11.0 APIs,
Use FunctionBuilder from onnx,
support new and updated onnx ops with new and updated cpu kernels: ROIAlign ScatterElements, ScatterND, GridSample

Motivation and Context
prepare for onnxruntime 1.11.0 release

@snnn
Copy link
Copy Markdown
Contributor

snnn commented Jan 31, 2022

in case you need: https://github.com/microsoft/onnxruntime/blob/master/docs/How_To_Update_ONNX_Dev_Notes.md

@liqunfu liqunfu changed the title (WIP ) validate onnx 1.11 release update with onnx 1.11 release Feb 22, 2022
Comment thread onnxruntime/core/providers/cpu/tensor/scatter_nd.cc Outdated
Comment thread orttraining/orttraining/core/graph/training_op_defs.cc Outdated
gramalingam
gramalingam previously approved these changes Mar 2, 2022
gramalingam
gramalingam previously approved these changes Mar 4, 2022
Comment thread onnxruntime/test/testdata/kernel_def_hashes/onnx.cpu.json Outdated
Comment thread onnxruntime/core/graph/graph.cc
#include "core/framework/TensorSeq.h"
#include "core/providers/common.h"
#include "core/framework/copy.h"
#include "core/providers/op_kernel_type_control.h"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are "core/framework/element_type_lists.h", "core/framework/TensorSeq.h", and "core/providers/op_kernel_type_control.h" needed?

this file doesn't seem to use any of the op kernel type control infrastructure or TensorSeq

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can they be removed?

Comment thread onnxruntime/core/providers/cpu/tensor/grid_sample.cc Outdated
struct Func_Add<BFloat16> {
void operator()(BFloat16*, const BFloat16*) const {
ORT_NOT_IMPLEMENTED("CPU execution provider: BFloat16 data type is not supported with ScatterElements opset 16 when reduction is 'add'.");
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general nit: run formatter on changed files

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's still some odd formatting here

std::copy(str_begin, str_end, dst);
} else {
memcpy(dst_base, src_base, input_tensor->SizeInBytes());
memcpy((void*)dst_base, (const void*)src_base, input_tensor->SizeInBytes());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: casting to void* shouldn't be necessary
also prefer to avoid C-style casts, see https://google.github.io/styleguide/cppguide.html#Casting

Comment thread onnxruntime/core/providers/cpu/tensor/scatter_nd.h
Comment thread onnxruntime/core/providers/cpu/tensor/where_op.cc
@edgchen1
Copy link
Copy Markdown
Contributor

edgchen1 commented Mar 4, 2022

would it be possible to uncomment these tests too? they depend on a fix in ONNX

// TODO re-enable tests after updating ONNX to get QuantizeLinear shape inference fix
// https://github.com/onnx/onnx/pull/3806
// test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, false, false);
test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, false, true);
// test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, true, false);
test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, true, true);

// TODO re-enable tests after updating ONNX to get QuantizeLinear shape inference fix
// https://github.com/onnx/onnx/pull/3806
// test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, false, false);
test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, false, true);
// test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, true, false);
test_case({1, 13, 13, 23}, 4, {0, 3, 1, 2}, true, true);

thanks for updating this!

Copy link
Copy Markdown
Contributor

@edgchen1 edgchen1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signing off on the kernel def hash changes. not as familiar with the rest so it would be good if someone else can take a look too.

@liqunfu liqunfu merged commit da885a7 into master Mar 8, 2022
@liqunfu liqunfu deleted the liqun/validate_onnx1.11 branch March 8, 2022 05:10
@chilo-ms
Copy link
Copy Markdown
Contributor

This PR is already in rel-1.11.0 branch, so remove the label.

lavanyax pushed a commit to intel/onnxruntime that referenced this pull request Mar 29, 2022
siweic0 pushed a commit to siweic0/onnxruntime-web that referenced this pull request May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants