Cannot compile android-nn-driver 21.08
justeph opened this issue · 0 comments
justeph commented
Hi,
I am not able to compile android-nn-driver 21.08, here is the error I get:
ArmnnPreparedModel_1_2.cpp:722:31: error: no matching function for call to 'MicrosecondsDuration'
timing.timeOnDevice = MicrosecondsDuration(timeTaken.second, timeTaken.first);
^~~~~~~~~~~~~~~~~~~~
ArmnnPreparedModel_1_2.cpp:38:15: note: candidate function not viable: no known conversion from 'time_point<std::chrono::system_clock, [...]>' to 'time_point<std::chrono::steady_clock, [...]>' for 1st argument
unsigned long MicrosecondsDuration(TimePoint endPoint, TimePoint startPoint)
At line 700 we can see that timeTaken
is of type armnn::InferenceTimingPair
which is defined such as:
using HighResolutionClock = std::chrono::high_resolution_clock::time_point;
using InferenceTimingPair = std::pair<HighResolutionClock, HighResolutionClock>;
inside armnn v21.08
while timepoint is defined as
using TimePoint = std::chrono::steady_clock::time_point;
inside ArmnnPreparedModel_1_2.cpp line 31
I am not a c++ expert, so maybe there is a magical option I can use to make this work? I am cross compiling using clang
I can work an a patch if needed.
Thanks