diff --git a/src/fpga/api/fpga_api.cpp b/src/fpga/api.cpp similarity index 98% rename from src/fpga/api/fpga_api.cpp rename to src/fpga/api.cpp index 1a0fb3839e753d77aa13e24b900be893e7ab52c9..477d241e93fc05a7197f84b495f0faf0b3badbef 100644 --- a/src/fpga/api/fpga_api.cpp +++ b/src/fpga/api.cpp @@ -27,7 +27,7 @@ limitations under the License. */ #include #include -#include "fpga/api/fpga_api.h" +#include "api.h" namespace paddle_mobile { namespace fpga { diff --git a/src/fpga/api/fpga_api.h b/src/fpga/api.h similarity index 100% rename from src/fpga/api/fpga_api.h rename to src/fpga/api.h diff --git a/src/fpga/fpga_quantilization.cpp b/src/fpga/quantization.cpp similarity index 96% rename from src/fpga/fpga_quantilization.cpp rename to src/fpga/quantization.cpp index e8faf792b9b3050ff2d5b82978154004c1d78bfa..560a1aa0059cbaffe36dd570e3f2f38ab8943379 100644 --- a/src/fpga/fpga_quantilization.cpp +++ b/src/fpga/quantization.cpp @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include "fpga/fpga_quantilization.h" +#include "fpga/quantization.h" #include namespace paddle_mobile { @@ -47,7 +47,7 @@ static Dtype find_max(Dtype* data, int64_t num) { } // template -void quantify_filter(framework::Tensor* filter) { +void quantize_filter(framework::Tensor* filter) { DLOG << "quantilize_filter........"; float scale = 0; diff --git a/src/fpga/fpga_quantilization.h b/src/fpga/quantization.h similarity index 95% rename from src/fpga/fpga_quantilization.h rename to src/fpga/quantization.h index 04cb2ce7c0a6df0df2c49431e49d2c5e73d44209..0d6c2405fccd814f73d44eef20b6735dc0ad0eab 100644 --- a/src/fpga/fpga_quantilization.h +++ b/src/fpga/quantization.h @@ -24,7 +24,7 @@ template static void chw_to_hwc(Dtype* data_in, Dtype* data_out, int64_t num, int64_t channel, int64_t height, int64_t width); -void quantify_filter(framework::Tensor* filter); +void quantize_filter(framework::Tensor* filter); } // namespace fpga } // namespace paddle_mobile diff --git a/src/memory/t_malloc.cpp b/src/memory/t_malloc.cpp index 8902543347b2db7caee7126b2a28fa460ca741db..09bff80af723161dfaf31d58f3ec24528ef1ccc4 100644 --- a/src/memory/t_malloc.cpp +++ b/src/memory/t_malloc.cpp @@ -18,7 +18,7 @@ limitations under the License. */ #ifdef PADDLE_MOBILE_FPGA -#include "fpga/api/fpga_api.h" +#include "fpga/api.h" #endif diff --git a/src/operators/kernel/fpga/conv_add_bn_kernel.cpp b/src/operators/kernel/fpga/conv_add_bn_kernel.cpp index e624104acf0561470e8aac827c233d0d2d1d9f66..c2a6d29ac15296067a6bd6691b619d8cf6ff42bb 100644 --- a/src/operators/kernel/fpga/conv_add_bn_kernel.cpp +++ b/src/operators/kernel/fpga/conv_add_bn_kernel.cpp @@ -15,8 +15,8 @@ limitations under the License. */ #ifdef FUSION_CONVADDBN_OP #include "operators/kernel/conv_add_bn_kernel.h" -#include "fpga/api/fpga_api.h" -#include "fpga/fpga_quantilization.h" +#include "fpga/api.h" +#include "fpga/quantization.h" namespace paddle_mobile { namespace operators { @@ -60,7 +60,7 @@ bool ConvAddBNKernel::Init(FusionConvAddBNParam *param) { param->SetNewScale(new_scale); param->SetNewBias(new_bias); - fpga::quantify_filter(filter); + fpga::quantize_filter(filter); auto filter_ptr = filter->data(); fpga::ConvArgs convArgs; diff --git a/src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp b/src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp index d6fee838390f0efe38a539c3a9e8fc09d07a68d0..a6018df987207c92b0e50fa2345367523632ef1e 100644 --- a/src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp +++ b/src/operators/kernel/fpga/conv_add_bn_relu_kernel.cpp @@ -15,7 +15,7 @@ limitations under the License. */ #ifdef FUSION_CONVADDBNRELU_OP #include "operators/kernel/conv_add_bn_relu_kernel.h" -#include "fpga/fpga_quantilization.h" +#include "fpga/quantization.h" namespace paddle_mobile { namespace operators { @@ -56,7 +56,7 @@ bool ConvAddBNReluKernel::Init(FusionConvAddBNReluParam *param) { } param->SetNewScale(new_scale); param->SetNewBias(new_bias); - fpga::quantify_filter(filter); + fpga::quantize_filter(filter); auto filter_ptr = filter->data(); fpga::ConvArgs convArgs; diff --git a/src/operators/kernel/fpga/conv_add_relu_kernel.cpp b/src/operators/kernel/fpga/conv_add_relu_kernel.cpp index fd6379d8f3021d9d859d81f75aaba9ad761dd6ca..c5383bf1e9ac6e24a66094be69516fa56e973613 100644 --- a/src/operators/kernel/fpga/conv_add_relu_kernel.cpp +++ b/src/operators/kernel/fpga/conv_add_relu_kernel.cpp @@ -15,7 +15,7 @@ limitations under the License. */ #ifdef FUSION_CONVADDRELU_OP #include "operators/kernel/conv_add_relu_kernel.h" -#include "fpga/fpga_quantilization.h" +#include "fpga/quantization.h" namespace paddle_mobile { namespace operators { @@ -40,7 +40,7 @@ bool ConvAddReluKernel::Init(FusionConvAddReluParam *param) { bs_ptr[i * 2 + 1] = bias_ptr[i]; } - fpga::quantify_filter(filter); + fpga::quantize_filter(filter); auto filter_ptr = filter->data(); fpga::ConvArgs convArgs; diff --git a/src/operators/kernel/fpga/conv_bn_kernel.cpp b/src/operators/kernel/fpga/conv_bn_kernel.cpp index 559b948b7b268181dcf75a4eaa40cfd9c78ef0d6..ee66c951a19a06be77bdbadbc425921db6af64fb 100644 --- a/src/operators/kernel/fpga/conv_bn_kernel.cpp +++ b/src/operators/kernel/fpga/conv_bn_kernel.cpp @@ -15,8 +15,8 @@ limitations under the License. */ #ifdef FUSION_CONVBN_OP #include "operators/kernel/conv_bn_kernel.h" -#include "fpga/api/fpga_api.h" -#include "fpga/fpga_quantilization.h" +#include "fpga/api.h" +#include "fpga/quantization.h" namespace paddle_mobile { namespace operators { @@ -55,7 +55,7 @@ bool ConvBNKernel::Init(FusionConvBNParam *param) { } param->SetNewScale(new_scale); param->SetNewBias(new_bias); - fpga::quantify_filter(filter); + fpga::quantize_filter(filter); auto filter_ptr = filter->data(); fpga::ConvArgs convArgs; diff --git a/src/operators/kernel/fpga/conv_bn_relu_kernel.cpp b/src/operators/kernel/fpga/conv_bn_relu_kernel.cpp index cfdc85b091017aebaf99d806e6e9104cbcbe05bd..f062cdce08790e47f4f5e2a1485412278bbb8bf9 100644 --- a/src/operators/kernel/fpga/conv_bn_relu_kernel.cpp +++ b/src/operators/kernel/fpga/conv_bn_relu_kernel.cpp @@ -15,7 +15,7 @@ limitations under the License. */ #ifdef FUSION_CONVBNRELU_OP #include "operators/kernel/conv_bn_relu_kernel.h" -#include "fpga/fpga_quantilization.h" +#include "fpga/quantization.h" namespace paddle_mobile { namespace operators { @@ -52,7 +52,7 @@ bool ConvBNReluKernel::Init(FusionConvBNReluParam *param) { } param->SetNewScale(new_scale); param->SetNewBias(new_bias); - fpga::quantify_filter(filter); + fpga::quantize_filter(filter); auto filter_ptr = filter->data(); fpga::ConvArgs convArgs; diff --git a/src/operators/kernel/fpga/fc_relu_kernel.cpp b/src/operators/kernel/fpga/fc_relu_kernel.cpp index d3683d321c5b31d6e6b3ff96ef8414560fc7ca49..499ced8d7438cc5f2bdaac79906546577200b47b 100644 --- a/src/operators/kernel/fpga/fc_relu_kernel.cpp +++ b/src/operators/kernel/fpga/fc_relu_kernel.cpp @@ -13,8 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. */ #ifdef FUSION_FCRELU_OP #include "operators/kernel/fc_relu_kernel.h" -#include "fpga/api/fpga_api.h" -#include "fpga/fpga_quantilization.h" + +#include "fpga/api.h" +#include "fpga/quantization.h" namespace paddle_mobile { namespace operators { @@ -39,7 +40,7 @@ bool FusionFcReluKernel::Init(FusionFcReluParam *param) { bs_ptr[i * 2 + 1] = input_z_ptr[i]; } - fpga::quantify_filter(input_y); + fpga::quantize_filter(input_y); auto input_y_ptr = input_y->data(); fpga::ConvArgs convArgs; diff --git a/src/operators/kernel/fpga/fusion_fc_kernel.cpp b/src/operators/kernel/fpga/fusion_fc_kernel.cpp index f0bc5f4a1767b99005725a17ca905d45a8ca5785..e269bcb5a3b7f595d13bc0b76c089d480a2ec7a4 100644 --- a/src/operators/kernel/fpga/fusion_fc_kernel.cpp +++ b/src/operators/kernel/fpga/fusion_fc_kernel.cpp @@ -14,7 +14,7 @@ limitations under the License. */ #ifdef FUSION_FC_OP #include "operators/kernel/fusion_fc_kernel.h" -#include "fpga/fpga_quantilization.h" +#include "fpga/quantization.h" namespace paddle_mobile { namespace operators { @@ -39,7 +39,7 @@ bool FusionFcKernel::Init(FusionFcParam *param) { bs_ptr[i * 2 + 1] = input_z_ptr[i]; } - fpga::quantify_filter(input_y); + fpga::quantize_filter(input_y); auto input_y_ptr = input_y->data(); fpga::ConvArgs convArgs; diff --git a/src/operators/kernel/fpga/softmax_kernel.cpp b/src/operators/kernel/fpga/softmax_kernel.cpp index 95bcb28f9c30481bd234d83ab44b415d59388475..6424de8afe705e13534a3452fc04890c0f750b9f 100644 --- a/src/operators/kernel/fpga/softmax_kernel.cpp +++ b/src/operators/kernel/fpga/softmax_kernel.cpp @@ -17,7 +17,7 @@ limitations under the License. */ #include "../softmax_kernel.h" #include "../central-arm-func/softmax_arm_func.h" #include "common/types.h" -#include "fpga/api/fpga_api.h" +#include "fpga/api.h" #include "operators/math/softmax.h" namespace paddle_mobile { namespace operators { diff --git a/src/operators/op_param.h b/src/operators/op_param.h index c39d9657bc50c6dd708f0cd9fd5573642d417f21..1ed5b4c8a8d3666236dadacb6d92f66f9e74889a 100644 --- a/src/operators/op_param.h +++ b/src/operators/op_param.h @@ -23,7 +23,7 @@ limitations under the License. */ #include "framework/tensor.h" #include "framework/variable.h" #ifdef PADDLE_MOBILE_FPGA -#include "fpga/api/fpga_api.h" +#include "fpga/api.h" #endif namespace paddle_mobile {