KhronosGroup / KhronosGroup/OpenCL-ICD-Loader

Platforms with Disabled devices cause app crash for OCL apps.

Open Beginner friendly
#287 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
304
Forks
171
Avg merge
11h 30m
Merged PRs (30d)
1

Description

1. currently clinfo detects all platforms even if the underlying device is disabled.
2. This is fine for clinfo, but the OCL apps (Geekbench/Luxmark) crash when they see **CL_DEVICE_NOT_FOUND** returned by OCL.
3. ProbeDevice() (icd_windows_hkr.c) only screens for reboot-pending states, so a device that has been disabled in Device Manager is still reported as Valid. Disabling a device does not remove its registry values, so the loader goes on to read OpenCLDriverName from the disabled adapter's HKR software key and registers an ICD for hardware that can never supply an OpenCL device.
4. The fix is to check if the device has been disabled with **CM_PROB_DISABLED** and skip enumerating its ICD via HKR.

I have tested the fix but unable upstream the change, due to write permissions.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in icd_windows_hkr.c at ProbeDevice() and trace how device registry entries are validated and registered. Reproduce or inspect enumeration with a Device Manager-disabled device, then verify that its ICD is skipped while enabled devices remain available and clinfo behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.