mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-16 05:30:58 +08:00
[Backend] Remove deprecated ort api (#2034)
* [Backend] Remove deprecated ort api `Ort::CustomOpApi` deprecated in ONNXRuntime 1.15 fix https://github.com/PaddlePaddle/FastDeploy/issues/2033 * Improve compatibly with ort older than 1.14 * Update fastdeploy/runtime/backends/ort/ops/multiclass_nms.cc Co-authored-by: Horror Proton <107091537+horror-proton@users.noreply.github.com> * Fix double free and wrong attrib type in ort/ops --------- Co-authored-by: Jason <928090362@qq.com>
This commit is contained in:
@@ -33,12 +33,12 @@ struct AdaptivePool2dKernel {
|
||||
protected:
|
||||
std::string pooling_type_ = "avg";
|
||||
std::vector<int64_t> output_size_ = {};
|
||||
Ort::CustomOpApi ort_;
|
||||
OrtApi ort_;
|
||||
void* compute_stream_;
|
||||
const char* provider_;
|
||||
|
||||
public:
|
||||
AdaptivePool2dKernel(Ort::CustomOpApi ort, const OrtKernelInfo* info,
|
||||
AdaptivePool2dKernel(OrtApi ort, const OrtKernelInfo* info,
|
||||
const char* provider)
|
||||
: ort_(ort) {
|
||||
GetAttribute(info);
|
||||
@@ -57,7 +57,7 @@ struct AdaptivePool2dKernel {
|
||||
struct AdaptivePool2dOp
|
||||
: Ort::CustomOpBase<AdaptivePool2dOp, AdaptivePool2dKernel> {
|
||||
explicit AdaptivePool2dOp(const char* provider) : provider_(provider) {}
|
||||
void* CreateKernel(Ort::CustomOpApi api, const OrtKernelInfo* info) const {
|
||||
void* CreateKernel(OrtApi api, const OrtKernelInfo* info) const {
|
||||
return new AdaptivePool2dKernel(api, info, provider_);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user