-
Notifications
You must be signed in to change notification settings - Fork 244
Remove PGI compiler and add shared object versioning to nvcc #2784
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2784 +/- ##
==========================================
- Coverage 83.07% 78.20% -4.88%
==========================================
Files 248 248
Lines 50623 50644 +21
Branches 4460 4462 +2
==========================================
- Hits 42053 39604 -2449
- Misses 7808 10206 +2398
- Partials 762 834 +72
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 good to me (pending Fabio's typo)
f2d5ce1 to
ecee115
Compare
ecee115 to
e89e262
Compare
| except (FileNotFoundError, CalledProcessError): | ||
| pass | ||
| finally: | ||
| if out.returncode == 0: |
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.
Can probably use re to oneline it but that's fine.
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.
I opted for this to make it consistent with the BASH method used to extract the version used in the dockerfiles. There might be better ways of obtaining this information 😅
| start = out.stdout.find(',', start) | ||
| stop = out.stdout.find('\n', start) | ||
| with suppress(InvalidVersion): | ||
| cuda_version = parse(out.stdout[start:stop]) |
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.
IS this more robust than 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.
AFAICT they are identical: https://packaging.pypa.io/en/stable/version.html#packaging.version.parse
parse just seemed to be more descriptive here.
| for soname in versioned | ||
| ]) | ||
| super().add_libraries(filterfalse(lambda s: s.startswith(':'), new)) | ||
|
|
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.
Would make CudaCompiler inherit from NvidiaCompiler to habe a single version/cxxstd
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.
Seems like a good idea, however:
nvcis derived from the old Portland compilernvccis only for compiling CUDA code and leverages a host compilergcc,clang, etc...
That is to say: nvcc isn't a type of nvc and I don't think inheritance is appropriate here, especially since the NvidiaCompiler differs significantly from the GCC compiler, which is unfortunately the base of the "generic" Compiler class . There are several issues with the inheritance pattern used in the compiler.py file and it would be nice to do a bit of a tidy up, like I previously did here. But that can wait for another PR, I think!
This is WIP, I need this for a separate piece of work