From ec2e68f661ac7975da0bf619f814a880f1acd862 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Wed, 4 Dec 2024 20:14:26 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Vyas Ramasubramani Co-authored-by: Bradley Dice --- cpp/include/kvikio/file_handle.hpp | 4 ++-- cpp/include/kvikio/shim/cufile.hpp | 2 +- python/kvikio/kvikio/benchmarks/utils.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/include/kvikio/file_handle.hpp b/cpp/include/kvikio/file_handle.hpp index e763360c07..4880bd4f20 100644 --- a/cpp/include/kvikio/file_handle.hpp +++ b/cpp/include/kvikio/file_handle.hpp @@ -69,8 +69,8 @@ class FileHandle { throw std::runtime_error("Missing the cuFile stream api."); } - // When checking for availability, we also check if cuFile's config file exist. This is - // because even when the stream API is available, it doesn't work if no config file exist. + // When checking for availability, we also check if cuFile's config file exists. This is + // because even when the stream API is available, it doesn't work if no config file exists. if (config_path().empty()) { if (requested_compat_mode == CompatMode::AUTO) { return true; } throw std::runtime_error("Missing cuFile configuration file."); diff --git a/cpp/include/kvikio/shim/cufile.hpp b/cpp/include/kvikio/shim/cufile.hpp index 8ea1612b71..5194d45e74 100644 --- a/cpp/include/kvikio/shim/cufile.hpp +++ b/cpp/include/kvikio/shim/cufile.hpp @@ -234,7 +234,7 @@ inline int cufile_version() } } #else -constexpr bool cufile_version() { return 0; } +constexpr int cufile_version() { return 0; } #endif /** diff --git a/python/kvikio/kvikio/benchmarks/utils.py b/python/kvikio/kvikio/benchmarks/utils.py index 2bb1f63f9a..7a074dd58f 100644 --- a/python/kvikio/kvikio/benchmarks/utils.py +++ b/python/kvikio/kvikio/benchmarks/utils.py @@ -43,9 +43,9 @@ def pprint_sys_info() -> None: mem_total = format_bytes(pynvml.nvmlDeviceGetMemoryInfo(dev).total) bar1_total = format_bytes(pynvml.nvmlDeviceGetBAR1MemoryInfo(dev).bar1Total) if version == (0, 0): - libcufile_version = "unknown" + libcufile_version = "unknown (earlier than cuFile 1.8)" else: - libcufile_version = f"{version[0]}.{version[1]}" + libcufile_version = ".".join(version) gds_version = "N/A (Compatibility Mode)" if props.is_gds_available: gds_version = f"v{props.major_version}.{props.minor_version}"