Skip to content

Commit 83dcdaa

Browse files
committed
GPU: fix frequency printing when using custom formation
1 parent 2c29465 commit 83dcdaa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/modules/gpu/gpu.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu
8787
if (gpu->shared.total != FF_GPU_VMEM_SIZE_UNSET) ffParseSize(gpu->shared.total, &sTotal);
8888
if (gpu->shared.used != FF_GPU_VMEM_SIZE_UNSET) ffParseSize(gpu->shared.used, &sUsed);
8989

90+
FF_STRBUF_AUTO_DESTROY frequency = ffStrbufCreate();
91+
ffParseFrequency(gpu->frequency, &frequency);
92+
9093
FF_PRINT_FORMAT_CHECKED(FF_GPU_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, FF_GPU_NUM_FORMAT_ARGS, ((FFformatarg[]) {
9194
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->vendor, "vendor"},
9295
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->name, "name"},
@@ -99,7 +102,7 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu
99102
{FF_FORMAT_ARG_TYPE_STRBUF, &sTotal, "shared-total"},
100103
{FF_FORMAT_ARG_TYPE_STRBUF, &sUsed, "shared-used"},
101104
{FF_FORMAT_ARG_TYPE_STRBUF, &gpu->platformApi, "platform-api"},
102-
{FF_FORMAT_ARG_TYPE_DOUBLE, &gpu->frequency, "frequency"},
105+
{FF_FORMAT_ARG_TYPE_STRBUF, &frequency, "frequency"},
103106
}));
104107
}
105108
}

0 commit comments

Comments
 (0)