8000 Add minimum driver version check to allow minor version compatibility. by christophe-murphy · Pull Request #3648 · arrayfire/arrayfire · GitHub
[go: up one dir, main page]

Skip to content

Add minimum driver version check to allow minor version compatibility. #3648

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

Merged
merged 2 commits into from
Apr 4, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Simpler method of checking for nvidia driver cuda minor version compa…
…tibility.
  • Loading branch information
christophe-murphy committed Apr 2, 2025
commit af09dba16c9b646d7d169f01787a3a6d53fb9968
16 changes: 8 additions & 8 deletions src/backend/cuda/device_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ using std::make_pair;
using std::pair;
using std::string;
using std::stringstream;
using std::stof;

namespace arrayfire {
namespace cuda {
Expand Down Expand Up @@ -512,7 +511,10 @@ void DeviceManager::checkCudaVsDriverVersion() {

debugRuntimeCheck(getLogger(), runtime, driver);

if (runtime > driver) {
int runtime_major = runtime / 1000;
int driver_major = driver / 1000;

if (runtime_major > driver_major) {
string msg =
"ArrayFire was built with CUDA {} which requires GPU driver "
"version {} or later. Please download and install the latest "
Expand Down Expand Up @@ -550,13 +552,11 @@ void DeviceManager::checkCudaVsDriverVersion() {
runtime_it->unix_min_version;
#endif

if (stof(driverVersionString) < minimumDriverVersion) {
char buf[buf_size];
fmt::format_to_n(buf, buf_size, msg, fromCudaVersion(runtime),
minimumDriverVersion, fromCudaVersion(driver));
char buf[buf_size];
fmt::format_to_n(buf, buf_size, msg, fromCudaVersion(runtime),
minimumDriverVersion, fromCudaVersion(driver));

AF_ERROR(buf, AF_ERR_DRIVER);
}
AF_ERROR(buf, AF_ERR_DRIVER);
}
}

Expand Down
Loading
0