-
-
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
WIP: Cuda again #137
WIP: Cuda again #137
Conversation
…a-forge-pinning 2021.10.08.16.45.02
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 ( |
recipe/build.sh
Outdated
fi | ||
|
||
# cuda builds don't work with custom_toolchain, instead we hard-code arguments, mostly copied | ||
# from https://github.com/AnacondaRecipes/tensorflow_recipes/tree/master/tensorflow-base-gpu |
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 part of the approach that is likely to be rejected based on the discussion in #134
Note also that if you just want a working cuda version for Linux I have that already in https://github.com/izahn/tensorflow-feedstock/tree/cuda_2.6.0 , https://github.com/izahn/tensorflow-feedstock/tree/cuda_2.5.1, and https://github.com/izahn/tensorflow-feedstock/tree/cuda_2.4.3 . Python 39 packages are available at https://anaconda.org/izahn/repo. It looks like these won't make it into conda-forge for the reasons discussed in #134 but they work fine for me.
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 consider using different BUILD_OPTS
(up to & including the custom toolchain) to be fair game. Perhaps I misread #134 at the time (if so, I apologise), but this doesn't looks too invasive.
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 if you are using the custom toolchain most if this is redundant, or overrides the overrides specified in the custom toolchain.
@@ -106,7 +115,11 @@ outputs: | |||
build: | |||
- {{ compiler('c') }} | |||
- {{ compiler('cxx') }} | |||
- {{ compiler('cuda') }} # [cuda_compiler_version != "None"] |
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 needs to be added to the top level build requirements in addition to all the outputs.
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.
Thanks!
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.
There is a way to avoid duplicating dependencies. I think you have to name the top level package the same as the "first package".
I'm not sure if this is a feature or bug, but I use it in:
https://github.com/conda-forge/opencv-feedstock/blob/master/recipe/meta.yaml#L56
Would it be acceptable to use it here too?
…a-forge-pinning 2021.10.08.16.45.02
An updated version for |
Co-authored-by: Isuru Fernando <[email protected]>
…a-forge-pinning 2021.10.10.22.03.30
…a-forge-pinning 2021.10.10.22.03.30
Everytime I feel like I understand programming a little better, new frameworks leave me thinking that it is all jargon again. While I feel like I should be able to understand what this error is about, I just can't make sense of it |
hm, we (me and @DerThorsten) were looking at this again, and we might have gotten a tiny bit closer. So basically we got it to compile to a similar level as what you have where it fails at a GPU target. In Tensorflow (the generated This toolchain also comes with a magic compiler wrapper in Python: https://github.com/tensorflow/addons/blob/334cd7ca8fb944aab38164a13d7d2203d7c39605/build_deps/toolchains/gcc7_manylinux2010-nvcc-cuda11/clang/bin/crosstool_wrapper_driver_is_not_gcc#L258-L278 That wrapper seems to either invoke I am not sure (and not a bazel expert at all!) but maybe we're overruling this toolchain with our custom toolchain (https://github.com/conda-forge/tensorflow-feedstock/tree/master/recipe/custom_toolchain) ?? Maybe @xhochy knows a bit about this? One idea would be to try the compiler wrapper thing that is in the other toolchain and see if we can log something interesting. |
We also found it's quite nice to reproduce the error when just compiling the single target and removing the purge:
And lastly I've written a very simple script to enter into the docker container from a first commit the container using
And that get's a proper interactive session going. I think automating this might be interesting to add into conda-smithy :) |
Sooo ... i think I got ... something to work! I copied the
I also hard coded the path to GCC in the I will try a full build now, let's see what happens :) @xhochy @hmaarrfk just trying to get a sanity check if you think this makes sense at all? I am really no expert in bazel... |
I think you are on the right track. I figured it was going to be something related to diving into their hard coded paths. A solution might involve symlinking, or patching. I'm very excited to get this working! |
I can find this file also in the tensorflow sources: https://github.com/tensorflow/tensorflow/blob/master/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl We might want to somehow wire it up from there ... |
PS. Building the package now ... let's see how far it goes :) |
This makes sense. Bazel only supports a single compiler for C/C++/CUDA/... Thus if you want to use different compilers for different languages, you need a wrapper script that does the decision. |
Just testing cuda recipes on CIs
My TODO list:
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)