"docs/getting_started/getting_started_jax.out" did not exist on "c90a9214091badd1234b2d9ca851bd97f8edb0f6"
cuda_nvml.cpp 724 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*************************************************************************
 * Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 *
 * See LICENSE for license information.
 ************************************************************************/

#include "cuda_nvml.h"

#include "shared_lib_wrapper.h"

namespace transformer_engine {

namespace cuda_nvml {

/*! \brief Lazily-initialized shared library for CUDA NVML */
Library &cuda_nvml_lib() {
  constexpr char lib_name[] = "libnvidia-ml.so.1";
  static Library lib(lib_name);
  return lib;
}

void *get_symbol(const char *symbol) { return cuda_nvml_lib().get_symbol(symbol); }

}  // namespace cuda_nvml

}  // namespace transformer_engine