-
Notifications
You must be signed in to change notification settings - Fork 92
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
Improve program checks #394
base: main
Are you sure you want to change the base?
Conversation
17f13b7
to
b2495d3
Compare
/ok to test |
|
/ok to test |
options.arch is not None and int(options.arch.split("_")[-1]) not in supported_archs | ||
) | ||
default_arch_not_supported = ( | ||
options.arch is None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer possible now that we default to the current arch when creating ProgramOptions without arch being set, so this logic here and below can be removed/simplified.
version = handle_return(nvrtc.nvrtcVersion()) | ||
if handle_return(driver.cuDriverGetVersion()) > version[0] * 1000 + version[1] * 10: | ||
raise RuntimeError( | ||
"The CUDA driver version is newer than the NVRTC version. " | ||
"Please update your NVRTC library to match the CUDA driver version." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this makes our run-time requirements unnecessarily strict. Driver is always backward compatible so new driver + old CTK (on a device that the old CTK supports) should work just fine.
In the test file there's a removed comment. If this part is meant to follow it, it should check whether target_type is PTX and then compare the driver and NVRTC versions. PTX generated by new NVRTC/NVVM/nvJitLink cannot be loaded (JIT-compiled) by old driver.
I think we should just move around that can_load_generated_ptx check to the codebase, and reuse it here. Then, in the test suite if the local/CI environment does not meet the requirement, we handle the raised exception by the check, instead of skipping the test. Does it make sense?
This review addresses the suggestions in 313 for improving some of the runtime checks in program.
close #313