提交 3798d9bd 编写于 作者: qnqinan's avatar qnqinan

update tensor.h file to solve the problem that * convert to const

上级 8eeace69
...@@ -6,9 +6,10 @@ option(USE_OPENMP "openmp support" OFF) ...@@ -6,9 +6,10 @@ option(USE_OPENMP "openmp support" OFF)
option(USE_EXCEPTION "use std exception" ON) option(USE_EXCEPTION "use std exception" ON)
option(LOG_PROFILE "log profile" ON) option(LOG_PROFILE "log profile" ON)
# select the platform to build # select the platform to build
option(CPU "armv7 with neon" ON) option(CPU "armv7 with neon" OFF)
option(MALI_GPU "mali gpu" OFF) option(MALI_GPU "mali gpu" OFF)
option(FPGA "fpga" OFF) option(FPGA "fpga" ON)
SET(FPGA ON)
file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c src/*.mm) file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c src/*.mm)
file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h) file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h)
......
...@@ -257,10 +257,12 @@ class Tensor { ...@@ -257,10 +257,12 @@ class Tensor {
struct FPGAArgs { struct FPGAArgs {
float scale; float scale;
inline const float *scale_pointer() const { return &scale; } inline float *scale_pointer() { return &scale; }
}; };
const struct FPGAArgs fpga_args() const { return fpgaArgs_; } struct FPGAArgs fpga_args() const {
return fpgaArgs_;
}
#endif #endif
private: private:
......
...@@ -41,7 +41,7 @@ bool FusionFcKernel<FPGA, float>::Init(FusionFcParam *param) { ...@@ -41,7 +41,7 @@ bool FusionFcKernel<FPGA, float>::Init(FusionFcParam *param) {
fpga::ConvArgs convArgs; fpga::ConvArgs convArgs;
convArgs.relu_enabled = relu_enabled; convArgs.relu_enabled = relu_enabled;
convArgs.bias_address = (void *)input_z_ptr; convArgs.sb_address = (void *)bs_ptr;
convArgs.filter_address = (void *)input_y_ptr; convArgs.filter_address = (void *)input_y_ptr;
convArgs.filter_num = out->dims()[1]; convArgs.filter_num = out->dims()[1];
convArgs.group_num = 1; convArgs.group_num = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册