diff --git a/examples/cpp_classification/classification_profiling_schedule.cpp b/examples/cpp_classification/classification_profiling_schedule.cpp index 91fff5f7..11728a6e 100644 --- a/examples/cpp_classification/classification_profiling_schedule.cpp +++ b/examples/cpp_classification/classification_profiling_schedule.cpp @@ -89,7 +89,9 @@ Classifier::Classifier(const string& model_file, Caffe::set_mode(Caffe::GPU); #endif +#ifdef USE_ACL AclEnableSchedule(); +#endif /* Load the network. */ net_.reset(new Net(model_file, TEST)); net_->CopyTrainedLayersFrom(trained_file); diff --git a/include/caffe/layer.hpp b/include/caffe/layer.hpp index 4ffeb68c..254470c0 100644 --- a/include/caffe/layer.hpp +++ b/include/caffe/layer.hpp @@ -22,7 +22,9 @@ extern unsigned int acl_log_flags; namespace boost { class mutex; } namespace caffe { +#ifdef USE_ACL bool AclEnableSchedule(int enable=1); +#endif #ifdef USE_PROFILING class logtime_util { diff --git a/src/caffe/common.cpp b/src/caffe/common.cpp index dd800b04..5080109a 100644 --- a/src/caffe/common.cpp +++ b/src/caffe/common.cpp @@ -53,7 +53,10 @@ void GlobalInit(int* pargc, char*** pargv) { #ifdef CPU_ONLY // CPU-only Caffe. Caffe::Caffe() - : random_generator_(), mode_(Caffe::CPU),use_mali_gpu_(false), + : random_generator_(), mode_(Caffe::CPU), +#ifdef USE_ACL + use_mali_gpu_(false), +#endif solver_count_(1), solver_rank_(0), multiprocess_(false) { }