Skip to content

Commit

Permalink
Fix undefined AllowFp16 in Android 27
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 23, 2019
1 parent f2fd69a commit c7eec9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dnnlibrary/src/ModelBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,10 +938,10 @@ ModelBuilder &ModelBuilder::AddOutput(const std::string &name) {
return *this;
}

#if __ANDROID_API__ >= __ANDROID_API_P__
ModelBuilder &ModelBuilder::AllowFp16(const bool allowed) {
#if __ANDROID_API__ >= __ANDROID_API_P__
ANeuralNetworksModel_relaxComputationFloat32toFloat16(dnn_model_->model_,
allowed);
#endif
return *this;
}
#endif

0 comments on commit c7eec9e

Please sign in to comment.