Skip to content
Snippets Groups Projects
Commit ccaa0293 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

showCudaVersion now use fmt print instead of Log::info.

parent d7b3dd6f
No related branches found
No related tags found
2 merge requests!790.6.1,!77Minor fix
Pipeline #72883 passed
#ifndef AIDGE_UTILS_SYS_INFO_CUDA_VERSION_INFO_H
#define AIDGE_UTILS_SYS_INFO_CUDA_VERSION_INFO_H
#include <fmt/core.h>
#include "aidge/backend/cuda/utils/CudaUtils.hpp" // CHECK_CUDA_STATUS
#include "aidge/utils/Log.hpp"
#include "aidge/backend/cuda_version.h"
namespace Aidge {
......@@ -15,9 +15,9 @@ constexpr inline const char * getBackendCudaGitHash(){
}
void showBackendCudaProjectVersion() {
Log::info("Aidge backend CUDA: {} ({}), {} {}", getBackendCudaProjectVersion(), getBackendCudaGitHash(), __DATE__, __TIME__);
Log::info("CUDA compiler version: {}", CUDA_COMPILER_VERSION);
Log::info("CuDNN version: {}.{}.{}\n", CUDNN_MAJOR, CUDNN_MINOR,
fmt::println("Aidge backend CUDA: {} ({}), {} {}", getBackendCudaProjectVersion(), getBackendCudaGitHash(), __DATE__, __TIME__);
fmt::println("CUDA compiler version: {}", CUDA_COMPILER_VERSION);
fmt::println("CuDNN version: {}.{}.{}\n", CUDNN_MAJOR, CUDNN_MINOR,
CUDNN_PATCHLEVEL);
int deviceCount = 0;
......@@ -26,7 +26,7 @@ void showBackendCudaProjectVersion() {
if (deviceCount == 0) {
Log::warn("There are no available device(s) that support CUDA");
} else {
Log::info("Detected {} CUDA Capable device(s)", deviceCount);
fmt::println("Detected {} CUDA Capable device(s)", deviceCount);
}
for (int dev = 0; dev < deviceCount; ++dev) {
......@@ -34,17 +34,17 @@ void showBackendCudaProjectVersion() {
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, dev);
Log::info("\nDevice #{}: \"{}\"", dev, deviceProp.name);
fmt::println("\nDevice #{}: \"{}\"", dev, deviceProp.name);
int driverVersion = 0;
int runtimeVersion = 0;
cudaDriverGetVersion(&driverVersion);
cudaRuntimeGetVersion(&runtimeVersion);
Log::info(
fmt::println(
"\tCUDA Driver Version / Runtime Version: {}.{} / {}.{}",
(driverVersion / 1000), ((driverVersion % 100) / 10),
(runtimeVersion / 1000), ((runtimeVersion % 100) / 10));
Log::info("\tCUDA Capability Major/Minor version number: {}.{}",
fmt::println("\tCUDA Capability Major/Minor version number: {}.{}",
deviceProp.major, deviceProp.minor);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment