- 
                Notifications
    You must be signed in to change notification settings 
- Fork 217
Fix #962: Don't perform unnecessary version checks #969
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
Conversation
| Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. | 
| /ok to test | 
| cdef void* handle = NULL | ||
|  | ||
| with gil, __symbol_lock: | ||
| driver_ver = get_cuda_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.
Looks like this is being used below and causing at least some of the compilation failures. Does loading the library actually require computing the 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.
No, it doesn't actually require it. Just need to change what's generated...
| /ok to test | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| /ok to test | 
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.
Nice cleanup!
Is there an easy/obvious way to specify libcuda_so = 'libcuda.so.1' in one central place? cuda/bindings/_internal/utils.pyx maybe? Maybe even better, move the entire get_cuda_version() function there? — We could also do that later.
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.
Ralf's comment made me realize... we should also remove get_cuda_version in this file, because it is no longer needed.
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.
Ah... I see now why this is challenging: get_cuda_version is a copy-pasta from the extern pxd. It does not seem that we can remove this locally (i.e. without affecting other teams). I'll let Mike make the final call, I run out of good ideas tonight 🙁
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.
(One silly idea is to split the extern pxd into two, one is always copied/pasted, the other is pasted after the first one only when need_driver is true.)
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.
Yes, get_cuda_version is inserted by the binding generator into every set of bindings.  I don't see much need to deal with that, though.  It's a static function that the compiler removes if not needed.
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.
ditto
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.
ditto
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.
ditto
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.
ditto
| 
 
 | 
| 
 | 
Description
closes #962
Checklist