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
17 changes: 15 additions & 2 deletions cpp/bench/ann/src/common/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,21 @@ inline auto cuda_info()
cudaRuntimeGetVersion(&runtime);

cudaDeviceProp device_prop;
cudaGetDevice(&dev);
cudaGetDeviceProperties(&device_prop, dev);
auto err_code = cudaGetDevice(&dev);
if (err_code == cudaErrorNoDevice || err_code == cudaErrorInvalidDevice) {
throw std::runtime_error{"cuda_info: call to cudaGetDevice failed with code " +
std::to_string(err_code) +
". If you are running on a CPU-only machine, please "
"use the CPU package instead."};
} else if (err_code != cudaSuccess) {
throw std::runtime_error{"cuda_info: call to cudaGetDevice failed with code " +
std::to_string(err_code)};
}
err_code = cudaGetDeviceProperties(&device_prop, dev);
if (err_code != cudaSuccess) {
throw std::runtime_error{"cuda_info: call to cudaGetDeviceProperties failed with code " +
std::to_string(err_code)};
}
props.emplace_back("gpu_name", std::string(device_prop.name));
props.emplace_back("gpu_sm_count", std::to_string(device_prop.multiProcessorCount));
props.emplace_back("gpu_sm_freq", std::to_string(device_prop.clockRate * 1e3));
Expand Down
5 changes: 4 additions & 1 deletion python/cuvs_bench/cuvs_bench/run/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ def gather_algorithm_configs(
algos_conf_fs = [
os.path.join(scripts_path, "../config", "algos", f)
for f in algos_conf_fs
if ".json" not in f and "constraint" not in f and ".py" not in f
if ".json" not in f
and "constraint" not in f
and ".py" not in f
and "__pycache__" not in f
]

if configuration:
Expand Down