Cycles: oneAPI: Fix driver version check for future Intel GPU drivers
SYCL runtime currently relies on an internal driver behavior that will break the driver version string returned by SYCL if it changes: https://github.com/oneapi-src/unified-runtime/issues/1777 This will be fixed at SYCL runtime level but until we use a new enough one, we need to add additional verifications to avoid blocking execution on a driver that will change this internal behavior. Pull Request: https://projects.blender.org/blender/blender/pulls/124084
This commit is contained in:
parent
cbbeeccd08
commit
4477641467
@ -1072,7 +1072,27 @@ std::vector<sycl::device> available_sycl_devices()
|
|||||||
filter_out = true;
|
filter_out = true;
|
||||||
}
|
}
|
||||||
/* if not already filtered out, check driver version. */
|
/* if not already filtered out, check driver version. */
|
||||||
if (!filter_out) {
|
bool check_driver_version = !filter_out;
|
||||||
|
/* We don't know how to check driver version strings for non-Intel GPUs. */
|
||||||
|
if (check_driver_version &&
|
||||||
|
device.get_info<sycl::info::device::vendor>().find("Intel") == std::string::npos)
|
||||||
|
{
|
||||||
|
check_driver_version = false;
|
||||||
|
}
|
||||||
|
/* Because of https://github.com/oneapi-src/unified-runtime/issues/1777, future drivers
|
||||||
|
* may break parsing done by a SYCL runtime from before the fix we expect in major
|
||||||
|
* version 8. Parsed driver version would start with something different than current
|
||||||
|
* "1.3.". To avoid blocking a device by mistake in the case of new driver / old SYCL
|
||||||
|
* runtime, we disable driver version check in case LIBSYCL_MAJOR_VERSION is below 8 and
|
||||||
|
* actual driver version doesn't start with 1.3. */
|
||||||
|
# if __LIBSYCL_MAJOR_VERSION < 8
|
||||||
|
if (check_driver_version &&
|
||||||
|
!string_startswith(device.get_info<sycl::info::device::driver_version>(), "1.3."))
|
||||||
|
{
|
||||||
|
check_driver_version = false;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
if (check_driver_version) {
|
||||||
int driver_build_version = parse_driver_build_version(device);
|
int driver_build_version = parse_driver_build_version(device);
|
||||||
if ((driver_build_version > 100000 &&
|
if ((driver_build_version > 100000 &&
|
||||||
driver_build_version < lowest_supported_driver_version_win) ||
|
driver_build_version < lowest_supported_driver_version_win) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user