Skip to content
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

py-tensorflow: add v2.11–2.12 #36263

Merged
merged 20 commits into from
Apr 26, 2023

Conversation

adamjstewart
Copy link
Member

Routine update. Can't test because it doesn't build on macOS. Hopefully CI catches any issues.

@spackbot-app
Copy link

spackbot-app bot commented Mar 20, 2023

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

  • bazel

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

    maintainers("adamjstewart")

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 bazel

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 spackbot-app bot requested review from aweits and pradyunsg March 20, 2023 19:07
# https://github.com/tensorflow/tensorflow/issues/33374
depends_on("python@:3.7", type=("build", "run"), when="@:2.1")

# Python support based on wheel availability
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't normally like doing this, but in my experience, libraries like this are so tightly coupled to CPython internals that they don't build for newer versions without manual effort. This also gives us an easy way to deprecate ancient versions of TF that no one uses anymore. Did the same for ancient versions of bazel that TF used to require. Hopefully this makes these packages more manageable.

Copy link
Contributor

@tldahlgren tldahlgren left a comment

Choose a reason for hiding this comment

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

Confirmed all 84 affected version sha256.

@tldahlgren tldahlgren self-assigned this Mar 20, 2023
@adamjstewart
Copy link
Member Author

TF 2.11 seems to have a build error:

tensorflow/compiler/mlir/quantization/tensorflow/python/quantize_model.cc:140:10: error: could not convert 'dump_file' from 'std::unique_ptr<llvm::raw_fd_ostream>' to 'absl::lts_20220623::StatusOr<std::unique_ptr<llvm::raw_fd_ostream> >'
   return dump_file;
          ^~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-array-parameter'
cc1plus: warning: unrecognized command line option '-Wno-unknown-warning'

@adamjstewart
Copy link
Member Author

tensorflow/tensorflow#58953 and tensorflow/tensorflow#59165 suggest that a newer version of GCC is required, added conflicts.

@adamjstewart
Copy link
Member Author

Note that we are no longer testing the most recent version of TF in CI since the compiler is too old. Would love to fix that if someone knows how to bump compiler versions.

@alalazo
Copy link
Member

alalazo commented Mar 22, 2023

We build Docker images for the Gitlab runners in this repository: https://github.com/spack/gitlab-runners If any package in the latest release there is already a good fit we "just" have to change the Docker image being pulled and 🤞

Otherwise we have to add another recipe, tag the images and do the above. Pinging @haampie and @zackgalbreath as the last people that went through this process.

@adamjstewart
Copy link
Member Author

How do I know which version of GCC these have? Also, is there an image with ROCm pre-installed?

@alalazo
Copy link
Member

alalazo commented Mar 22, 2023

How do I know which version of GCC these have? Also, is there an image with ROCm pre-installed?

The GCC installed is the default of the system usually. So for instance:

$ docker run -it --rm ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly
Unable to find image 'ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly' locally
nightly: Pulling from spack/linux-ubuntu22.04-x86_64_v2
2ab09b027e7f: Pull complete 
33d202260289: Pull complete 
ccee51ea2fbc: Pull complete 
Digest: sha256:0679e1824087669ef74ba4d694441a6b05abdbd9976d257b84cc98a70655488f
Status: Downloaded newer image for ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly
root@f3f83ed7dcf3:/# which gcc
/usr/bin/gcc
root@f3f83ed7dcf3:/# gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm not sure about ROCm, but I don't think we have any with ROCm installed as an external. Maybe it's good like that, since part of the purpose of CI is that Spack could build a stack from the ground up (for some suitable definition of "ground").

@adamjstewart
Copy link
Member Author

Agreed, although PyTorch doesn't yet support Spack-installed ROCm, it only supports externally installed ROCm. I've been trying to convince AMD folks to add support for this but no luck so far.

@spackbot-app spackbot-app bot added core PR affects Spack core functionality gitlab Issues related to gitlab integration labels Mar 22, 2023
@adamjstewart adamjstewart changed the title py-tensorflow: add v2.11 py-tensorflow: add v2.11–2.12 Mar 22, 2023
@adamjstewart
Copy link
Member Author

@alalazo I switched to ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly but it's still using %gcc@7.3.1, what gives?

@aweits
Copy link
Contributor

aweits commented Mar 24, 2023

failing build for me currently

@alalazo
Copy link
Member

alalazo commented Mar 24, 2023

I think you didn't change the image used in the generate job:
2023-03-24_14-15

See conversation here, where I stumbled on the same issue: #35213 1

Footnotes

  1. This is a PR that I'll finish sooner or later, but right now is in stand-by due to other priorities 😓

@adamjstewart
Copy link
Member Author

@spackbot run pipeline

@spackbot-app
Copy link

spackbot-app bot commented Mar 26, 2023

I've started that pipeline for you!

@adamjstewart
Copy link
Member Author

CI failures at the moment:

  • PyTorch 1.8 has old XNNPACK, which doesn't support GCC 11 (need to see why 1.8 is being built, or add conflict, or patch)
  • TF 2.12 doesn't build (because of course it doesn't, @aweits may have a fix)
  • Several other packages failing because of broken cargo/crates.io downloads (known issue in develop, WIP to fix)

@adamjstewart
Copy link
Member Author

Okay, I extracted everything other than TF and Keras out of this PR so it's easier to review. TF still fails to build for some reason, and Google no longer wants to help now that I mentioned Spack. We should try to reproduce the build failure outside of Spack using the official build from source docs. Then they might be more willing to help, or we may discover the bug no longer occurs.

@adamjstewart
Copy link
Member Author

This resolved the protobuf issue for me, but now I'm back to tensorflow/tensorflow#57631. If this passes CI I think we should just merge. We can fix macOS someday when Google decides to support it.

@adamjstewart
Copy link
Member Author

@spackbot run pipeline

@spackbot-app
Copy link

spackbot-app bot commented Apr 19, 2023

I've started that pipeline for you!

Copy link
Contributor

@aweits aweits left a comment

Choose a reason for hiding this comment

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

builds for me:

-- linux-rhel7-skylake_avx512 / gcc@11.2.0 ----------------------
py-tensorflow@2.12.0

@adamjstewart adamjstewart merged commit d74b02f into spack:develop Apr 26, 2023
12 checks passed
@adamjstewart adamjstewart deleted the packages/py-tensorflow branch April 26, 2023 13:03
joequant pushed a commit to joequant/spack that referenced this pull request Apr 26, 2023
iarspider added a commit to cms-externals/tensorflow that referenced this pull request Jun 14, 2023
iarspider added a commit to cms-externals/tensorflow that referenced this pull request Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts core PR affects Spack core functionality dependencies gitlab Issues related to gitlab integration new-package new-version patch python update-package
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants