提交 03a86226 编写于 作者: H hjchen2

Fix fpga macro in load_ops.h

上级 e789c61e
...@@ -36,7 +36,7 @@ limitations under the License. */ ...@@ -36,7 +36,7 @@ limitations under the License. */
#define LOAD_FPGA_OP(op_type) \ #define LOAD_FPGA_OP(op_type) \
extern int TouchOpRegistrar_##op_type##_##fpga(); \ extern int TouchOpRegistrar_##op_type##_##fpga(); \
static int use_op_itself_##op_type##_##fpga __attribute__((unused)) = \ static int use_op_itself_##op_type##_##fpga __attribute__((unused)) = \
TouchOpRegistrar_##op_type##_##mali_gpu() TouchOpRegistrar_##op_type##_##fpga()
#else #else
#define LOAD_FPGA_OP(op_type) #define LOAD_FPGA_OP(op_type)
#endif #endif
......
...@@ -398,7 +398,7 @@ std::vector<typename Executor<Dtype, P>::Ptype> Executor<Dtype, P>::Predict( ...@@ -398,7 +398,7 @@ std::vector<typename Executor<Dtype, P>::Ptype> Executor<Dtype, P>::Predict(
#ifdef PADDLE_MOBILE_FPGA #ifdef PADDLE_MOBILE_FPGA
template <typename Dtype, Precision P> template <typename Dtype, Precision P>
void Executor<Dtype, P>::InjectVariable(const framework::Tensor &t, void Executor<Dtype, P>::InjectVariable(const framework::Tensor &t,
string var_name) { std::string var_name) {
framework::Variable *g_feed_value = program_.scope->Var(var_name); framework::Variable *g_feed_value = program_.scope->Var(var_name);
framework::Tensor *feed_tensor = framework::Tensor *feed_tensor =
g_feed_value->GetMutable<framework::LoDTensor>(); g_feed_value->GetMutable<framework::LoDTensor>();
......
...@@ -59,7 +59,7 @@ class Executor { ...@@ -59,7 +59,7 @@ class Executor {
const std::vector<int64_t> &dims); const std::vector<int64_t> &dims);
#ifdef PADDLE_MOBILE_FPGA #ifdef PADDLE_MOBILE_FPGA
void InjectVariable(const framework::Tensor &t, string var_name); void InjectVariable(const framework::Tensor &t, std::string var_name);
void FeedData(const framework::Tensor &t); void FeedData(const framework::Tensor &t);
std::shared_ptr<framework::Tensor> FetchResult(int id = -1); std::shared_ptr<framework::Tensor> FetchResult(int id = -1);
void Predict_From_To(int start = 0, int end = -1); void Predict_From_To(int start = 0, int end = -1);
......
...@@ -127,7 +127,7 @@ PaddleMobile<Dtype, P>::~PaddleMobile() { ...@@ -127,7 +127,7 @@ PaddleMobile<Dtype, P>::~PaddleMobile() {
template <typename Dtype, Precision P> template <typename Dtype, Precision P>
void PaddleMobile<Dtype, P>::InjectVariable(const framework::Tensor &t, void PaddleMobile<Dtype, P>::InjectVariable(const framework::Tensor &t,
string var_name) { std::string var_name) {
executor_->InjectVariable(t, var_name); executor_->InjectVariable(t, var_name);
} }
......
...@@ -60,7 +60,7 @@ class PaddleMobile { ...@@ -60,7 +60,7 @@ class PaddleMobile {
~PaddleMobile(); ~PaddleMobile();
#ifdef PADDLE_MOBILE_FPGA #ifdef PADDLE_MOBILE_FPGA
void InjectVariable(const framework::Tensor &t, string var_name); void InjectVariable(const framework::Tensor &t, std::string var_name);
void FeedData(const framework::Tensor &t); void FeedData(const framework::Tensor &t);
std::shared_ptr<framework::Tensor> FetchResult(int id = -1); std::shared_ptr<framework::Tensor> FetchResult(int id = -1);
void Predict_From_To(int start = 0, int end = -1); void Predict_From_To(int start = 0, int end = -1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册