Skip to content

Commit

Permalink
GPU (Linux): fix some obvious bugs found in #1284
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 26, 2024
1 parent 4283d96 commit 745c041
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/detection/gpu/gpu_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ static const char* drmDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult
if (options->temp)
{
if (ffamdgpu_query_sensor_info(handle, AMDGPU_INFO_SENSOR_GPU_TEMP, sizeof(value), &value) >= 0)
gpu->temperature = value;
gpu->temperature = value / 1000.;
}

ffStrbufSetS(&gpu->name, ffamdgpu_get_marketing_name(handle));

struct amdgpu_gpu_info gpuInfo;
if (ffamdgpu_query_gpu_info(handle, &gpuInfo) >= 0)
{
gpu->coreCount = (int32_t) gpuInfo.num_shader_engines;
gpu->coreCount = (int32_t) gpuInfo.cu_active_number;
gpu->frequency = (uint32_t) (gpuInfo.max_engine_clk / 1000u);
gpu->index = gpuInfo.asic_id;
gpu->index = FF_GPU_INDEX_UNSET;
gpu->type = gpuInfo.ids_flags & AMDGPU_IDS_FLAGS_FUSION ? FF_GPU_TYPE_INTEGRATED : FF_GPU_TYPE_DISCRETE;

struct amdgpu_heap_info heapInfo;
Expand Down

0 comments on commit 745c041

Please sign in to comment.