-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
v2.8.0 with system LLVM #213
Conversation
…nda-forge-pinning 2022.02.06.08.21.47
…nda-forge-pinning 2022.02.06.08.21.47
…nda-forge-pinning 2022.02.08.09.38.24
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( I do have some suggestions for making it better though... For recipe:
|
This is a draft to use pre-built binaries for
I created a script called @h-vetinari @hmaarrfk @ngam @isuruf You're probably the right audience to look at this and assess whether it would be interesting to push it over the finish line. |
Locally on |
This is amazing. ❤️ I don't yet understand the symbol and bazel config issues, but I don't see why we shouldn't merge the precursor PRs and continue iterating here; though perhaps with the one caveat that if we think this has a reasonable chance of working, then I'd prefer to have a dedicated label |
Are you able to add the dev packages to a channel and ask Azure to build them? Does this get the builds completed in time remotely? |
You can have a look at https://github.com/conda-forge/tensorflow-feedstock/pull/78/files as well.
|
Yes, the PR was my initial inspiration but sadly the LLVM Bazel definitions got a lot more complicated and diverged from what is built with CMake. As |
Would be nice to discuss that over at conda-forge/llvmdev-feedstock#148 I would also use these binaries for |
FTR: the latest commit took |
@conda-forge-admin please rerender |
…nda-forge-pinning 2022.04.02.04.11.01
@conda-forge-admin please rerender |
…nda-forge-pinning 2022.04.10.07.10.26
@conda-forge/tensorflow I would like to build this (locally). Could I get a review before I spent the CPU hours? |
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.
Did a slightly-less-than-superficial pass, looking very good. Most of my comments are on the level of nits and not critical.
@@ -2,6 +2,26 @@ | |||
|
|||
set -ex | |||
|
|||
if [[ "${target_platform}" != "${build_platform}" ]]; then | |||
if [ ! -d "llvm-build" ]; then | |||
conda create -y -p llvm-build llvmdev=14.0.0.tf280_55c71c9eac9b mlir=14.0.0.tf280_55c71c9eac9b -c conda-forge/label/llvm_tf -c conda-forge/label/mlir_tf |
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.
Should we put the 14.0.0.tf280_55c71c9eac9b
into cbc.yaml?
Also, this might benefit from a comment. I can see that in cross-compilation we're installing the conda-forge packages and moving the binaries into our build-prefix - I guess what I'm missing is that conda create [pkgs]
will automatically use the build_platform
as an arch?
-e "s:\${MACOSX_SDK_VERSION}:${MACOSX_SDK_VERSION:-}:" \ | ||
-e "s:\${MACOSX_DEPLOYMENT_TARGET}:${MACOSX_DEPLOYMENT_TARGET:-}:" \ |
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.
Indent is off here
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 think it is correct. for some reason the tab character isn't rendering correclty.
# TODO: Automatically extract this | ||
llvm_commit = "55c71c9eac9bc7f956a05fa9258fad4f86565450" |
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.
Another thing for cbc (next to 14.0.0.tf280_55c71c9eac9b
)...?
# Generate LLVM build defintion | ||
|
||
PREFIX = Path(os.environ["PREFIX"]) | ||
SYMBOL = "LLVM" |
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.
Maybe I'm overlooking something, but I find this a strange variable name. In the loop above you're really resolving symbols from the nm
output, but calling a variable containing the string "LLLVM"
a symbol is confusing me.
# Load the BUILD file and run it with the above defined custom functions | ||
exec(r.text) |
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.
Not a big fan of the distance between creating r
and using it, especially given it's very short name.
Can we do upstream_build_bazel = r.text
after the r=
above and then
# Load the BUILD file and run it with the above defined custom functions | |
exec(r.text) | |
# Run the upstream BUILD file with the above defined custom functions | |
exec(upstream_build_bazel) |
here?
# Load the BUILD file and run it with the above defined custom functions | ||
exec(r.text) |
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.
Same here (even larger distance between definition and use)
+ #tf_http_archive( | ||
+ # name = "llvm-project", | ||
+ # build_file = "//third_party/llvm:BUILD", | ||
+ # sha256 = "22054926b426c66d8f2bc22071365df6e35f3aacf19ad943bc6167d4cae3bebb", | ||
+ # strip_prefix = "no_valid_prefix", | ||
+ # system_build_file = "//third_party/systemlibs:llvm.BUILD", | ||
+ # urls = tf_mirror_urls("https://github.com/invalid/mirror/source.tar.gz"), | ||
+ #) |
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.
This commented out code doesn't seem to have existed previously - any reason we're patching it in?
Thanks a lot @xhochy. I am not really knowledgeable enough to review the changes here, but I will happily observe and help build when ready. @isuruf and @hmaarrfk could you have a quick look? @hmaarrfk, you've built the previous linux/cuda ones --- I am not sure if you have the time or energy this time around, so I am willing to figure out a solution when the time comes. Just let me know. The idea is: let's not delay building because we the lack compute resources (I will get us something to work; I don't have access to local machines, but I will figure out something if/when needed). Note: 2.9.0-rc0 has been released a week or so ago, so we could try to get that out asap as well. Tagging @ganand1 for visibility but also if you feel like you could offer thoughts on this PR. |
@@ -3,3 +3,5 @@ | |||
# available on 10.13 | |||
MACOSX_SDK_VERSION: # [osx and x86_64] | |||
- "10.13" # [osx and x86_64] | |||
channel_sources: | |||
- conda-forge/label/mlir_tf,conda-forge/label/llvm_tf,conda-forge |
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 already forgot what mlir
stood for. Could you add a sentence or two as to what these are for.
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.
This is seriously complicated.
Can we have a summary as to why this is useful? We don't get our builds under the CI limit for the GPU builds.
It doesn't seem like these changes can be upstreamed.
I fear like this is simply not going to be maintainable.
Getting GPU or OSX builds running in CI would have been something that would have offset the maintenance costs here. Without that I feel I have nothing in my hands to argue why this should be maintained. |
Co-authored-by: h-vetinari <[email protected]> Co-authored-by: Mark Harfouche <[email protected]>
Still, I won't give up here. |
Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)Closes #155