summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2018-09-04 11:23:06 +0900
committerInki Dae <inki.dae@samsung.com>2018-12-07 13:52:33 +0900
commit7fd07b42516bc92e334a865f3cdb999c149679f8 (patch)
treedb4214acf85e23686ad27d4e3e5866316d41fdbe
parentb85b8637c52f1c89ab8d4c7e6d9ba2e48d0bd9e8 (diff)
downloadcaffeonacl-tizen_5.5_mobile_hotfix.tar.gz
caffeonacl-tizen_5.5_mobile_hotfix.tar.bz2
caffeonacl-tizen_5.5_mobile_hotfix.zip
This patch fixes a build error with armcl v18.08 by correcting a parameter type of configure function of FullyConnectedLayer. Change-Id: I1755b1bee083f099ae7cf0095e4fadc60cb1a690 Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--include/caffe/acl_operator.hpp3
-rw-r--r--src/caffe/layers/acl_inner_product_layer.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/include/caffe/acl_operator.hpp b/include/caffe/acl_operator.hpp
index 90051054..5759f4dc 100644
--- a/include/caffe/acl_operator.hpp
+++ b/include/caffe/acl_operator.hpp
@@ -620,11 +620,12 @@ bool instantiate_op_lc(ACLOperator* acl_op,std::vector<std::unique_ptr<arm_compu
func.push_back(instantiate_op_func<arm_compute::CLLocallyConnectedLayer,arm_compute::ICLTensor,arm_compute::NELocallyConnectedLayer,arm_compute::ITensor, arm_compute::PadStrideInfo>(input, weights,biases,output,info, hint));
return true;
}
+
template <typename OperatorInfo>
bool instantiate_op_fc(ACLOperator* acl_op,std::vector<std::unique_ptr<arm_compute::IFunction>> & func,std::unique_ptr<ACLTensor> & input,std::unique_ptr<ACLTensor> & output,TargetHint hint, const OperatorInfo &info){
std::unique_ptr<ACLTensor> & weights=acl_op->weights();
std::unique_ptr<ACLTensor> & biases=acl_op->biases();
- func.push_back(instantiate_op_func<arm_compute::CLFullyConnectedLayer,arm_compute::ICLTensor,arm_compute::NEFullyConnectedLayer,arm_compute::ITensor, bool>(input, weights,biases,output,info, hint));
+ func.push_back(instantiate_op_func<arm_compute::CLFullyConnectedLayer,arm_compute::ICLTensor,arm_compute::NEFullyConnectedLayer,arm_compute::ITensor, arm_compute::FullyConnectedLayerInfo>(input, weights,biases,output,info, hint));
return true;
}
template <typename Dtype>
diff --git a/src/caffe/layers/acl_inner_product_layer.cpp b/src/caffe/layers/acl_inner_product_layer.cpp
index bb819fcc..c7cc0723 100644
--- a/src/caffe/layers/acl_inner_product_layer.cpp
+++ b/src/caffe/layers/acl_inner_product_layer.cpp
@@ -32,12 +32,16 @@ void ACLInnerProductLayer<Dtype>::SetupACLOperator(const vector<Blob<Dtype>*>& b
}else{
new_tensor(weights(),weights_shape,GetDataPtr(this,this->blobs_[0].get()));
}
+
+ arm_compute::FullyConnectedLayerInfo fc_info = arm_compute::FullyConnectedLayerInfo();
+ fc_info.transpose_weights = transpose;
+
if (this->bias_term_) {
new_tensor(biases(),biases_shape,GetDataPtr(this,this->blobs_[1].get()));
}
new_tensor(input(),input_shape,InputdataPtr(this,bottom));
new_tensor(output(),output_shape,OutputdataPtr(this,top));
- acl_configure(fc,this,transpose);
+ acl_configure(fc,this,fc_info);
}
template <typename Dtype>
void ACLInnerProductLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,