Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] NVIDIA Thread Scheduler for new NVIDIA drivers #587

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ private static boolean isDriverVersionCompatible(OCLTargetDevice device) {
int majorVersion = Integer.parseInt(device.getDriverVersion().split("\\.")[0]);
int minorVersion = Integer.parseInt(device.getDriverVersion().split("\\.")[1]);

return majorVersion >= NVIDIA_MAJOR_VERSION_GENERIC_SCHEDULER && minorVersion >= NVIDIA_MINOR_VERSION_GENERIC_SCHEDULER;
if (majorVersion == NVIDIA_MAJOR_VERSION_GENERIC_SCHEDULER && minorVersion >= NVIDIA_MINOR_VERSION_GENERIC_SCHEDULER) {
return true;
} else {
return majorVersion > NVIDIA_MAJOR_VERSION_GENERIC_SCHEDULER;
}
}

private static OCLKernelScheduler getInstanceGPUScheduler(final OCLDeviceContext context) {
OCLTargetDevice device = context.getDevice();
if (device.getDeviceVendor().contains(SUPPORTED_VENDORS.AMD.getName())) {
return new OCLAMDScheduler(context);
} else if (device.getDeviceVendor().contains(SUPPORTED_VENDORS.NVIDIA.getName())) {
if (isDriverVersionCompatible(device)) {
return new OCLNVIDIAGPUScheduler(context);
} else {
return new OCLGenericGPUScheduler(context);
}
return isDriverVersionCompatible(device) ? new OCLNVIDIAGPUScheduler(context) : new OCLGenericGPUScheduler(context);
} else {
return new OCLGenericGPUScheduler(context);
}
Expand Down Expand Up @@ -106,4 +106,4 @@ public static OCLKernelScheduler create(final OCLDeviceContext context) {
}
return null;
}
}
}