-
Notifications
You must be signed in to change notification settings - Fork 303
fix missing LIBOMPTARGET_DEVICE_ARCHITECTURES in third stage of bootstrap build in LLVM easyblock
#3851
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
fix missing LIBOMPTARGET_DEVICE_ARCHITECTURES in third stage of bootstrap build in LLVM easyblock
#3851
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -291,6 +291,10 @@ def __init__(self, *args, **kwargs): | |
| if self.cfg['use_pic']: | ||
| on_opts.append('CMAKE_POSITION_INDEPENDENT_CODE') | ||
|
|
||
| # General options being passed to every build stage. | ||
| # Here, options that will be required in all build stages should be added. | ||
| # Update _cmakeopts in _configure_{general,intermediate,final}_build if | ||
| # build option is only relevant for a single build step. | ||
| self.general_opts = GENERAL_OPTS.copy() | ||
|
|
||
| for opt in on_opts: | ||
|
|
@@ -381,6 +385,9 @@ def __init__(self, *args, **kwargs): | |
| self.log.info("Final projects to build: %s", ', '.join(self.final_projects)) | ||
| self.log.info("Final runtimes to build: %s", ', '.join(self.final_runtimes)) | ||
|
|
||
| # CMake options passed to each building stage. | ||
| # Will be cleared between stages. If arguments are needed in multiple stages, | ||
| # consider adding them to general_opts instead. | ||
| self._cmakeopts = {} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too late for this PR now, but I thought we could set this to What do you think?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably a good idea. We can either add this in a separate PR, or just add it to one of the remaining LLVM ones.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we are already setting it at the edge where we want to access it. If you try to use it before in the init it will be non-existent and fail regardless
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it must only be used after the There cmakeopts should be initialized to a copy of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then I dont understand your remark:
Getting an error is intended to detect using it too early. And IMO the explicit
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What i meant is that i think I think unless we decide do alter the logic quite a bit this will not really save us from PRs using the wrong attributes/methods if we do not catch it in review...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But should it be usable before I'd just make it as hard as possible to use the wrong one if it doesn't impact what we really need and my suggestion is a step towards it while not impacting current usage as far as I can tell. Better sanity checks would be good either way, yes. Then maybe the minimal common ground would be renaming the generically named
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I would say so, otherwise we would need a section for updating
I think the only way to really make sure stuff is not misused is to introduce 4 methods:
And than we could ensure they are never called after a particular stage has already been ran, and that the internal methods are never touched manually. PS would also require rewriting the logic in how the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Would it then need to be a property at all? The current member methods that additionally modify it could just a return a dict that is then used to update a local cmakeopts |
||
| self._cfgopts = list(filter(None, self.cfg.get('configopts', '').split())) | ||
|
|
||
|
|
@@ -821,7 +828,7 @@ def configure_step(self): | |
| gpu_archs = self.cfg.get_cuda_cc_template_value("cuda_sm_space_sep", required=False).split() | ||
| gpu_archs += self.amd_gfx | ||
| if gpu_archs: | ||
| self._cmakeopts['LIBOMPTARGET_DEVICE_ARCHITECTURES'] = self.list_to_cmake_arg(gpu_archs) | ||
| self.general_opts['LIBOMPTARGET_DEVICE_ARCHITECTURES'] = self.list_to_cmake_arg(gpu_archs) | ||
|
|
||
| self._configure_general_build() | ||
| self.add_cmake_opts() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.