#ifdef USE_ACL #include #include #include "caffe/layers/acl_bnll_layer.hpp" namespace caffe { template void ACLBNLLLayer::LayerSetUp( const vector*>& bottom, const vector*>& top) { BNLLLayer::LayerSetUp(bottom, top); ACLBaseActivationLayer::LayerSetUp(bottom, top); this->force_bypass_acl_path_= bypass_acl_class_layer & FLAGS_ENABLE_ACL_BNLL; } template void ACLBNLLLayer::SetupACLLayer(const vector*>& bottom, const vector*>& top, ActivationLayerInfo::ActivationFunction type){ ACLBaseActivationLayer::SetupACLLayer(bottom, top,ActivationLayerInfo::ActivationFunction::SOFT_RELU); } template void ACLBNLLLayer::Reshape( const vector*>& bottom, const vector*>& top) { BNLLLayer::Reshape(bottom, top); ACLBaseActivationLayer::Reshape(bottom, top); } template void ACLBNLLLayer::Forward_cpu(const vector*>& bottom, const vector*>& top) { #ifdef USE_PROFILING logtime_util log_time(ACL_BNLL_INFO); #endif //USE_PROFILING if (this->force_bypass_acl_path_) { BNLLLayer::Forward_cpu(bottom,top); return; } ACLBaseActivationLayer::Forward_cpu(bottom,top); } template void ACLBNLLLayer::Forward_gpu(const vector*>& bottom, const vector*>& top) { #ifdef USE_PROFILING logtime_util log_time(ACL_BNLL_INFO); #endif //USE_PROFILING if (this->force_bypass_acl_path_) { BNLLLayer::Forward_cpu(bottom,top); return; } ACLBaseActivationLayer::Forward_gpu(bottom,top); } template ACLBNLLLayer::~ACLBNLLLayer() { } INSTANTIATE_CLASS(ACLBNLLLayer); } // namespace caffe #endif // USE_ACL