diff --git a/include/onnxruntime/core/session/onnxruntime_cxx_api.h b/include/onnxruntime/core/session/onnxruntime_cxx_api.h index c6cb6ed36a..b6b7ca3a2d 100644 --- a/include/onnxruntime/core/session/onnxruntime_cxx_api.h +++ b/include/onnxruntime/core/session/onnxruntime_cxx_api.h @@ -979,17 +979,17 @@ struct CustomOpApi { _In_ OrtOpAttrType type, _Outptr_ OrtOpAttr** op_attr); - void ReleaseOpAttr(_In_ OrtOpAttr* op_attr); + void ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr); void CreateOp(_In_ const OrtKernelInfo* info, _In_ const char* op_name, _In_ const char* domain, - _In_ int version, + int version, _In_opt_ const char** type_constraint_names, _In_opt_ const ONNXTensorElementDataType* type_constraint_values, - _In_opt_ int type_constraint_count, + int type_constraint_count, _In_opt_ const OrtOpAttr* const* attr_values, - _In_opt_ int attr_count, + int attr_count, _Outptr_ OrtOp** ort_op); void InvokeOp(_In_ const OrtKernelContext* context, @@ -999,7 +999,7 @@ struct CustomOpApi { _Inout_ OrtValue* const* output_values, _In_ int output_count); - void ReleaseOp(_In_ OrtOp* ort_op); + void ReleaseOp(_Frees_ptr_opt_ OrtOp* ort_op); private: const OrtApi& api_; diff --git a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h index f944590c28..42c14ecc37 100644 --- a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h +++ b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h @@ -1221,12 +1221,12 @@ inline void CustomOpApi::ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr) { inline void CustomOpApi::CreateOp(_In_ const OrtKernelInfo* info, _In_ const char* op_name, _In_ const char* domain, - _In_ int version, + int version, _In_opt_ const char** type_constraint_names, _In_opt_ const ONNXTensorElementDataType* type_constraint_values, - _In_opt_ int type_constraint_count, + int type_constraint_count, _In_opt_ const OrtOpAttr* const* attr_values, - _In_opt_ int attr_count, + int attr_count, _Outptr_ OrtOp** ort_op) { ThrowOnError(api_.CreateOp(info, op_name, domain, version, type_constraint_names, type_constraint_values, type_constraint_count, attr_values, attr_count, ort_op)); } diff --git a/onnxruntime/core/session/ort_apis.h b/onnxruntime/core/session/ort_apis.h index 4673260085..a56b85ee5b 100644 --- a/onnxruntime/core/session/ort_apis.h +++ b/onnxruntime/core/session/ort_apis.h @@ -357,12 +357,12 @@ ORT_API_STATUS_IMPL(CreateOp, _In_ const OrtKernelInfo* info, _In_ const char* op_name, _In_ const char* domain, - _In_ int version, + int version, _In_opt_ const char** type_constraint_names, _In_opt_ const ONNXTensorElementDataType* type_constraint_values, - _In_opt_ int type_constraint_count, + int type_constraint_count, _In_opt_ const OrtOpAttr* const* attr_values, - _In_opt_ int attr_count, + int attr_count, _Outptr_ OrtOp** ort_op); ORT_API_STATUS_IMPL(InvokeOp, diff --git a/onnxruntime/core/session/standalone_op_invoker.cc b/onnxruntime/core/session/standalone_op_invoker.cc index c39541b3d9..6a43a8e516 100644 --- a/onnxruntime/core/session/standalone_op_invoker.cc +++ b/onnxruntime/core/session/standalone_op_invoker.cc @@ -355,12 +355,12 @@ ORT_API_STATUS_IMPL(OrtApis::CreateOp, _In_ const OrtKernelInfo* info, _In_ const char* op_name, _In_ const char* domain, - _In_ int version, + int version, _In_opt_ const char** type_constraint_names, _In_opt_ const ONNXTensorElementDataType* type_constraint_values, - _In_opt_ int type_constraint_count, + int type_constraint_count, _In_opt_ const OrtOpAttr* const* attr_values, - _In_opt_ int attr_count, + int attr_count, _Outptr_ OrtOp** ort_op) { API_IMPL_BEGIN auto status = onnxruntime::standalone::CreateOp(info,