Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[onert/test] Apply strict build to benchmark library #14471

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/libs/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ file(GLOB_RECURSE SOURCES "src/*.cpp")
add_library(nnfw_lib_benchmark STATIC ${SOURCES})
target_include_directories(nnfw_lib_benchmark PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(nnfw_lib_benchmark PRIVATE ${LIB_PTHREAD} nnfw_lib_misc)
target_link_libraries(nnfw_lib_benchmark PRIVATE nnfw_common)
2 changes: 1 addition & 1 deletion tests/libs/benchmark/include/benchmark/MemoryPoller.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class MemoryPoller
std::mutex _mutex_started;
std::condition_variable _cond_var_started;

bool _term;
bool _run;
bool _term;
Comment on lines -73 to +74
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does strict build also catch the order of variable ..?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Constructor's initialization order should be same with order of variable.

bool _gpu_poll;
std::string _process_name;
};
Expand Down
2 changes: 1 addition & 1 deletion tests/libs/benchmark/src/MemoryInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const std::string proc_status_path("/proc/self/status");
const std::string gpu_memory_path("/sys/kernel/debug/mali0/gpu_memory");
const std::string proc_smaps_path("/proc/self/smaps");

bool isStrNumber(const std::string &s)
[[maybe_unused]] bool isStrNumber(const std::string &s)
ragmani marked this conversation as resolved.
Show resolved Hide resolved
{
return !s.empty() &&
std::find_if(s.begin(), s.end(), [](char c) { return !std::isdigit(c); }) == s.end();
Expand Down