mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-07 09:31:35 +08:00
[Hackathon 181] Add TVM support for FastDeploy on macOS (#1969)
* update for tvm backend * update third_party * update third_party * update * update * update * update * update * update * update * update --------- Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com>
This commit is contained in:
@@ -39,6 +39,7 @@ enum Backend {
|
||||
RKNPU2, ///< RKNPU2, support RKNN format model, Rockchip NPU only
|
||||
SOPHGOTPU, ///< SOPHGOTPU, support SOPHGO format model, Sophgo TPU only
|
||||
HORIZONNPU, ///< HORIZONNPU, support Horizon format model, Horizon NPU
|
||||
TVM, ///< TVMBackend, support TVM format model, CPU / Nvidia GPU
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -74,6 +75,7 @@ enum ModelFormat {
|
||||
TORCHSCRIPT, ///< Model with TorchScript format
|
||||
SOPHGO, ///< Model with SOPHGO format
|
||||
HORIZON, ///< Model with HORIZON format
|
||||
TVMFormat, ///< Model with TVM format
|
||||
};
|
||||
|
||||
/// Describle all the supported backends for specified model format
|
||||
@@ -85,16 +87,17 @@ static std::map<ModelFormat, std::vector<Backend>>
|
||||
{ModelFormat::RKNN, {Backend::RKNPU2}},
|
||||
{ModelFormat::HORIZON, {Backend::HORIZONNPU}},
|
||||
{ModelFormat::TORCHSCRIPT, {Backend::POROS}},
|
||||
{ModelFormat::SOPHGO, {Backend::SOPHGOTPU}}
|
||||
{ModelFormat::SOPHGO, {Backend::SOPHGOTPU}},
|
||||
{ModelFormat::TVMFormat, {Backend::TVM}}
|
||||
};
|
||||
|
||||
/// Describle all the supported backends for specified device
|
||||
static std::map<Device, std::vector<Backend>>
|
||||
s_default_backends_by_device = {
|
||||
{Device::CPU, {Backend::LITE, Backend::PDINFER, Backend::ORT,
|
||||
Backend::OPENVINO, Backend::POROS}},
|
||||
Backend::OPENVINO, Backend::POROS, Backend::TVM}},
|
||||
{Device::GPU, {Backend::LITE, Backend::PDINFER, Backend::ORT,
|
||||
Backend::TRT, Backend::POROS}},
|
||||
Backend::TRT, Backend::POROS, Backend::TVM}},
|
||||
{Device::RKNPU, {Backend::RKNPU2}},
|
||||
{Device::SUNRISENPU, {Backend::HORIZONNPU}},
|
||||
{Device::IPU, {Backend::PDINFER}},
|
||||
|
Reference in New Issue
Block a user