mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
[Backend] Support onnxruntime DirectML inference. (#1304)
* Fix links in readme * Fix links in readme * Update PPOCRv2/v3 examples * Update auto compression configs * Add neww quantization support for paddleclas model * Update quantized Yolov6s model download link * Improve PPOCR comments * Add English doc for quantization * Fix PPOCR rec model bug * Add new paddleseg quantization support * Add new paddleseg quantization support * Add new paddleseg quantization support * Add new paddleseg quantization support * Add Ascend model list * Add ascend model list * Add ascend model list * Add ascend model list * Add ascend model list * Add ascend model list * Add ascend model list * Support DirectML in onnxruntime * Support onnxruntime DirectML * Support onnxruntime DirectML * Support onnxruntime DirectML * Support OnnxRuntime DirectML * Support OnnxRuntime DirectML * Support OnnxRuntime DirectML * Support OnnxRuntime DirectML * Support OnnxRuntime DirectML * Support OnnxRuntime DirectML * Support OnnxRuntime DirectML * Support OnnxRuntime DirectML * Remove DirectML vision model example * Imporve OnnxRuntime DirectML * Imporve OnnxRuntime DirectML * fix opencv cmake in Windows * recheck codestyle
This commit is contained in:
@@ -24,6 +24,10 @@
|
||||
#include "fastdeploy/runtime/backends/ort/option.h"
|
||||
#include "onnxruntime_cxx_api.h" // NOLINT
|
||||
|
||||
#ifdef WITH_DIRECTML
|
||||
#include "dml_provider_factory.h" // NOLINT
|
||||
#endif
|
||||
|
||||
namespace fastdeploy {
|
||||
|
||||
struct OrtValueInfo {
|
||||
@@ -37,7 +41,7 @@ class OrtBackend : public BaseBackend {
|
||||
OrtBackend() {}
|
||||
virtual ~OrtBackend() = default;
|
||||
|
||||
void BuildOption(const OrtBackendOption& option);
|
||||
bool BuildOption(const OrtBackendOption& option);
|
||||
|
||||
bool Init(const RuntimeOption& option);
|
||||
|
||||
@@ -54,7 +58,7 @@ class OrtBackend : public BaseBackend {
|
||||
std::vector<TensorInfo> GetOutputInfos() override;
|
||||
static std::vector<OrtCustomOp*> custom_operators_;
|
||||
void InitCustomOperators();
|
||||
|
||||
|
||||
private:
|
||||
bool InitFromPaddle(const std::string& model_buffer,
|
||||
const std::string& params_buffer,
|
||||
|
Reference in New Issue
Block a user