提交 0575e7d7 编写于 作者: L liuruilong

complie success

上级 4693638f
...@@ -7,7 +7,7 @@ option(DEBUGING "enable debug mode" ON) ...@@ -7,7 +7,7 @@ option(DEBUGING "enable debug mode" ON)
option(USE_EXCEPTION "use std exception" OFF) option(USE_EXCEPTION "use std exception" OFF)
option(LOG_PROFILE "log profile" OFF) option(LOG_PROFILE "log profile" OFF)
# select the platform to build # select the platform to build
option(CPU "armv7 with neon" OFF) option(CPU "armv7 with neon" ON)
option(GPU_MALI "mali gpu" OFF) option(GPU_MALI "mali gpu" OFF)
option(GPU_CL "opencl gpu" ON) option(GPU_CL "opencl gpu" ON)
option(FPGA "fpga" OFF) option(FPGA "fpga" OFF)
...@@ -72,8 +72,8 @@ endif() ...@@ -72,8 +72,8 @@ endif()
if (GPU_CL) if (GPU_CL)
add_definitions(-DPADDLE_MOBILE_CL) add_definitions(-DPADDLE_MOBILE_CL)
include_directories(third_party/opecl/OpenCL-Headers) link_libraries(/Users/liuruilong/GitHub/paddle-mobile/third_party/opencl/libOpenCL.so)
link_libraries(third_party/opecl/libOpenCL.so) include_directories(third_party/opencl/OpenCL-Headers)
else() else()
file(GLOB_RECURSE _tmp_list src/framework/cl/*.cpp src/operators/kernel/cl/*.cpp) file(GLOB_RECURSE _tmp_list src/framework/cl/*.cpp src/operators/kernel/cl/*.cpp)
foreach(f ${_tmp_list}) foreach(f ${_tmp_list})
...@@ -82,6 +82,7 @@ else() ...@@ -82,6 +82,7 @@ else()
file(GLOB_RECURSE _tmp_list_h src/framework/cl/*.h) file(GLOB_RECURSE _tmp_list_h src/framework/cl/*.h)
foreach(f ${_tmp_list_h}) foreach(f ${_tmp_list_h})
message(STATUS ${f})
list(REMOVE_ITEM PADDLE_MOBILE_H ${f}) list(REMOVE_ITEM PADDLE_MOBILE_H ${f})
endforeach() endforeach()
endif() endif()
......
...@@ -65,7 +65,7 @@ bool CLEngine::SetClDeviceId() { ...@@ -65,7 +65,7 @@ bool CLEngine::SetClDeviceId() {
clGetDeviceIDs(platform_, CL_DEVICE_TYPE_GPU, 0, NULL, &numDevices); clGetDeviceIDs(platform_, CL_DEVICE_TYPE_GPU, 0, NULL, &numDevices);
if (numDevices > 0) { if (numDevices > 0) {
devices_ = reinterpret_cast<cl_platform_id *>( devices_ = reinterpret_cast<cl_device_id *>(
malloc(numDevices * sizeof(cl_device_id))); malloc(numDevices * sizeof(cl_device_id)));
status = clGetDeviceIDs(platform_, CL_DEVICE_TYPE_GPU, numDevices, devices_, status = clGetDeviceIDs(platform_, CL_DEVICE_TYPE_GPU, numDevices, devices_,
NULL); NULL);
......
...@@ -38,8 +38,8 @@ class CLEngine { ...@@ -38,8 +38,8 @@ class CLEngine {
std::unique_ptr<_cl_command_queue, CLCommQueueDeleter> CreateClCommandQueue() { std::unique_ptr<_cl_command_queue, CLCommQueueDeleter> CreateClCommandQueue() {
cl_int status; cl_int status;
cl_command_queue = clCreateCommandQueue(context_.get(), devices_[0], 0, &status); cl_command_queue queue = clCreateCommandQueue(context_.get(), devices_[0], 0, &status);
std::unique_ptr<_cl_command_queue, CLCommQueueDeleter> command_queue_ptr(cl_command_queue); std::unique_ptr<_cl_command_queue, CLCommQueueDeleter> command_queue_ptr(queue);
return std::move(command_queue_ptr); return std::move(command_queue_ptr);
} }
...@@ -67,7 +67,7 @@ class CLEngine { ...@@ -67,7 +67,7 @@ class CLEngine {
return std::move(program_ptr); return std::move(program_ptr);
} }
bool CLEngine::BuildProgram(cl_program program) { bool BuildProgram(cl_program program) {
cl_int status; cl_int status;
status = clBuildProgram(program, 0, 0, "-cl-fast-relaxed-math", 0, 0); status = clBuildProgram(program, 0, 0, "-cl-fast-relaxed-math", 0, 0);
CL_CHECK_ERRORS(status); CL_CHECK_ERRORS(status);
......
...@@ -25,6 +25,7 @@ namespace framework { ...@@ -25,6 +25,7 @@ namespace framework {
class CLHelper { class CLHelper {
public: public:
CLHelper() = default;
CLHelper(CLScope *scope): scope_(scope) { CLHelper(CLScope *scope): scope_(scope) {
} }
......
...@@ -57,7 +57,7 @@ class CLScope { ...@@ -57,7 +57,7 @@ class CLScope {
auto program = CLEngine::Instance()->CreateProgramWith(context_.get(), file_name); auto program = CLEngine::Instance()->CreateProgramWith(context_.get(), file_name);
programs_[file_name] = std::move(program); programs_[file_name] = std::move(program);
status_ = clBuildProgram(program, 0, 0, 0, 0, 0); status_ = clBuildProgram(program.get(), 0, 0, 0, 0, 0);
CL_CHECK_ERRORS(status_); CL_CHECK_ERRORS(status_);
return program.get(); return program.get();
} }
......
...@@ -29,7 +29,6 @@ const char* opencl_error_to_str (cl_int error); ...@@ -29,7 +29,6 @@ const char* opencl_error_to_str (cl_int error);
opencl_error_to_str(ERR), __FILE__, __LINE__ \ opencl_error_to_str(ERR), __FILE__, __LINE__ \
); \ ); \
} }
#endif
} }
} }
...@@ -15,7 +15,9 @@ limitations under the License. */ ...@@ -15,7 +15,9 @@ limitations under the License. */
#pragma once #pragma once
#include <string> #include <string>
#include <memory>
#include <tuple> #include <tuple>
#include "common/log.h" #include "common/log.h"
#include "common/type_define.h" #include "common/type_define.h"
#include "framework/op_info.h" #include "framework/op_info.h"
...@@ -90,6 +92,7 @@ class OpRegistry { ...@@ -90,6 +92,7 @@ class OpRegistry {
const std::string& type, const VariableNameMap& inputs, const std::string& type, const VariableNameMap& inputs,
const VariableNameMap& outputs, const AttributeMap attrs, const VariableNameMap& outputs, const AttributeMap attrs,
std::shared_ptr<paddle_mobile::framework::Scope> scope) { std::shared_ptr<paddle_mobile::framework::Scope> scope) {
auto& info = OpInfoMap<Dtype>::Instance()->Get(type); auto& info = OpInfoMap<Dtype>::Instance()->Get(type);
auto op = info.Creator()(type, inputs, outputs, attrs, scope); auto op = info.Creator()(type, inputs, outputs, attrs, scope);
return std::shared_ptr<OperatorBase<Dtype>>(op); return std::shared_ptr<OperatorBase<Dtype>>(op);
......
...@@ -56,7 +56,7 @@ template <typename Dtype> ...@@ -56,7 +56,7 @@ template <typename Dtype>
void OperatorBase<Dtype>::CheckAllInputOutputSet() const {} void OperatorBase<Dtype>::CheckAllInputOutputSet() const {}
template <typename Dtype> template <typename Dtype>
void OperatorBase<Dtype>::Run() const { void OperatorBase<Dtype>::Run() {
RunImpl(); RunImpl();
#ifdef PADDLE_MOBILE_DEBUG #ifdef PADDLE_MOBILE_DEBUG
DLOG << "-------------" << type_ << "----------------------------"; DLOG << "-------------" << type_ << "----------------------------";
...@@ -87,6 +87,7 @@ void OperatorBase<Dtype>::Run() const { ...@@ -87,6 +87,7 @@ void OperatorBase<Dtype>::Run() const {
template class OperatorBase<CPU>; template class OperatorBase<CPU>;
template class OperatorBase<FPGA>; template class OperatorBase<FPGA>;
template class OperatorBase<GPU_MALI>; template class OperatorBase<GPU_MALI>;
template class OperatorBase<GPU_CL>;
} // namespace framework } // namespace framework
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -31,9 +31,10 @@ limitations under the License. */ ...@@ -31,9 +31,10 @@ limitations under the License. */
#include "framework/scope.h" #include "framework/scope.h"
#include "framework/tensor.h" #include "framework/tensor.h"
#include "framework/variable.h" #include "framework/variable.h"
#ifdef PADDLE_MOBILE_CL
#include "framework/cl/cl_scope.h" #include "framework/cl/cl_scope.h"
#include "framework/cl/cl_helper.h" #include "framework/cl/cl_helper.h"
#endif
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
using std::string; using std::string;
...@@ -61,10 +62,10 @@ class OperatorBase { ...@@ -61,10 +62,10 @@ class OperatorBase {
const VariableNameMap &outputs, const AttributeMap &attrs, const VariableNameMap &outputs, const AttributeMap &attrs,
std::shared_ptr<Scope> scope); std::shared_ptr<Scope> scope);
virtual ~OperatorBase() {} virtual ~OperatorBase() {}
void Run() const; void Run();
std::vector<string> GetOutKeys() const; std::vector<string> GetOutKeys() const;
std::vector<string> GetInputKeys() const; std::vector<string> GetInputKeys() const;
virtual void RunImpl() const = 0; virtual void RunImpl() = 0;
virtual void Init() = 0; virtual void Init() = 0;
/* /*
...@@ -114,10 +115,9 @@ class OperatorWithKernel : public OperatorBase<Dtype> { ...@@ -114,10 +115,9 @@ class OperatorWithKernel : public OperatorBase<Dtype> {
const VariableNameMap &outputs, const AttributeMap &attrs, const VariableNameMap &outputs, const AttributeMap &attrs,
std::shared_ptr<Scope> scope) std::shared_ptr<Scope> scope)
: OperatorBase<Dtype>(type, inputs, outputs, attrs, scope), : OperatorBase<Dtype>(type, inputs, outputs, attrs, scope),
param_(inputs, outputs, attrs, *scope), param_(inputs, outputs, attrs, *scope) {}
kernel_(scope->GetCLScpoe()) {}
virtual void RunImpl() const { this->kernel_.Compute(this->param_); } virtual void RunImpl() { this->kernel_.Compute(this->param_); }
virtual void InferShape() const = 0; virtual void InferShape() const = 0;
...@@ -143,31 +143,33 @@ class OpKernelBase { ...@@ -143,31 +143,33 @@ class OpKernelBase {
public: public:
OpKernelBase() = default; OpKernelBase() = default;
OpKernelBase(CLScope *clscope): cl_helper_(clscope) { // OpKernelBase(CLScope *clscope): cl_helper_(CLHelper(clscope)) {
} // }
/* /*
* @b 所有kernel 需实现 Compute 方法 * @b 所有kernel 需实现 Compute 方法
* @p para 这个参数为 kernel 运算时所需要用到参数组成的一个结构体, * @p para 这个参数为 kernel 运算时所需要用到参数组成的一个结构体,
* 所有结构体存在与: paddle-mobile/src/operators/op_param.h * 所有结构体存在与: paddle-mobile/src/operators/op_param.h
* */ * */
#ifdef PADDLE_MOBILE_MALI_GPU #ifdef PADDLE_McOBILE_MALI_GPU
OpKernelBase() { acl_op_ = nullptr; } OpKernelBase() { acl_op_ = nullptr; }
void *GetAclOp() const { return acl_op_; } void *GetAclOp() const { return acl_op_; }
void SetAclOp(void *op, void *ob) const { void SetAclOp(void *op, void *ob) const {
reinterpret_cast<OpKernelBase<Dtype, P> *>(ob)->acl_op_ = op; reinterpret_cast<OpKernelBase<Dtype, P> *>(ob)->acl_op_ = op;
} }
#endif #endif
virtual void Compute(const P &para) const = 0; virtual void Compute(const P &para) = 0;
virtual bool Init(P *para) { return true; } virtual bool Init(P *para) { return true; }
virtual ~OpKernelBase() = default; virtual ~OpKernelBase() = default;
protected:
// CLHelper cl_helper_;
private: private:
#ifdef PADDLE_MOBILE_MALI_GPU #ifdef PADDLE_MOBILE_MALI_GPU
void *acl_op_; void *acl_op_;
#endif #endif
CLHelper cl_helper_;
}; };
......
...@@ -16,9 +16,9 @@ limitations under the License. */ ...@@ -16,9 +16,9 @@ limitations under the License. */
#include <list> #include <list>
//#ifdef PADDLE_MOBILE_OCL #ifdef PADDLE_MOBILE_CL
#include "framework/cl/cl_scope.h" #include "framework/cl/cl_scope.h"
//#endif #endif
#include <unordered_map> #include <unordered_map>
#include "variable.h" #include "variable.h"
...@@ -39,9 +39,9 @@ class Scope { ...@@ -39,9 +39,9 @@ class Scope {
} }
kids_.clear(); kids_.clear();
//#ifdef PADDLE_MOBILE_OCL #ifdef PADDLE_MOBILE_CL
delete cl_scope_; delete cl_scope_;
//#endif #endif
} }
...@@ -82,9 +82,11 @@ class Scope { ...@@ -82,9 +82,11 @@ class Scope {
Variable *FindVarLocally(const std::string &name) const; Variable *FindVarLocally(const std::string &name) const;
#ifdef PADDLE_MOBILE_CL
CLScope *GetCLScpoe() { CLScope *GetCLScpoe() {
return cl_scope_; return cl_scope_;
} }
#endif
private: private:
// Call Scope::NewScope for a sub-scope. // Call Scope::NewScope for a sub-scope.
...@@ -93,9 +95,11 @@ class Scope { ...@@ -93,9 +95,11 @@ class Scope {
mutable std::unordered_map<std::string, Variable *> vars_; mutable std::unordered_map<std::string, Variable *> vars_;
mutable std::list<Scope *> kids_; mutable std::list<Scope *> kids_;
Scope const *parent_{nullptr}; Scope const *parent_{nullptr};
//#ifdef PADDLE_MOBILE_CL
#ifdef PADDLE_MOBILE_CL
CLScope *cl_scope_ = new CLScope(); CLScope *cl_scope_ = new CLScope();
//#endif #endif
}; };
} // namespace framework } // namespace framework
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -720,7 +720,8 @@ void Executor<Dtype, P>::Predict_To(int end) { ...@@ -720,7 +720,8 @@ void Executor<Dtype, P>::Predict_To(int end) {
#endif #endif
template class Executor<CPU, Precision::FP32>; template class Executor<CPU, Precision::FP32>;
template class Executor<GPU_MALI, Precision::FP32>;
template class Executor<FPGA, Precision::FP32>; template class Executor<FPGA, Precision::FP32>;
template class Executor<GPU_CL, Precision::FP32>;
template class Executor<GPU_MALI, Precision::FP32>;
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -193,5 +193,6 @@ const framework::Program<Dtype, P> Loader<Dtype, P>::LoadCombinedMemory( ...@@ -193,5 +193,6 @@ const framework::Program<Dtype, P> Loader<Dtype, P>::LoadCombinedMemory(
template class Loader<CPU, Precision::FP32>; template class Loader<CPU, Precision::FP32>;
template class Loader<FPGA, Precision::FP32>; template class Loader<FPGA, Precision::FP32>;
template class Loader<GPU_MALI, Precision::FP32>; template class Loader<GPU_MALI, Precision::FP32>;
template class Loader<GPU_CL, Precision::FP32>;
} // namespace paddle_mobile } // namespace paddle_mobile
...@@ -40,10 +40,6 @@ class BilinearOp : public framework::OperatorWithKernel< ...@@ -40,10 +40,6 @@ class BilinearOp : public framework::OperatorWithKernel<
DeviceType, BilinearInterpParam<DeviceType>, DeviceType, BilinearInterpParam<DeviceType>,
operators::BilinearInterpKernel<DeviceType, T>>( operators::BilinearInterpKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, BilinearInterpParam<DeviceType>,
operators::BilinearInterpKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
}; };
......
...@@ -39,10 +39,6 @@ class BoxCoderOp : public framework::OperatorWithKernel< ...@@ -39,10 +39,6 @@ class BoxCoderOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, BoxCoderParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, BoxCoderParam<DeviceType>,
operators::BoxCoderKernel<DeviceType, T>>( operators::BoxCoderKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, BoxCoderParam<DeviceType>,
operators::BoxCoderKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -34,10 +34,6 @@ class ConcatOp : public framework::OperatorWithKernel< ...@@ -34,10 +34,6 @@ class ConcatOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, ConcatParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, ConcatParam<DeviceType>,
operators::ConcatKernel<DeviceType, T>>( operators::ConcatKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, ConcatParam<DeviceType>,
operators::ConcatKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -34,10 +34,6 @@ class ConvOp : public framework::OperatorWithKernel< ...@@ -34,10 +34,6 @@ class ConvOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, ConvParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, ConvParam<DeviceType>,
operators::ConvKernel<DeviceType, T>>( operators::ConvKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, ConvParam<DeviceType>,
operators::ConvKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
private: private:
......
...@@ -37,10 +37,6 @@ class CrfOp : public framework::OperatorWithKernel< ...@@ -37,10 +37,6 @@ class CrfOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, CrfParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, CrfParam<DeviceType>,
operators::CrfKernel<DeviceType, T>>( operators::CrfKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, CrfParam<DeviceType>,
operators::CrfKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
}; };
......
...@@ -36,10 +36,6 @@ class DepthwiseConvOp : public framework::OperatorWithKernel< ...@@ -36,10 +36,6 @@ class DepthwiseConvOp : public framework::OperatorWithKernel<
DeviceType, ConvParam<DeviceType>, DeviceType, ConvParam<DeviceType>,
operators::DepthwiseConvKernel<DeviceType, T>>( operators::DepthwiseConvKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, ConvParam<DeviceType>,
operators::DepthwiseConvKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
private: private:
......
...@@ -38,10 +38,6 @@ class DropoutOp : public framework::OperatorWithKernel< ...@@ -38,10 +38,6 @@ class DropoutOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, DropoutParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, DropoutParam<DeviceType>,
operators::DropoutKernel<DeviceType, T>>( operators::DropoutKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
// using framework::OperatorWithKernel<DeviceType, DropoutParam<DeviceType>,
// operators::DropoutKernel<DeviceType,
// T>>;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -37,10 +37,6 @@ class ElementwiseAddOp : public framework::OperatorWithKernel< ...@@ -37,10 +37,6 @@ class ElementwiseAddOp : public framework::OperatorWithKernel<
DeviceType, ElementwiseAddParam<DeviceType>, DeviceType, ElementwiseAddParam<DeviceType>,
operators::ElementwiseAddKernel<DeviceType, T>>( operators::ElementwiseAddKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, ElementwiseAddParam<DeviceType>,
operators::ElementwiseAddKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -74,7 +74,7 @@ class FeedOp : public framework::OperatorBase<DeviceType> { ...@@ -74,7 +74,7 @@ class FeedOp : public framework::OperatorBase<DeviceType> {
#else #else
void Init() {} void Init() {}
void RunImpl() const { void RunImpl() {
param_.Out()->ShareDataWith(*param_.InputX()); param_.Out()->ShareDataWith(*param_.InputX());
param_.Out()->set_lod(param_.InputX()->lod()); param_.Out()->set_lod(param_.InputX()->lod());
} }
......
...@@ -31,7 +31,7 @@ class FetchOp : public framework::OperatorBase<DeviceType> { ...@@ -31,7 +31,7 @@ class FetchOp : public framework::OperatorBase<DeviceType> {
: framework::OperatorBase<DeviceType>(type, inputs, outputs, attrs, : framework::OperatorBase<DeviceType>(type, inputs, outputs, attrs,
scope), scope),
param_(inputs, outputs, attrs, *scope) {} param_(inputs, outputs, attrs, *scope) {}
void RunImpl() const { param_.Out()->ShareDataWith(*param_.InputX()); } void RunImpl() { param_.Out()->ShareDataWith(*param_.InputX()); }
void Init() {} void Init() {}
......
...@@ -53,10 +53,6 @@ class FlattenOp : public framework::OperatorWithKernel< ...@@ -53,10 +53,6 @@ class FlattenOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, FlattenParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, FlattenParam<DeviceType>,
operators::FlattenKernel<DeviceType, T>>( operators::FlattenKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FlattenParam<DeviceType>,
operators::FlattenKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
}; };
......
...@@ -56,10 +56,6 @@ class FusionConvAddOp : public framework::OperatorWithKernel< ...@@ -56,10 +56,6 @@ class FusionConvAddOp : public framework::OperatorWithKernel<
FusionConvAddParam<DeviceType>, FusionConvAddParam<DeviceType>,
operators::ConvAddKernel<DeviceType, T>>( operators::ConvAddKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionConvAddParam<DeviceType>,
operators::ConvAddKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -67,10 +67,6 @@ class FusionConvAddAddPReluOp ...@@ -67,10 +67,6 @@ class FusionConvAddAddPReluOp
DeviceType, FusionConvAddAddPReluParam<DeviceType>, DeviceType, FusionConvAddAddPReluParam<DeviceType>,
operators::ConvAddAddPReluKernel<DeviceType, T>>( operators::ConvAddAddPReluKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionConvAddAddPReluParam<DeviceType>,
operators::ConvAddAddPReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -66,10 +66,6 @@ class FusionConvAddBNReluOp ...@@ -66,10 +66,6 @@ class FusionConvAddBNReluOp
DeviceType, FusionConvAddBNReluParam<DeviceType>, DeviceType, FusionConvAddBNReluParam<DeviceType>,
operators::ConvAddBNReluKernel<DeviceType, T>>( operators::ConvAddBNReluKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionConvAddBNReluParam<DeviceType>,
operators::ConvAddBNReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -63,9 +63,6 @@ class FusionConvAddPReluOp ...@@ -63,9 +63,6 @@ class FusionConvAddPReluOp
operators::ConvAddPReluKernel<DeviceType, T>>(type, inputs, outputs, operators::ConvAddPReluKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {} attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionConvAddPReluParam<DeviceType>,
operators::ConvAddPReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -57,9 +57,6 @@ class FusionConvAddReluOp : public framework::OperatorWithKernel< ...@@ -57,9 +57,6 @@ class FusionConvAddReluOp : public framework::OperatorWithKernel<
operators::ConvAddReluKernel<DeviceType, T>>(type, inputs, outputs, operators::ConvAddReluKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {} attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionConvAddReluParam<DeviceType>,
operators::ConvAddReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -71,10 +71,6 @@ class FusionConvBNAddReluOp ...@@ -71,10 +71,6 @@ class FusionConvBNAddReluOp
DeviceType, FusionConvBNAddReluParam<DeviceType>, DeviceType, FusionConvBNAddReluParam<DeviceType>,
operators::ConvBNAddReluKernel<DeviceType, T>>( operators::ConvBNAddReluKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionConvBNAddReluParam<DeviceType>,
operators::ConvBNAddReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -63,10 +63,6 @@ class FusionConvBNReluOp : public framework::OperatorWithKernel< ...@@ -63,10 +63,6 @@ class FusionConvBNReluOp : public framework::OperatorWithKernel<
DeviceType, FusionConvBNReluParam<DeviceType>, DeviceType, FusionConvBNReluParam<DeviceType>,
operators::ConvBNReluKernel<DeviceType, T>>(type, inputs, outputs, operators::ConvBNReluKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {} attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionConvBNReluParam<DeviceType>,
operators::ConvBNReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -65,9 +65,6 @@ class FusionDWConvBNReluOp ...@@ -65,9 +65,6 @@ class FusionDWConvBNReluOp
operators::DWConvBNReluKernel<DeviceType, T>>(type, inputs, outputs, operators::DWConvBNReluKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {} attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionDWConvBNReluParam<DeviceType>,
operators::DWConvBNReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -56,10 +56,6 @@ class FusionFcOp : public framework::OperatorWithKernel< ...@@ -56,10 +56,6 @@ class FusionFcOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, FusionFcParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, FusionFcParam<DeviceType>,
operators::FusionFcKernel<DeviceType, T>>( operators::FusionFcKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionFcParam<DeviceType>,
operators::FusionFcKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -56,9 +56,6 @@ class FusionFcReluOp : public framework::OperatorWithKernel< ...@@ -56,9 +56,6 @@ class FusionFcReluOp : public framework::OperatorWithKernel<
operators::FusionFcReluKernel<DeviceType, T>>(type, inputs, outputs, operators::FusionFcReluKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {} attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FusionFcReluParam<DeviceType>,
operators::FusionFcReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
protected: protected:
......
...@@ -37,10 +37,6 @@ class GruOp : public framework::OperatorWithKernel< ...@@ -37,10 +37,6 @@ class GruOp : public framework::OperatorWithKernel<
: framework::OperatorWithKernel<DeviceType, GruParam<DeviceType>, : framework::OperatorWithKernel<DeviceType, GruParam<DeviceType>,
operators::GruKernel<DeviceType, T>>( operators::GruKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {} type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, GruParam<DeviceType>,
operators::GruKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
}; };
......
...@@ -39,9 +39,6 @@ class Im2SequenceOp : public framework::OperatorWithKernel< ...@@ -39,9 +39,6 @@ class Im2SequenceOp : public framework::OperatorWithKernel<
operators::Im2SequenceKernel<DeviceType, T>>(type, inputs, outputs, operators::Im2SequenceKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {} attrs, scope) {}
// using framework::OperatorWithKernel<
// DeviceType, Im2SequenceParam<DeviceType>,
// operators::Im2SequenceKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override; void InferShape() const override;
private: private:
......
...@@ -27,7 +27,7 @@ bool BatchNormKernel<CPU, float>::Init(BatchNormParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool BatchNormKernel<CPU, float>::Init(BatchNormParam<CPU> *param) {
template <> template <>
void BatchNormKernel<CPU, float>::Compute( void BatchNormKernel<CPU, float>::Compute(
const BatchNormParam<CPU> &param) const { const BatchNormParam<CPU> &param) {
BatchnormCompute<float>(param); BatchnormCompute<float>(param);
} }
......
...@@ -28,7 +28,7 @@ bool BilinearInterpKernel<CPU, float>::Init(BilinearInterpParam<CPU> *param) { ...@@ -28,7 +28,7 @@ bool BilinearInterpKernel<CPU, float>::Init(BilinearInterpParam<CPU> *param) {
template <> template <>
void BilinearInterpKernel<CPU, float>::Compute( void BilinearInterpKernel<CPU, float>::Compute(
const BilinearInterpParam<CPU> &param) const { const BilinearInterpParam<CPU> &param) {
BilinearInterpCompute<float>(param); BilinearInterpCompute<float>(param);
} }
......
...@@ -27,7 +27,7 @@ bool BoxCoderKernel<CPU, float>::Init(BoxCoderParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool BoxCoderKernel<CPU, float>::Init(BoxCoderParam<CPU> *param) {
template <> template <>
void BoxCoderKernel<CPU, float>::Compute( void BoxCoderKernel<CPU, float>::Compute(
const BoxCoderParam<CPU> &param) const { const BoxCoderParam<CPU> &param) {
BoxCoderCompute<float>(param); BoxCoderCompute<float>(param);
} }
......
...@@ -26,7 +26,7 @@ bool ConcatKernel<CPU, float>::Init(ConcatParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool ConcatKernel<CPU, float>::Init(ConcatParam<CPU> *param) {
} }
template <> template <>
void ConcatKernel<CPU, float>::Compute(const ConcatParam<CPU> &param) const { void ConcatKernel<CPU, float>::Compute(const ConcatParam<CPU> &param) {
ConcatCompute<float>(param); ConcatCompute<float>(param);
param.Out()->set_lod(param.Inputs()[0]->lod()); param.Out()->set_lod(param.Inputs()[0]->lod());
} }
......
...@@ -28,7 +28,7 @@ bool ConvAddAddPReluKernel<CPU, float>::Init( ...@@ -28,7 +28,7 @@ bool ConvAddAddPReluKernel<CPU, float>::Init(
template <> template <>
void ConvAddAddPReluKernel<CPU, float>::Compute( void ConvAddAddPReluKernel<CPU, float>::Compute(
const FusionConvAddAddPReluParam<CPU> &param) const { const FusionConvAddAddPReluParam<CPU> &param) {
ConvAddAddPReluCompute<float>(param); ConvAddAddPReluCompute<float>(param);
} }
template class ConvAddAddPReluKernel<CPU, float>; template class ConvAddAddPReluKernel<CPU, float>;
......
...@@ -55,7 +55,7 @@ bool ConvAddBNReluKernel<CPU, float>::Init( ...@@ -55,7 +55,7 @@ bool ConvAddBNReluKernel<CPU, float>::Init(
template <> template <>
void ConvAddBNReluKernel<CPU, float>::Compute( void ConvAddBNReluKernel<CPU, float>::Compute(
const FusionConvAddBNReluParam<CPU> &param) const { const FusionConvAddBNReluParam<CPU> &param) {
ConvAddBNReluCompute<float>(param); ConvAddBNReluCompute<float>(param);
} }
template class ConvAddBNReluKernel<CPU, float>; template class ConvAddBNReluKernel<CPU, float>;
......
...@@ -26,7 +26,7 @@ bool ConvAddKernel<CPU, float>::Init(FusionConvAddParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool ConvAddKernel<CPU, float>::Init(FusionConvAddParam<CPU> *param) {
template <> template <>
void ConvAddKernel<CPU, float>::Compute( void ConvAddKernel<CPU, float>::Compute(
const FusionConvAddParam<CPU> &param) const { const FusionConvAddParam<CPU> &param) {
ConvAddCompute<float>(param); ConvAddCompute<float>(param);
} }
......
...@@ -27,7 +27,7 @@ bool ConvAddPReluKernel<CPU, float>::Init(FusionConvAddPReluParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool ConvAddPReluKernel<CPU, float>::Init(FusionConvAddPReluParam<CPU> *param) {
template <> template <>
void ConvAddPReluKernel<CPU, float>::Compute( void ConvAddPReluKernel<CPU, float>::Compute(
const FusionConvAddPReluParam<CPU> &param) const { const FusionConvAddPReluParam<CPU> &param) {
ConvAddPReluCompute<float>(param); ConvAddPReluCompute<float>(param);
} }
template class ConvAddPReluKernel<CPU, float>; template class ConvAddPReluKernel<CPU, float>;
......
...@@ -27,7 +27,7 @@ bool ConvAddReluKernel<CPU, float>::Init(FusionConvAddReluParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool ConvAddReluKernel<CPU, float>::Init(FusionConvAddReluParam<CPU> *param) {
template <> template <>
void ConvAddReluKernel<CPU, float>::Compute( void ConvAddReluKernel<CPU, float>::Compute(
const FusionConvAddReluParam<CPU> &param) const { const FusionConvAddReluParam<CPU> &param) {
ConvAddReluCompute<float>(param); ConvAddReluCompute<float>(param);
} }
template class ConvAddReluKernel<CPU, float>; template class ConvAddReluKernel<CPU, float>;
......
...@@ -55,7 +55,7 @@ bool ConvBNAddReluKernel<CPU, float>::Init( ...@@ -55,7 +55,7 @@ bool ConvBNAddReluKernel<CPU, float>::Init(
template <> template <>
void ConvBNAddReluKernel<CPU, float>::Compute( void ConvBNAddReluKernel<CPU, float>::Compute(
const FusionConvBNAddReluParam<CPU> &param) const { const FusionConvBNAddReluParam<CPU> &param) {
ConvBNAddReluCompute<float>(param); ConvBNAddReluCompute<float>(param);
} }
template class ConvBNAddReluKernel<CPU, float>; template class ConvBNAddReluKernel<CPU, float>;
......
...@@ -57,7 +57,7 @@ bool ConvBNReluKernel<CPU, float>::Init(FusionConvBNReluParam<CPU> *param) { ...@@ -57,7 +57,7 @@ bool ConvBNReluKernel<CPU, float>::Init(FusionConvBNReluParam<CPU> *param) {
template <> template <>
void ConvBNReluKernel<CPU, float>::Compute( void ConvBNReluKernel<CPU, float>::Compute(
const FusionConvBNReluParam<CPU> &param) const { const FusionConvBNReluParam<CPU> &param) {
ConvBNReluCompute<float>(param); ConvBNReluCompute<float>(param);
} }
template class ConvBNReluKernel<CPU, float>; template class ConvBNReluKernel<CPU, float>;
......
...@@ -26,7 +26,7 @@ bool ConvKernel<CPU, float>::Init(ConvParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool ConvKernel<CPU, float>::Init(ConvParam<CPU> *param) {
} }
template <> template <>
void ConvKernel<CPU, float>::Compute(const ConvParam<CPU> &param) const { void ConvKernel<CPU, float>::Compute(const ConvParam<CPU> &param) {
ConvCompute<float>(param); ConvCompute<float>(param);
} }
......
...@@ -27,7 +27,7 @@ bool ConvTransposeKernel<CPU, float>::Init(ConvTransposeParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool ConvTransposeKernel<CPU, float>::Init(ConvTransposeParam<CPU> *param) {
template <> template <>
void ConvTransposeKernel<CPU, float>::Compute( void ConvTransposeKernel<CPU, float>::Compute(
const ConvTransposeParam<CPU> &param) const { const ConvTransposeParam<CPU> &param) {
ConvTransposeCompute<float>(param); ConvTransposeCompute<float>(param);
} }
......
...@@ -27,7 +27,7 @@ bool CrfKernel<CPU, float>::Init(CrfParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool CrfKernel<CPU, float>::Init(CrfParam<CPU> *param) {
} }
template <> template <>
void CrfKernel<CPU, float>::Compute(const CrfParam<CPU> &param) const { void CrfKernel<CPU, float>::Compute(const CrfParam<CPU> &param) {
CrfCompute<float>(param); CrfCompute<float>(param);
} }
......
...@@ -27,7 +27,7 @@ bool DepthwiseConvKernel<CPU, float>::Init(ConvParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool DepthwiseConvKernel<CPU, float>::Init(ConvParam<CPU> *param) {
template <> template <>
void DepthwiseConvKernel<CPU, float>::Compute( void DepthwiseConvKernel<CPU, float>::Compute(
const ConvParam<CPU> &param) const { const ConvParam<CPU> &param) {
DepthwiseConvCompute<float>(param); DepthwiseConvCompute<float>(param);
} }
......
...@@ -35,7 +35,7 @@ struct DropoutFunctor { ...@@ -35,7 +35,7 @@ struct DropoutFunctor {
}; };
template <> template <>
void DropoutKernel<CPU, float>::Compute(const DropoutParam<CPU> &param) const { void DropoutKernel<CPU, float>::Compute(const DropoutParam<CPU> &param) {
const auto *input_x = param.InputX(); const auto *input_x = param.InputX();
auto *input_x_ptr = input_x->data<float>(); auto *input_x_ptr = input_x->data<float>();
auto *out = param.Out(); auto *out = param.Out();
......
...@@ -54,7 +54,7 @@ bool DWConvBNReluKernel<CPU, float>::Init(FusionDWConvBNReluParam<CPU> *param) { ...@@ -54,7 +54,7 @@ bool DWConvBNReluKernel<CPU, float>::Init(FusionDWConvBNReluParam<CPU> *param) {
template <> template <>
void DWConvBNReluKernel<CPU, float>::Compute( void DWConvBNReluKernel<CPU, float>::Compute(
const FusionDWConvBNReluParam<CPU> &param) const { const FusionDWConvBNReluParam<CPU> &param) {
DWConvBNReluCompute<float>(param); DWConvBNReluCompute<float>(param);
} }
template class DWConvBNReluKernel<CPU, float>; template class DWConvBNReluKernel<CPU, float>;
......
...@@ -27,7 +27,7 @@ bool ElementwiseAddKernel<CPU, float>::Init(ElementwiseAddParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool ElementwiseAddKernel<CPU, float>::Init(ElementwiseAddParam<CPU> *param) {
template <> template <>
void ElementwiseAddKernel<CPU, float>::Compute( void ElementwiseAddKernel<CPU, float>::Compute(
const ElementwiseAddParam<CPU> &param) const { const ElementwiseAddParam<CPU> &param) {
ElementwiseAddCompute<float>(param); ElementwiseAddCompute<float>(param);
param.Out()->set_lod(param.InputX()->lod()); param.Out()->set_lod(param.InputX()->lod());
} }
......
...@@ -27,7 +27,7 @@ bool FlattenKernel<CPU, float>::Init(FlattenParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool FlattenKernel<CPU, float>::Init(FlattenParam<CPU> *param) {
} }
template <> template <>
void FlattenKernel<CPU, float>::Compute(const FlattenParam<CPU> &param) const { void FlattenKernel<CPU, float>::Compute(const FlattenParam<CPU> &param) {
FlattenCompute<float>(param); FlattenCompute<float>(param);
} }
......
...@@ -27,7 +27,7 @@ bool FusionFcKernel<CPU, float>::Init(FusionFcParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool FusionFcKernel<CPU, float>::Init(FusionFcParam<CPU> *param) {
template <> template <>
void FusionFcKernel<CPU, float>::Compute( void FusionFcKernel<CPU, float>::Compute(
const FusionFcParam<CPU> &param) const { const FusionFcParam<CPU> &param) {
FusionFcCompute<float>(param); FusionFcCompute<float>(param);
param.Out()->set_lod(param.InputX()->lod()); param.Out()->set_lod(param.InputX()->lod());
} }
......
...@@ -26,7 +26,7 @@ bool GruKernel<CPU, float>::Init(GruParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool GruKernel<CPU, float>::Init(GruParam<CPU> *param) {
} }
template <> template <>
void GruKernel<CPU, float>::Compute(const GruParam<CPU> &param) const { void GruKernel<CPU, float>::Compute(const GruParam<CPU> &param) {
GruCompute<float>(param); GruCompute<float>(param);
param.OutHidden()->set_lod(param.InputInput()->lod()); param.OutHidden()->set_lod(param.InputInput()->lod());
// DLOG << "________________" << param.OutHidden()->dims(); // DLOG << "________________" << param.OutHidden()->dims();
......
...@@ -33,7 +33,7 @@ inline int Im2SeqOutputSize(int input_size, int filter_size, int padding_0, ...@@ -33,7 +33,7 @@ inline int Im2SeqOutputSize(int input_size, int filter_size, int padding_0,
template <> template <>
void Im2SequenceKernel<CPU, float>::Compute( void Im2SequenceKernel<CPU, float>::Compute(
const Im2SequenceParam<CPU> &param) const { const Im2SequenceParam<CPU> &param) {
const Tensor *in_x = param.Input(); const Tensor *in_x = param.Input();
Tensor *out = param.Output(); Tensor *out = param.Output();
out->mutable_data<float>(); out->mutable_data<float>();
......
...@@ -25,7 +25,7 @@ bool LookupKernel<CPU, float>::Init(LookupParam<CPU> *param) { ...@@ -25,7 +25,7 @@ bool LookupKernel<CPU, float>::Init(LookupParam<CPU> *param) {
} }
template <> template <>
void LookupKernel<CPU, float>::Compute(const LookupParam<CPU> &param) const { void LookupKernel<CPU, float>::Compute(const LookupParam<CPU> &param) {
LookupCompute<float>(param); LookupCompute<float>(param);
param.Out()->set_lod(param.InputIds()->lod()); param.Out()->set_lod(param.InputIds()->lod());
} }
......
...@@ -26,7 +26,7 @@ bool LrnKernel<CPU, float>::Init(LrnParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool LrnKernel<CPU, float>::Init(LrnParam<CPU> *param) {
} }
template <> template <>
void LrnKernel<CPU, float>::Compute(const LrnParam<CPU> &param) const { void LrnKernel<CPU, float>::Compute(const LrnParam<CPU> &param) {
LrnCompute<float>(param); LrnCompute<float>(param);
} }
......
...@@ -26,7 +26,7 @@ bool MulKernel<CPU, float>::Init(MulParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool MulKernel<CPU, float>::Init(MulParam<CPU> *param) {
} }
template <> template <>
void MulKernel<CPU, float>::Compute(const MulParam<CPU> &param) const { void MulKernel<CPU, float>::Compute(const MulParam<CPU> &param) {
MulCompute<float>(param); MulCompute<float>(param);
param.Out()->set_lod(param.InputX()->lod()); param.Out()->set_lod(param.InputX()->lod());
} }
......
...@@ -27,7 +27,7 @@ bool MultiClassNMSKernel<CPU, float>::Init(MultiClassNMSParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool MultiClassNMSKernel<CPU, float>::Init(MultiClassNMSParam<CPU> *param) {
template <> template <>
void MultiClassNMSKernel<CPU, float>::Compute( void MultiClassNMSKernel<CPU, float>::Compute(
const MultiClassNMSParam<CPU> &param) const { const MultiClassNMSParam<CPU> &param) {
MultiClassNMSCompute<float>(param); MultiClassNMSCompute<float>(param);
} }
......
...@@ -25,7 +25,7 @@ bool PoolKernel<CPU, float>::Init(PoolParam<CPU> *param) { ...@@ -25,7 +25,7 @@ bool PoolKernel<CPU, float>::Init(PoolParam<CPU> *param) {
} }
template <> template <>
void PoolKernel<CPU, float>::Compute(const PoolParam<CPU> &param) const { void PoolKernel<CPU, float>::Compute(const PoolParam<CPU> &param) {
PoolCompute<float>(param); PoolCompute<float>(param);
} }
} // namespace operators } // namespace operators
......
...@@ -35,7 +35,7 @@ struct PReluFunctor { ...@@ -35,7 +35,7 @@ struct PReluFunctor {
* @b 特化到具体平台的实现, param 从 op 层传入 * @b 特化到具体平台的实现, param 从 op 层传入
* */ * */
template <> template <>
void PReluKernel<CPU, float>::Compute(const PReluParam<CPU> &param) const { void PReluKernel<CPU, float>::Compute(const PReluParam<CPU> &param) {
auto *x = param.InputX(); auto *x = param.InputX();
auto *alpha = param.InputAlpha(); auto *alpha = param.InputAlpha();
auto *out = param.Out(); auto *out = param.Out();
......
...@@ -27,7 +27,7 @@ bool PriorBoxKernel<CPU, float>::Init(PriorBoxParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool PriorBoxKernel<CPU, float>::Init(PriorBoxParam<CPU> *param) {
template <> template <>
void PriorBoxKernel<CPU, float>::Compute( void PriorBoxKernel<CPU, float>::Compute(
const PriorBoxParam<CPU> &param) const { const PriorBoxParam<CPU> &param) {
PriorBoxCompute<float>(param); PriorBoxCompute<float>(param);
} }
......
...@@ -26,7 +26,7 @@ bool ReluKernel<CPU, float>::Init(ReluParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool ReluKernel<CPU, float>::Init(ReluParam<CPU> *param) {
} }
template <> template <>
void ReluKernel<CPU, float>::Compute(const ReluParam<CPU> &param) const { void ReluKernel<CPU, float>::Compute(const ReluParam<CPU> &param) {
ReluCompute<float>(param); ReluCompute<float>(param);
} }
......
...@@ -26,7 +26,7 @@ bool ReshapeKernel<CPU, float>::Init(ReshapeParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool ReshapeKernel<CPU, float>::Init(ReshapeParam<CPU> *param) {
} }
template <> template <>
void ReshapeKernel<CPU, float>::Compute(const ReshapeParam<CPU> &param) const { void ReshapeKernel<CPU, float>::Compute(const ReshapeParam<CPU> &param) {
ReshapeCompute<float>(param); ReshapeCompute<float>(param);
} }
......
...@@ -108,7 +108,7 @@ void ResizeTensor(const Tensor* src, Tensor* dst) { ...@@ -108,7 +108,7 @@ void ResizeTensor(const Tensor* src, Tensor* dst) {
} }
template <> template <>
void ResizeKernel<CPU, float>::Compute(const ResizeParam<CPU>& param) const { void ResizeKernel<CPU, float>::Compute(const ResizeParam<CPU>& param) {
const auto* input_x = param.InputX(); const auto* input_x = param.InputX();
const auto& input_x_dims = input_x->dims(); const auto& input_x_dims = input_x->dims();
auto* out = param.Out(); auto* out = param.Out();
......
...@@ -23,7 +23,7 @@ namespace operators { ...@@ -23,7 +23,7 @@ namespace operators {
* @b 特化到具体平台的实现, param 从 op 层传入 * @b 特化到具体平台的实现, param 从 op 层传入
* */ * */
template <> template <>
void ScaleKernel<CPU, float>::Compute(const ScaleParam<CPU> &param) const { void ScaleKernel<CPU, float>::Compute(const ScaleParam<CPU> &param) {
const auto *input_x = param.InputX(); const auto *input_x = param.InputX();
auto *input_x_ptr = input_x->data<float>(); auto *input_x_ptr = input_x->data<float>();
auto *out = param.Out(); auto *out = param.Out();
......
...@@ -27,7 +27,7 @@ bool ShapeKernel<CPU, float>::Init(ShapeParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool ShapeKernel<CPU, float>::Init(ShapeParam<CPU> *param) {
} }
template <> template <>
void ShapeKernel<CPU, float>::Compute(const ShapeParam<CPU> &param) const { void ShapeKernel<CPU, float>::Compute(const ShapeParam<CPU> &param) {
ShapeCompute<float>(param); ShapeCompute<float>(param);
} }
......
...@@ -32,7 +32,7 @@ bool SigmoidKernel<CPU, float>::Init(SigmoidParam<CPU> *param) { ...@@ -32,7 +32,7 @@ bool SigmoidKernel<CPU, float>::Init(SigmoidParam<CPU> *param) {
} }
template <> template <>
void SigmoidKernel<CPU, float>::Compute(const SigmoidParam<CPU> &param) const { void SigmoidKernel<CPU, float>::Compute(const SigmoidParam<CPU> &param) {
SigmoidCompute<float>(param); SigmoidCompute<float>(param);
} }
......
...@@ -26,7 +26,7 @@ bool SoftmaxKernel<CPU, float>::Init(SoftmaxParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool SoftmaxKernel<CPU, float>::Init(SoftmaxParam<CPU> *param) {
} }
template <> template <>
void SoftmaxKernel<CPU, float>::Compute(const SoftmaxParam<CPU> &param) const { void SoftmaxKernel<CPU, float>::Compute(const SoftmaxParam<CPU> &param) {
SoftmaxCompute<float>(param); SoftmaxCompute<float>(param);
} }
......
...@@ -27,7 +27,7 @@ bool SplitKernel<CPU, float>::Init(SplitParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool SplitKernel<CPU, float>::Init(SplitParam<CPU> *param) {
} }
template <> template <>
void SplitKernel<CPU, float>::Compute(const SplitParam<CPU> &param) const { void SplitKernel<CPU, float>::Compute(const SplitParam<CPU> &param) {
SplitCompute<float>(param); SplitCompute<float>(param);
} }
......
...@@ -26,7 +26,7 @@ bool TransposeKernel<CPU, float>::Init(TransposeParam<CPU> *param) { ...@@ -26,7 +26,7 @@ bool TransposeKernel<CPU, float>::Init(TransposeParam<CPU> *param) {
template <> template <>
void TransposeKernel<CPU, float>::Compute( void TransposeKernel<CPU, float>::Compute(
const TransposeParam<CPU> &param) const { const TransposeParam<CPU> &param) {
TransposeCompute<float>(param); TransposeCompute<float>(param);
} }
......
...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T> ...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T>
class BatchNormKernel class BatchNormKernel
: public framework::OpKernelBase<DeviceType, BatchNormParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, BatchNormParam<DeviceType>> {
public: public:
void Compute(const BatchNormParam<DeviceType> &param) const; void Compute(const BatchNormParam<DeviceType> &param);
bool Init(BatchNormParam<DeviceType> *param); bool Init(BatchNormParam<DeviceType> *param);
}; };
......
...@@ -29,7 +29,7 @@ class BilinearInterpKernel ...@@ -29,7 +29,7 @@ class BilinearInterpKernel
: public framework::OpKernelBase<DeviceType, : public framework::OpKernelBase<DeviceType,
BilinearInterpParam<DeviceType>> { BilinearInterpParam<DeviceType>> {
public: public:
void Compute(const BilinearInterpParam<DeviceType>& param) const; void Compute(const BilinearInterpParam<DeviceType>& param);
bool Init(BilinearInterpParam<DeviceType>* param); bool Init(BilinearInterpParam<DeviceType>* param);
}; };
} // namespace operators } // namespace operators
......
...@@ -29,7 +29,7 @@ template <typename DeviceType, typename T> ...@@ -29,7 +29,7 @@ template <typename DeviceType, typename T>
class BoxCoderKernel class BoxCoderKernel
: public framework::OpKernelBase<DeviceType, BoxCoderParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, BoxCoderParam<DeviceType>> {
public: public:
void Compute(const BoxCoderParam<DeviceType>& param) const; void Compute(const BoxCoderParam<DeviceType>& param);
bool Init(BoxCoderParam<DeviceType>* param); bool Init(BoxCoderParam<DeviceType>* param);
}; };
} // namespace operators } // namespace operators
......
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. ///* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
//
Licensed under the Apache License, Version 2.0 (the "License"); //Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. //you may not use this file except in compliance with the License.
You may obtain a copy of the License at //You may obtain a copy of the License at
//
http://www.apache.org/licenses/LICENSE-2.0 // http://www.apache.org/licenses/LICENSE-2.0
//
Unless required by applicable law or agreed to in writing, software //Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, //distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and //See the License for the specific language governing permissions and
limitations under the License. */ //limitations under the License. */
//
#ifdef CONV_OP //#ifdef CONV_OP
//
#include "operators/kernel/conv_kernel.h" //#include "operators/kernel/conv_kernel.h"
#include "operators/kernel/central-arm-func/conv_arm_func.h" //#include "operators/kernel/central-arm-func/conv_arm_func.h"
//
namespace paddle_mobile { //namespace paddle_mobile {
namespace operators { //namespace operators {
//
template <> //template <>
bool ConvKernel<GPU_CL, float>::Init(ConvParam<GPU_CL> *param) { //bool ConvKernel<GPU_CL, float>::Init(ConvParam<GPU_CL> *param) {
// this->cl_helper_.AddKernel("conv_3x3", "conv_kernel.cl");
return true; // return true;
} //}
//
template <> //template <>
void ConvKernel<GPU_CL, float>::Compute(const ConvParam<GPU_CL> &param) const { //void ConvKernel<GPU_CL, float>::Compute(const ConvParam<GPU_CL> &param) {
// auto kernel = this->cl_helper_.KernelAt(0);
} //
//
template class ConvKernel<GPU_CL, float>; //}
//
} // namespace operators //template class ConvKernel<GPU_CL, float>;
} // namespace paddle_mobile //
//} // namespace operators
#endif //} // namespace paddle_mobile
//
//#endif
...@@ -27,7 +27,7 @@ template <typename DeviceType, typename T> ...@@ -27,7 +27,7 @@ template <typename DeviceType, typename T>
class ConcatKernel class ConcatKernel
: public framework::OpKernelBase<DeviceType, ConcatParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, ConcatParam<DeviceType>> {
public: public:
void Compute(const ConcatParam<DeviceType> &param) const; void Compute(const ConcatParam<DeviceType> &param);
bool Init(ConcatParam<DeviceType> *param); bool Init(ConcatParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvAddAddPReluKernel class ConvAddAddPReluKernel
: public OpKernelBase<DeviceType, FusionConvAddAddPReluParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvAddAddPReluParam<DeviceType>> {
public: public:
void Compute(const FusionConvAddAddPReluParam<DeviceType> &param) const; void Compute(const FusionConvAddAddPReluParam<DeviceType> &param);
bool Init(FusionConvAddAddPReluParam<DeviceType> *param); bool Init(FusionConvAddAddPReluParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvAddBNKernel class ConvAddBNKernel
: public OpKernelBase<DeviceType, FusionConvAddBNParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvAddBNParam<DeviceType>> {
public: public:
void Compute(const FusionConvAddBNParam<DeviceType> &param) const; void Compute(const FusionConvAddBNParam<DeviceType> &param);
bool Init(FusionConvAddBNParam<DeviceType> *param); bool Init(FusionConvAddBNParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvAddBNReluKernel class ConvAddBNReluKernel
: public OpKernelBase<DeviceType, FusionConvAddBNReluParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvAddBNReluParam<DeviceType>> {
public: public:
void Compute(const FusionConvAddBNReluParam<DeviceType> &param) const; void Compute(const FusionConvAddBNReluParam<DeviceType> &param);
bool Init(FusionConvAddBNReluParam<DeviceType> *param); bool Init(FusionConvAddBNReluParam<DeviceType> *param);
}; };
......
...@@ -40,7 +40,7 @@ template <typename DeviceType, typename T> ...@@ -40,7 +40,7 @@ template <typename DeviceType, typename T>
class ConvAddKernel class ConvAddKernel
: public OpKernelBase<DeviceType, FusionConvAddParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvAddParam<DeviceType>> {
public: public:
void Compute(const FusionConvAddParam<DeviceType> &param) const; void Compute(const FusionConvAddParam<DeviceType> &param);
bool Init(FusionConvAddParam<DeviceType> *param); bool Init(FusionConvAddParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvAddPReluKernel class ConvAddPReluKernel
: public OpKernelBase<DeviceType, FusionConvAddPReluParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvAddPReluParam<DeviceType>> {
public: public:
void Compute(const FusionConvAddPReluParam<DeviceType> &param) const; void Compute(const FusionConvAddPReluParam<DeviceType> &param);
bool Init(FusionConvAddPReluParam<DeviceType> *param); bool Init(FusionConvAddPReluParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvAddReluKernel class ConvAddReluKernel
: public OpKernelBase<DeviceType, FusionConvAddReluParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvAddReluParam<DeviceType>> {
public: public:
void Compute(const FusionConvAddReluParam<DeviceType> &param) const; void Compute(const FusionConvAddReluParam<DeviceType> &param);
bool Init(FusionConvAddReluParam<DeviceType> *param); bool Init(FusionConvAddReluParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvBNAddReluKernel class ConvBNAddReluKernel
: public OpKernelBase<DeviceType, FusionConvBNAddReluParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvBNAddReluParam<DeviceType>> {
public: public:
void Compute(const FusionConvBNAddReluParam<DeviceType> &param) const; void Compute(const FusionConvBNAddReluParam<DeviceType> &param);
bool Init(FusionConvBNAddReluParam<DeviceType> *param); bool Init(FusionConvBNAddReluParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvBNKernel class ConvBNKernel
: public OpKernelBase<DeviceType, FusionConvBNParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvBNParam<DeviceType>> {
public: public:
void Compute(const FusionConvBNParam<DeviceType> &param) const; void Compute(const FusionConvBNParam<DeviceType> &param);
bool Init(FusionConvBNParam<DeviceType> *param); bool Init(FusionConvBNParam<DeviceType> *param);
}; };
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class ConvBNReluKernel class ConvBNReluKernel
: public OpKernelBase<DeviceType, FusionConvBNReluParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionConvBNReluParam<DeviceType>> {
public: public:
void Compute(const FusionConvBNReluParam<DeviceType> &param) const; void Compute(const FusionConvBNReluParam<DeviceType> &param);
bool Init(FusionConvBNReluParam<DeviceType> *param); bool Init(FusionConvBNReluParam<DeviceType> *param);
}; };
......
...@@ -31,7 +31,7 @@ using framework::OpKernelBase; ...@@ -31,7 +31,7 @@ using framework::OpKernelBase;
template <typename DeviceType, typename T> template <typename DeviceType, typename T>
class ConvKernel : public OpKernelBase<DeviceType, ConvParam<DeviceType>> { class ConvKernel : public OpKernelBase<DeviceType, ConvParam<DeviceType>> {
public: public:
void Compute(const ConvParam<DeviceType> &param) const; void Compute(const ConvParam<DeviceType> &param);
bool Init(ConvParam<DeviceType> *param); bool Init(ConvParam<DeviceType> *param);
}; };
......
...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T> ...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T>
class ConvTransposeKernel class ConvTransposeKernel
: public OpKernelBase<DeviceType, ConvTransposeParam<DeviceType>> { : public OpKernelBase<DeviceType, ConvTransposeParam<DeviceType>> {
public: public:
void Compute(const ConvTransposeParam<DeviceType> &param) const; void Compute(const ConvTransposeParam<DeviceType> &param);
bool Init(ConvTransposeParam<DeviceType> *param); bool Init(ConvTransposeParam<DeviceType> *param);
}; };
......
...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T> ...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T>
class CrfKernel class CrfKernel
: public framework::OpKernelBase<DeviceType, CrfParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, CrfParam<DeviceType>> {
public: public:
void Compute(const CrfParam<DeviceType>& param) const; void Compute(const CrfParam<DeviceType>& param);
bool Init(CrfParam<DeviceType>* param); bool Init(CrfParam<DeviceType>* param);
}; };
} // namespace operators } // namespace operators
......
...@@ -31,7 +31,7 @@ template <typename DeviceType, typename T> ...@@ -31,7 +31,7 @@ template <typename DeviceType, typename T>
class DepthwiseConvKernel class DepthwiseConvKernel
: public OpKernelBase<DeviceType, ConvParam<DeviceType>> { : public OpKernelBase<DeviceType, ConvParam<DeviceType>> {
public: public:
void Compute(const ConvParam<DeviceType> &param) const; void Compute(const ConvParam<DeviceType> &param);
bool Init(ConvParam<DeviceType> *param); bool Init(ConvParam<DeviceType> *param);
}; };
} // namespace operators } // namespace operators
......
...@@ -26,7 +26,7 @@ template <typename DeviceType, typename T> ...@@ -26,7 +26,7 @@ template <typename DeviceType, typename T>
class DropoutKernel class DropoutKernel
: public framework::OpKernelBase<DeviceType, DropoutParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, DropoutParam<DeviceType>> {
public: public:
void Compute(const DropoutParam<DeviceType>& param) const; void Compute(const DropoutParam<DeviceType>& param);
bool Init(DropoutParam<DeviceType>* para); bool Init(DropoutParam<DeviceType>* para);
}; };
} // namespace operators } // namespace operators
......
...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T> ...@@ -35,7 +35,7 @@ template <typename DeviceType, typename T>
class DWConvBNReluKernel class DWConvBNReluKernel
: public OpKernelBase<DeviceType, FusionDWConvBNReluParam<DeviceType>> { : public OpKernelBase<DeviceType, FusionDWConvBNReluParam<DeviceType>> {
public: public:
void Compute(const FusionDWConvBNReluParam<DeviceType> &param) const; void Compute(const FusionDWConvBNReluParam<DeviceType> &param);
bool Init(FusionDWConvBNReluParam<DeviceType> *param); bool Init(FusionDWConvBNReluParam<DeviceType> *param);
}; };
......
...@@ -30,7 +30,7 @@ class ElementwiseAddKernel ...@@ -30,7 +30,7 @@ class ElementwiseAddKernel
: public framework::OpKernelBase<DeviceType, : public framework::OpKernelBase<DeviceType,
ElementwiseAddParam<DeviceType>> { ElementwiseAddParam<DeviceType>> {
public: public:
void Compute(const ElementwiseAddParam<DeviceType> &param) const; void Compute(const ElementwiseAddParam<DeviceType> &param);
bool Init(ElementwiseAddParam<DeviceType> *param); bool Init(ElementwiseAddParam<DeviceType> *param);
}; };
} // namespace operators } // namespace operators
......
...@@ -29,7 +29,7 @@ class ElementwiseAddReluKernel ...@@ -29,7 +29,7 @@ class ElementwiseAddReluKernel
: public framework::OpKernelBase<DeviceType, : public framework::OpKernelBase<DeviceType,
ElementwiseAddReluParam<DeviceType>> { ElementwiseAddReluParam<DeviceType>> {
public: public:
void Compute(const ElementwiseAddReluParam<DeviceType> &param) const; void Compute(const ElementwiseAddReluParam<DeviceType> &param);
bool Init(ElementwiseAddReluParam<DeviceType> *param); bool Init(ElementwiseAddReluParam<DeviceType> *param);
}; };
} // namespace operators } // namespace operators
......
...@@ -28,7 +28,7 @@ class FusionFcReluKernel ...@@ -28,7 +28,7 @@ class FusionFcReluKernel
: public framework::OpKernelBase<DeviceType, : public framework::OpKernelBase<DeviceType,
FusionFcReluParam<DeviceType>> { FusionFcReluParam<DeviceType>> {
public: public:
void Compute(const FusionFcReluParam<DeviceType>& param) const; void Compute(const FusionFcReluParam<DeviceType>& param);
bool Init(FusionFcReluParam<DeviceType>* param); bool Init(FusionFcReluParam<DeviceType>* param);
}; };
} // namespace operators } // namespace operators
......
...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T> ...@@ -28,7 +28,7 @@ template <typename DeviceType, typename T>
class FlattenKernel class FlattenKernel
: public framework::OpKernelBase<DeviceType, FlattenParam<DeviceType>> { : public framework::OpKernelBase<DeviceType, FlattenParam<DeviceType>> {
public: public:
void Compute(const FlattenParam<DeviceType>& param) const; void Compute(const FlattenParam<DeviceType>& param);
bool Init(FlattenParam<DeviceType>* param); bool Init(FlattenParam<DeviceType>* param);
}; };
} // namespace operators } // namespace operators
......
...@@ -57,7 +57,7 @@ bool ConcatKernel<FPGA, float>::Init(ConcatParam<FPGA> *param) { ...@@ -57,7 +57,7 @@ bool ConcatKernel<FPGA, float>::Init(ConcatParam<FPGA> *param) {
} }
template <> template <>
void ConcatKernel<FPGA, float>::Compute(const ConcatParam<FPGA> &param) const { void ConcatKernel<FPGA, float>::Compute(const ConcatParam<FPGA> &param) {
ComputeFPGAConcat(param.FpgaArgs()); ComputeFPGAConcat(param.FpgaArgs());
} }
template class ConcatKernel<FPGA, float>; template class ConcatKernel<FPGA, float>;
......
...@@ -77,7 +77,7 @@ bool ConvAddBNKernel<FPGA, float>::Init(FusionConvAddBNParam<FPGA> *param) { ...@@ -77,7 +77,7 @@ bool ConvAddBNKernel<FPGA, float>::Init(FusionConvAddBNParam<FPGA> *param) {
template <> template <>
void ConvAddBNKernel<FPGA, float>::Compute( void ConvAddBNKernel<FPGA, float>::Compute(
const FusionConvAddBNParam<FPGA> &param) const { const FusionConvAddBNParam<FPGA> &param) {
fpga::ComputeFpgaConv(param.FpgaArgs()); fpga::ComputeFpgaConv(param.FpgaArgs());
} }
......
...@@ -74,7 +74,7 @@ bool ConvAddBNReluKernel<FPGA, float>::Init( ...@@ -74,7 +74,7 @@ bool ConvAddBNReluKernel<FPGA, float>::Init(
template <> template <>
void ConvAddBNReluKernel<FPGA, float>::Compute( void ConvAddBNReluKernel<FPGA, float>::Compute(
const FusionConvAddBNReluParam<FPGA> &param) const { const FusionConvAddBNReluParam<FPGA> &param) {
fpga::ComputeFpgaConv(param.FpgaArgs()); fpga::ComputeFpgaConv(param.FpgaArgs());
} }
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册