mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54462 Unclean files during sync - Sat Mar 20 04:00:02 PDT 2021 Unclean files during sync - Sun Mar 21 04:00:01 PDT 2021 ghstack-source-id: 124585992 Test Plan: ``` buck run xplat/caffe2/fb/test/delegate:interpreter_test -- --model_file_path=/path/to/mobile_model.ptl ``` Reviewed By: raziel Differential Revision: D27232309 fbshipit-source-id: 8504a3185339d73bfa6e924485c4745acf269cec
17 lines
423 B
C++
17 lines
423 B
C++
#include "custom_backend.h"
|
|
#include <torch/csrc/jit/backends/backend_preprocess.h>
|
|
|
|
namespace torch {
|
|
namespace custom_backend {
|
|
namespace {
|
|
constexpr auto kBackendName = "custom_backend";
|
|
static auto cls = torch::jit::backend<CustomBackend>(kBackendName);
|
|
static auto pre_reg = torch::jit::backend_preprocess_register(kBackendName, preprocess);
|
|
}
|
|
|
|
std::string getBackendName() {
|
|
return std::string(kBackendName);
|
|
}
|
|
}
|
|
}
|