From 6d3565759a1b073279939d823c0a7b2b32512ff1 Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Tue, 19 Nov 2024 00:19:22 +0100 Subject: [PATCH] feat(backend): remove all the logs from hardware.hpp --- backends/trtllm/csrc/hardware.hpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/backends/trtllm/csrc/hardware.hpp b/backends/trtllm/csrc/hardware.hpp index 02d0b3bf..f3435544 100644 --- a/backends/trtllm/csrc/hardware.hpp +++ b/backends/trtllm/csrc/hardware.hpp @@ -2,7 +2,6 @@ #include #include -#include namespace huggingface::tgi::hardware::cuda { static constexpr auto VOLTA = std::make_tuple(7u, 0u); @@ -18,7 +17,6 @@ namespace huggingface::tgi::hardware::cuda { std::optional get_device_count() { uint32_t numGpus = 0; if (nvmlDeviceGetCount_v2(&numGpus) == NVML_SUCCESS) { - SPDLOG_DEBUG(FMT_STRING("Detected {:d} GPUs on the machine"), numGpus); return numGpus; } else { return std::nullopt; @@ -33,13 +31,10 @@ namespace huggingface::tgi::hardware::cuda { int32_t minor; compute_capabilities_t(): compute_capabilities_t(0) {} - explicit compute_capabilities_t(size_t device_idx): major(0), minor(0) { + explicit compute_capabilities_t(size_t device_idx): major(-1), minor(-1) { nvmlDevice_t device; if (nvmlDeviceGetHandleByIndex_v2(device_idx, &device) == NVML_SUCCESS) { - SPDLOG_DEBUG("Successfully acquired nvmlDevice_t = 0"); - if (nvmlDeviceGetCudaComputeCapability(device, &major, &minor) == NVML_SUCCESS) { - SPDLOG_INFO(FMT_STRING("Detected sm_{:d}{:d} compute capabilities"), major, minor); - } + nvmlDeviceGetCudaComputeCapability(device, &major, &minor); } }; compute_capabilities_t(int32_t major, int32_t minor): major(major), minor(minor) {}