Skip to content

Commit 07b6bb6

Browse files
authored
Disambiguate the winml OrtModel with the model editing API OrtModel. (microsoft#24474)
### Description <!-- Describe your changes. --> Use a pimpl-esque approach so that the winml OrtModel type doesn't conflict with the model editing API OrtModel. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Fix crash due to linker calling the incorrect destructor when there are two different OrtModel types in the global namespace.
1 parent 0d26928 commit 07b6bb6

File tree

4 files changed

+94
-52
lines changed

4 files changed

+94
-52
lines changed

onnxruntime/core/framework/tensor_type_and_shape.cc

-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ std::unique_ptr<OrtTensorTypeAndShapeInfo> OrtTensorTypeAndShapeInfo::GetTensorS
226226
if (dim_params != nullptr) {
227227
type_and_shape->dim_params = *dim_params;
228228
} else {
229-
// we expect to be being called with a concrete shape so validate that
230-
assert(type_and_shape->shape.Size() >= 0);
231229
type_and_shape->dim_params.resize(type_and_shape->shape.NumDimensions(), "");
232230
}
233231

0 commit comments

Comments
 (0)