mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01: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
19 lines
438 B
C++
19 lines
438 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/jit/backends/backend_detail.h>
|
|
namespace torch {
|
|
namespace jit {
|
|
class backend_preprocess_register {
|
|
std::string backend_name_;
|
|
|
|
public:
|
|
backend_preprocess_register(
|
|
const std::string& name,
|
|
const detail::BackendPreprocessFunction& preprocess)
|
|
: backend_name_(name) {
|
|
detail::registerBackendPreprocessFunction(name, preprocess);
|
|
}
|
|
};
|
|
} // namespace jit
|
|
} // namespace torch
|