codeplaysoftware / oneapi-construction-kit

Other
68 stars 30 forks source link

[host] Ensure clock_frequency is at least 1. #472

Closed hvdijk closed 3 months ago

hvdijk commented 3 months ago

Overview

[host] Ensure clock_frequency is at least 1.

Reason for change

CL_DEVICE_MAX_CLOCK_FREQUENCY has been deprecated by OpenCL 2.2, but there are still tests that it returns a non-zero value. For various reasons, it can currently return 0.

Description of change

Clamp that to 1 instead.

Anything else we should know?

If there's any other relevant information we should know that may help us in understanding and verifying your patch, please include it here.

Checklist