Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure (acl_lrn_layer.o) #1

Closed
kmonachopoulos opened this issue Jun 29, 2017 · 3 comments
Closed

Build failure (acl_lrn_layer.o) #1

kmonachopoulos opened this issue Jun 29, 2017 · 3 comments

Comments

@kmonachopoulos
Copy link

kmonachopoulos commented Jun 29, 2017

Hello,
i am trying to deploy caffe on Firefly RK3288 following the steps from "release_notes" that you provide. I managed to install ARM ComputeLibrary successfully, but when I am trying to build caffe I am getting the following error:

CXX src/caffe/layers/acl_lrn_layer.cpp
src/caffe/layers/acl_lrn_layer.cpp: In member function 'virtual void caffe::ACLLRNLayer<Dtype>::SetupACLLayer(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)':
src/caffe/layers/acl_lrn_layer.cpp:31:45: error: 'IN_MAP' is not a member of 'arm_compute::NormType'
        norm_info=new NormalizationLayerInfo(NormType::IN_MAP, this->size_, this->alpha_, this->beta_, this->k_);
                                             ^~~~~~~~
Makefile:632: recipe for target '.build_release/src/caffe/layers/acl_lrn_layer.o' failed
make: *** [.build_release/src/caffe/layers/acl_lrn_layer.o] Error 1

The example that you are providing concerns firefly 3399 board and not the firefly 3288 that i have, so is there any extra dependencies that I am missing?

P.S Inside the enumerator class NormType there is not a IN_MAP member.

enum class NormType
{
    IN_MAP_1D, /**< Normalization applied within the same map in 1D region */
    IN_MAP_2D, /**< Normalization applied within the same map in 2D region */
    CROSS_MAP  /**< Normalization applied cross maps */
};

Solved : Using Version ComputeLibrary : v17.05 solves the problem (I should read the manual carefully). I just saw that recently it has been a change in the recently ComputeLibrary newest version.

Thanks

@joey2014
Copy link

joey2014 commented Jun 30, 2017

kmonachopoulos, ARM new ACL changed the name IN_MAP to IN_MAP_1D/2D which causes the the code can't pass compile . The issues can be fixed as below:
diff --git a/src/caffe/layers/acl_lrn_layer.cpp b/src/caffe/layers/acl_lrn_layer.cpp
index 9c03cad..6e5c7bc 100644
--- a/src/caffe/layers/acl_lrn_layer.cpp
+++ b/src/caffe/layers/acl_lrn_layer.cpp
@@ -5,6 +5,7 @@

namespace caffe {

+const NormType IN_MAP=(arm_compute::NormType)0;
template
void ACLLRNLayer::LayerSetUp(const vector<Blob>& bottom,
const vector<Blob
>& top) {
@@ -28,7 +29,7 @@ void ACLLRNLayer::SetupACLLayer(const vector<Blob*>& bottom,
//this->force_bypass_acl_path_=false;
NormalizationLayerInfo *norm_info;
if(this->layer_param_.lrn_param().norm_region() == LRNParameter_NormRegion_WITHIN_CHANNEL)
- norm_info=new NormalizationLayerInfo(NormType::IN_MAP, this->size_, this->alpha_, this->beta_, this->k_);
+norm_info=new NormalizationLayerInfo(IN_MAP, this->size_, this->alpha_, this->beta_, this->k_);
else
norm_info=new NormalizationLayerInfo(NormType::CROSS_MAP, this->size_, this->alpha_, this->beta_, this->k_);

@openailab-sh
Copy link
Contributor

Thanks, kmonachopoulos, the root cause is just like what joey2014 said. To fix the issue with the new ACL version 17.06, you can check out the new code from master

@honggui
Copy link
Contributor

honggui commented Jul 1, 2017

I closed the issue due to it's fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants