Skip to content

Commit

Permalink
cancel the SetOutputShape API change
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyueliuh committed Jul 17, 2024
1 parent fe25988 commit 59ccaa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/onnxruntime/core/session/onnxruntime_cxx_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,7 @@ struct ShapeInferContext {

size_t GetInputCount() const { return input_shapes_.size(); }

Status SetOutputShape(size_t indice, const Shape& shape, ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT);
Status SetOutputShape(size_t indice, const Shape& shape);

int64_t GetAttrInt(const char* attr_name);

Expand Down
3 changes: 1 addition & 2 deletions include/onnxruntime/core/session/onnxruntime_cxx_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -1998,10 +1998,9 @@ inline ShapeInferContext::ShapeInferContext(const OrtApi* ort_api,
}
}

inline Status ShapeInferContext::SetOutputShape(size_t indice, const Shape& shape, ONNXTensorElementDataType type) {
inline Status ShapeInferContext::SetOutputShape(size_t indice, const Shape& shape) {
OrtTensorTypeAndShapeInfo* info = {};
ORT_CXX_RETURN_ON_API_FAIL(ort_api_->CreateTensorTypeAndShapeInfo(&info));
ORT_CXX_RETURN_ON_API_FAIL(ort_api_->SetTensorElementType(info, type));

using InfoPtr = std::unique_ptr<OrtTensorTypeAndShapeInfo, std::function<void(OrtTensorTypeAndShapeInfo*)>>;

Expand Down

0 comments on commit 59ccaa5

Please sign in to comment.