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

Treat deprecation warnings as errors and fix deprecation warnings in replay benchmark #1728

Merged
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
7 changes: 3 additions & 4 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2018-2020, NVIDIA CORPORATION.
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -42,9 +42,8 @@ function(ConfigureBench BENCH_NAME)
target_compile_definitions(${BENCH_NAME} PUBLIC CUDA_API_PER_THREAD_DEFAULT_STREAM)
endif()

target_compile_options(
${BENCH_NAME} PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall -Werror
-Wno-error=deprecated-declarations -Wno-unknown-pragmas>)
target_compile_options(${BENCH_NAME} PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall -Werror
-Wno-unknown-pragmas>)
if(DISABLE_DEPRECATION_WARNING)
target_compile_options(
${BENCH_NAME} PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-Wno-deprecated-declarations>)
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/replay/replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ struct replay_benchmark {
void SetUp(const ::benchmark::State& state)
{
if (state.thread_index() == 0) {
rmm::logger().log(spdlog::level::info, "------ Start of Benchmark -----");
RMM_LOG_INFO("------ Start of Benchmark -----");
mr_ = factory_(simulated_size_);
}
}
Expand All @@ -181,7 +181,7 @@ struct replay_benchmark {
void TearDown(const ::benchmark::State& state)
{
if (state.thread_index() == 0) {
rmm::logger().log(spdlog::level::info, "------ End of Benchmark -----");
RMM_LOG_INFO("------ End of Benchmark -----");
// clean up any leaked allocations
std::size_t total_leaked{0};
std::size_t num_leaked{0};
Expand Down Expand Up @@ -402,7 +402,7 @@ int main(int argc, char** argv)
auto const num_threads = per_thread_events.size();

// Uncomment to enable / change default log level
// rmm::logger().set_level(spdlog::level::trace);
// rmm::detail::logger().set_level(spdlog::level::trace);

if (args.count("resource") > 0) {
std::string mr_name = args["resource"].as<std::string>();
Expand Down
3 changes: 1 addition & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ function(ConfigureTestInternal TEST_NAME)
CUDA_STANDARD_REQUIRED ON)
target_compile_definitions(${TEST_NAME}
PUBLIC "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${RMM_LOGGING_LEVEL}")
target_compile_options(${TEST_NAME} PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall -Werror
-Wno-error=deprecated-declarations>)
target_compile_options(${TEST_NAME} PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall -Werror>)

if(DISABLE_DEPRECATION_WARNING)
target_compile_options(
Expand Down
Loading