-
Notifications
You must be signed in to change notification settings - Fork 220
change deprecated NVHPC toolchain classes to inherit from supported counterparts #5096
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e4e2923
change deprecated NVHPC compiler to just inherit the NVidiaCompilers …
lexming 0df45d7
change deprecated NVHPCToolchain compiler to just inherit the NvidiaC…
lexming ddde426
simplify test_nvhpc_compatibility to just test compatibility downward…
lexming cd29eee
remove unused abc module from toolchains.nvhpc
lexming 1b9bc7b
allow deprecated behaviour on tests handling toolchains
lexming a77cd7c
fix formatting in test.framework.docs
lexming 3831601
remove deprecated NVHPC as compiler of NvidiaCompilers
lexming 10c4ee6
add DEPRECATED attributed to deprecated toolchain classes
lexming 7526dbd
filter out deprecated toolchains from toolchain list in documentation
lexming 1e41a10
revert changes to tests listing toolchains in test.framework.options
lexming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Why did you remove this? This was one of the breaking changes: Prior users relied on checking
if isinstance(tc, NVHPC)which was broken by removing NVHPC.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.
Because it does not matter. We care that the deprecated toolchain is still there, can be loaded and provides the new one. The opposite is irrelevant, nobody should load the new toolchain and expect to get the deprecated one.
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.
But people use the old toolchain already by importing the old one not the new one. This change here (and in 5.2.0) breaks existing usage, e.g. in hooks:
Because we changed the name to be
Nvidia-compilersthis does not work anymore and needs to be adapted toif isinstance(tc, NVHPC, NvidiaCompilers):to work with 5.1 and 5.2Hence my ABC-Meta trick to allow the existing code to work even with the 5.2.0 change
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.
It does not break anything. That check is catching the old toolchain, and continues to be able to catch the old toolchain.
You are right that this code will not catch the new toolchain, and that is correct IMO. If you want to catch the new stuff, you need to update your hooks and be actively aware that your hooks are catching the new stuff. The old and new toolchains are very much different, so the code behind that check is not guaranteed to work with the new stuff at all in any case.
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 true? Because #4927 has commit f1761f8
So I understood this as a rename of
compiler.NVHPCtocompiler.NvidiaCompilerswith no (real) differences.Note that I'm not referring to
toolchains.NVHPCbut to the previously existing "compiler"Uh oh!
There was an error while loading. Please reload this page.
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, that is true, we started with just a rename. But that does not mean that we will keep backward compatibility with old
compiler.NVHPCat all levels. And things have already diverged, not in structure (as you mentioncompiler.NvidiaCompilersholds the same spot as formercompiler.NVHPC) but in functionality.The new easyblocks are rather different, attributes and methods have changed. So we cannot guarantee that a hook for the old NVHPC will continue to work with the new one at any level. Therefore, it is risky to have hooks running inadvertently with the new code. Even if that
isinstancecheck would work, code underneath can potentially fail without an update.This does not mean that we don't care about backward compatibility at all. We already made sure that existing easyconfigs for the old
NVHPCcontinue to work in the same way with the newnvidia-compilers/NVHPC. And we also enabled loading the oldNVHPCso that it can still be used by custom easyblocks or custom easyconfigs.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.
Then I'd rather not have
compiler.NVHPC. With the current change the code above seems to work but is never triggered. That is even worse than before. Better always wrong, than sometimes silently wrong.What I was aiming for was a "best effort".
I don't know what the differences between the 2 toolchain classes (easyblocks?) are now. My goal was that working with instances of either works the same as much as possible, both when the user had a custom derived easyblock and when the user got an instance of (now) the new one.