Skip to content
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
4 changes: 3 additions & 1 deletion cpp/bench/ann/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ if(CUVS_ANN_BENCH_USE_HNSWLIB OR CUVS_ANN_BENCH_USE_CUVS_CAGRA_HNSWLIB)
endif()

include(cmake/thirdparty/get_nlohmann_json)
include(cmake/thirdparty/get_sqlite)

if(CUVS_ANN_BENCH_USE_GGNN)
include(cmake/thirdparty/get_ggnn)
Expand Down Expand Up @@ -144,6 +145,7 @@ function(ConfigureAnnBench)
${BENCH_NAME}
PRIVATE ${ConfigureAnnBench_LINKS}
nlohmann_json::nlohmann_json
sqlite3
Threads::Threads
$<$<BOOL:${GPU_BUILD}>:CUDA::cudart_static>
$<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>
Expand Down Expand Up @@ -358,7 +360,7 @@ if(CUVS_ANN_BENCH_SINGLE_EXE)
target_include_directories(ANN_BENCH PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})

target_link_libraries(
ANN_BENCH PRIVATE raft::raft nlohmann_json::nlohmann_json benchmark::benchmark dl
ANN_BENCH PRIVATE raft::raft nlohmann_json::nlohmann_json sqlite3 benchmark::benchmark dl
$<$<TARGET_EXISTS:CUDA::nvtx3>:CUDA::nvtx3>
)
set_target_properties(
Expand Down
5 changes: 4 additions & 1 deletion cpp/bench/ann/src/common/benchmark.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once

#include "ann_types.hpp"
#include "conf.hpp"
#include "dataset.hpp"
#include "nvtx_stats.hpp"
#include "util.hpp"

#include <benchmark/benchmark.h>
Expand Down Expand Up @@ -138,6 +139,7 @@ void bench_build(::benchmark::State& state,

cuda_timer gpu_timer{algo};
{
nvtx_stats nvtx_stats{state};
nvtx_case nvtx{state.name()};
/* Note: GPU timing

Expand Down Expand Up @@ -293,6 +295,7 @@ void bench_search(::benchmark::State& state,
auto* distances_ptr = reinterpret_cast<float*>(neighbors_ptr + result_elem_count);

{
nvtx_stats nvtx_stats{state};
nvtx_case nvtx{state.name()};

std::unique_ptr<algo<T>> a{nullptr};
Expand Down
Loading