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

Add installation instructions through conda #863

Merged
merged 4 commits into from
Nov 19, 2021

Conversation

h-vetinari
Copy link
Contributor

Since merging conda-forge/fairscale-feedstock#2, conda-forge now has fairscale-packages also with GPU support, which I think is good enough to let people know also "officially" through the installation instructions here. :)

While editing the docs, I saw that the formatting of https://github.com/facebookresearch/fairscale/blob/main/docs/source/installation_instructions.rst didn't really work (rst vs. md), so I added some cosmetic touch-ups as I went, as well as the key insight I needed to arrive at for building the GPU packages from source (things fail without setting TORCH_CUDA_ARCH_LIST).

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 19, 2021
@anj-s
Copy link
Contributor

anj-s commented Nov 19, 2021

@h-vetinari thank you for the PR as well as adding support for the conda install! Is there anything we need to do to ensure that we maintain conda installs for FairScale?

@h-vetinari
Copy link
Contributor Author

Glad to hear it!

Is there anything we need to do to ensure that we maintain conda installs for FairScale?

You don't need to do anything, but you're welcome to join as a maintainer of the "feedstock" that contains the recipe for packaging, as well as the CI that executes it (joining as a maintainer would mean you get the rights on that github repo; it's not strictly necessary, normal pull requests work as well). In particular, I'd welcome some help on debugging various issues - currently there are some errors in the test suite on OSX, see conda-forge/fairscale-feedstock#5 (but since 0.4.3 at least, the final package passes the test suite on linux within conda-forge CI).

@min-xu-ai min-xu-ai merged commit 117fc8b into facebookresearch:main Nov 19, 2021
@min-xu-ai
Copy link
Contributor

Thanks for the PR. I merged it in.

We actually don't have any test coverage on OSX. Do you know how big is a user base on OSX that runs GPU based training? I thought virtually nobody does that since I have never encountered a user like that. I do like to have that OS supported but we don't have a test env for it.

In fact, we only test linux. We don't test windows or OSX. Do conda-forge test both windows and osx? From the error you have seen in the other PR, I think pytorch on OSX is also somewhat spotty in terms of coverage. Pytorch on windows seems to be experimental. Any insight from you would be appreciated.

@blefaudeux
Copy link
Contributor

oh wow, this is great, thanks @h-vetinari for all the work on the conda side !

@h-vetinari h-vetinari deleted the conda branch November 20, 2021 01:00
@h-vetinari
Copy link
Contributor Author

We actually don't have any test coverage on OSX. Do you know how big is a user base on OSX that runs GPU based training? I thought virtually nobody does that since I have never encountered a user like that. I do like to have that OS supported but we don't have a test env for it.

Conda-forge does not build GPU-enabled packages for OSX, currently things are CPU only (apple makes it quite hard with their lack of open source support in the graphics stack). Might change in the future, but it's gonna take a while I believe.

In fact, we only test linux. We don't test windows or OSX. Do conda-forge test both windows and osx? From the error you have seen in the other PR, I think pytorch on OSX is also somewhat spotty in terms of coverage. Pytorch on windows seems to be experimental. Any insight from you would be appreciated.

So in principle, conda-forge can support all of: linux-x64, linux-aarch64, linux-ppc64le, osx-x64, osx-arm64, win-x64. The non-x64 linux architectures are obviously still more niche but generally not too hard to support (I haven't gone through this for fairscale yet though; and neither for osx-arm64, where there are no native CI agents available).

Windows and osx on x64 are well-supported in general, the only problem for pytorch is that the builds run into the 6h timeout of the free-for-open-source azure agents, and so the development/iteration on the builds for this is slowed down quite a lot because it takes a conda-forge core member to manually build & upload them.

The long story short is that there are no windows builds for pytorch in conda-forge yet. This is something we'll hopefully fix soon(-ish) though. Once that dependency is there, there's no reason in principle why we couldn't also build (& test) fairscale on windows.

@h-vetinari
Copy link
Contributor Author

oh wow, this is great, thanks @h-vetinari for all the work on the conda side !

Happy to hear it! As I mentioned, you're all welcome to take a look at the feedstock and participate, if you want to have a say in how things are packaged there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants