Skip to content

Remove spack.target from code#46503

Merged
haampie merged 9 commits intospack:developfrom
alalazo:maintainers/remove-target
Sep 21, 2024
Merged

Remove spack.target from code#46503
haampie merged 9 commits intospack:developfrom
alalazo:maintainers/remove-target

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Sep 20, 2024

The spack.target.Target class is a weird entity, that is just needed to:

  1. Sort microarchitectures in lists deterministically
  2. Being able to use microarchitectures in hashed containers

This PR removes it, and uses archspec.cpu.Microarchitecture directly. To sort lists, we use a proper key= when needed. Being able to use Microarchitecture objects in sets is achieved by updating the external archspec.

We might clean the code further, in following PRs, by introducing microarchitecture ranges in ArchSpec, and simplifying the constrain etc. logic.

This argument is not used anymore in any code path

Signed-off-by: Massimiliano Culpo <[email protected]>
Signed-off-by: Massimiliano Culpo <[email protected]>
Signed-off-by: Massimiliano Culpo <[email protected]>
Signed-off-by: Massimiliano Culpo <[email protected]>
@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Sep 20, 2024

Hi @alalazo! I noticed that the following package(s) don't yet have maintainers:

  • hpcc
  • wgl

Are you interested in adopting any of these package(s)? If so, simply add the following to the package class:

    maintainers("alalazo")

If not, could you contact the developers of this package and see if they are interested? You can quickly see who has worked on a package with spack blame:

$ spack blame hpcc

Thank you for your help! Please don't add maintainers without their consent.

You don't have to be a Spack expert or package developer in order to be a "maintainer," it just gives us a list of users willing to review PRs or debug issues relating to this package. A package can have multiple maintainers; just add a list of GitHub handles of anyone who wants to volunteer.

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Sep 20, 2024

@nrnhines can you review this PR?

This PR modifies the following package(s), for which you are listed as a maintainer:

  • amdfftw
  • arbor
  • lammps
  • namd
  • neuron
  • py-tensorflow

Signed-off-by: Massimiliano Culpo <[email protected]>
@alalazo alalazo marked this pull request as ready for review September 20, 2024 16:30
Copy link
Copy Markdown
Member

@rbberger rbberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the lammps package.

@haampie
Copy link
Copy Markdown
Member

haampie commented Sep 20, 2024

lib/spack/spack/platforms/_platform.py:docstring of spack.platforms._platform.Platform.add_target:1: WARNING: py:class reference target not found: archspec.cpu.microarchitecture.Microarchitecture

Signed-off-by: Massimiliano Culpo <[email protected]>
@spackbot-app spackbot-app bot added the documentation Improvements or additions to documentation label Sep 21, 2024
Note that these packages rely on "internal" API calls,
which are not stable. Spack injects the same flags through the
wrapper.

Signed-off-by: Massimiliano Culpo <[email protected]>
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Sep 21, 2024

@haampie haampie merged commit b93c57c into spack:develop Sep 21, 2024
@alalazo alalazo deleted the maintainers/remove-target branch September 23, 2024 07:58
@haampie haampie added the v0.22.3 PRs to backport for v0.22.3 label Oct 18, 2024
@haampie
Copy link
Copy Markdown
Member

haampie commented Oct 18, 2024

Adding v0.22.3 because just archspec needs to be backported. Should've been a separate PR.

haampie pushed a commit that referenced this pull request Oct 18, 2024
Use commit bceb39528ac49dd0c876b2e9bf3e7482e9c2be4a
@haampie haampie mentioned this pull request Oct 18, 2024
32 tasks
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Oct 18, 2024

The only conflict is the sha, that can also be solved in the backport PR. We can keep archspec updates always separate in the future. For what is worth, the changes in archspec here are because of this PR.

@haampie haampie mentioned this pull request Nov 8, 2024
haampie pushed a commit that referenced this pull request Nov 18, 2024
Use commit bceb39528ac49dd0c876b2e9bf3e7482e9c2be4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture build-environment compilers core PR affects Spack core functionality documentation Improvements or additions to documentation python stage tests General test capability(ies) update-package utilities v0.22.3 PRs to backport for v0.22.3 vendored-dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants