From 89bfd75d6067c004663f1372f56ae9624a21a4d6 Mon Sep 17 00:00:00 2001 From: Echo Date: Fri, 7 Jun 2024 17:40:37 +0800 Subject: [PATCH] fix nvmlInit function segFault --- src/nvml_entry.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nvml_entry.c b/src/nvml_entry.c index 06c9fa2..8a05e9b 100644 --- a/src/nvml_entry.c +++ b/src/nvml_entry.c @@ -41,6 +41,8 @@ nvmlReturn_t nvmlInit_v2(void) { } nvmlReturn_t nvmlInit(void) { + load_necessary_data(); + return NVML_ENTRY_CALL(nvml_library_entry, nvmlInit); } @@ -1703,4 +1705,4 @@ nvmlReturn_t nvmlVgpuInstanceGetLicenseInfo(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuLicenseInfo_t *licenseInfo) { return NVML_ENTRY_CALL(nvml_library_entry, nvmlVgpuInstanceGetLicenseInfo); -} \ No newline at end of file +}