From f28625a474bc4c095f878c48267a85c89051023d Mon Sep 17 00:00:00 2001 From: chonwhite Date: Mon, 18 May 2020 17:36:13 +0800 Subject: [PATCH] resnet works --- lite/backends/fpga/KD/debugger.hpp | 1 - lite/kernels/fpga/elementwise_compute.cc | 2 -- lite/kernels/fpga/reshape_compute.cc | 15 ++++++--------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lite/backends/fpga/KD/debugger.hpp b/lite/backends/fpga/KD/debugger.hpp index fa069688b7..a3271ae50e 100755 --- a/lite/backends/fpga/KD/debugger.hpp +++ b/lite/backends/fpga/KD/debugger.hpp @@ -73,7 +73,6 @@ class Debugger { // op_config["nms"] = true; // op_config["pb_boxes"] = true; // op_config["pb_variances"] = true; - // op_config["softmax"] = true; } }; diff --git a/lite/kernels/fpga/elementwise_compute.cc b/lite/kernels/fpga/elementwise_compute.cc index 1ef6d19e83..39780d8227 100755 --- a/lite/kernels/fpga/elementwise_compute.cc +++ b/lite/kernels/fpga/elementwise_compute.cc @@ -40,7 +40,6 @@ void ElementwiseAddCompute::PrepareForRun() { pe_.apply(); } void ElementwiseAddCompute::Run() { - usleep(50 * 100 * 1000); pe_.dispatch(); #ifdef FPGA_PRINT_TENSOR zynqmp::ElementwiseAddParam& ew_param = pe_.param(); @@ -63,7 +62,6 @@ void ElementwiseAddActivationCompute::PrepareForRun() { pe_.apply(); } void ElementwiseAddActivationCompute::Run() { - usleep(500 * 100 * 1000); pe_.dispatch(); #ifdef FPGA_PRINT_TENSOR zynqmp::ElementwiseAddParam& ew_param = pe_.param(); diff --git a/lite/kernels/fpga/reshape_compute.cc b/lite/kernels/fpga/reshape_compute.cc index f72f18892c..a98bbac6d7 100644 --- a/lite/kernels/fpga/reshape_compute.cc +++ b/lite/kernels/fpga/reshape_compute.cc @@ -41,15 +41,12 @@ void ReshapeCompute::Run() { output_dims = lite::operators::ValidateShape(shape, x_dims); output->Resize(output_dims); } - if (inplace) { - output->ShareDataWith(*x); - } else { - output->CopyDataFrom(*x); - } - - param.x->ZynqTensor()->saveToFile("reshape_in", true); - output->ZynqTensor()->saveToFile("reshape_out", true); - + // if (inplace) { + // output->ShareDataWith(*x); + // } else { + // output->CopyDataFrom(*x); + // } + output->ZynqTensor()->copyFrom(x->ZynqTensor()); output->Resize(output_dims); } -- GitLab