Skip to content

Commit 6920570

Browse files
committed
fix: gpustack windows nvidia uuid bugs
1 parent c15d49c commit 6920570

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/detection/gpu/gpu_nvidia.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const char* ffDetectNvidiaGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverR
155155
{
156156
char uuid[NVML_DEVICE_UUID_V2_BUFFER_SIZE];
157157
if (nvmlData.ffnvmlDeviceGetUUID(device, uuid, sizeof(uuid)) == NVML_SUCCESS)
158-
*result.uuid = ffStrbufCreateStatic(uuid);
158+
ffStrbufAppendS(result.uuid, uuid);
159159
}
160160

161161
return NULL;

src/detection/gpu/gpu_windows.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
7878
FFGPUResult* gpu = (FFGPUResult*)ffListAdd(gpus);
7979
ffStrbufInitStatic(&gpu->vendor, ffGetGPUVendorString(vendorId));
8080
ffStrbufInitWS(&gpu->name, displayDevice.DeviceString);
81+
ffStrbufInit(&gpu->uuid);
8182
ffStrbufInit(&gpu->driver);
8283
ffStrbufInitStatic(&gpu->platformApi, "Direct3D");
8384
gpu->temperature = FF_GPU_TEMP_UNSET;
@@ -165,6 +166,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
165166
.type = &gpu->type,
166167
.frequency = options->driverSpecific ? &gpu->frequency : NULL,
167168
.coreUtilizationRate = &gpu->coreUtilizationRate,
169+
.uuid = &gpu->uuid,
168170
},
169171
dllName);
170172
}

0 commit comments

Comments
 (0)