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

Fixup third_party references #6

Merged
merged 3 commits into from
May 28, 2023

Conversation

Tobias-Fischer
Copy link
Contributor

@Tobias-Fischer Tobias-Fischer commented May 6, 2023

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-webservices
Copy link

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) and found it was in an excellent condition.

@Tobias-Fischer
Copy link
Contributor Author

@conda-forge-admin, please rerender

@Tobias-Fischer
Copy link
Contributor Author

Tobias-Fischer commented May 6, 2023

With these changes, I can successfully compile the following test:

import torch
def fn(x):
    a = torch.cos(x).cuda()
    return a+1

input_tensor = torch.randn(10000).to(device="cuda:0")
new_fn = torch.compile(fn, backend="inductor")
a = new_fn(input_tensor)

print(a)

While it fails without the changes.

My big question mark is which package we need to add to the run dependencies to get the required ptxas and libdevice.10.bc- there have been some recent changes (see below) that I don't fully understand. To get my environment to work, I installed the cudatoolkit etc. from the nvidia channel.

See conda-forge/pytorch-cpu-feedstock#166
conda-forge/cudatoolkit-feedstock#62
conda-forge/staged-recipes#21382

/cc @jakirkham @h-vetinari @hmaarrfk

@Tobias-Fischer

This comment was marked as outdated.

Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

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

This is great! :)

A nit about how the patches are checked in, for the run-requirements I'm hoping we can get some insights from @jakirkham / @leofang / @adibbley

recipe/meta.yaml Show resolved Hide resolved
recipe/patches/0006-remove-third-party-references.patch Outdated Show resolved Hide resolved
recipe/activate.sh Outdated Show resolved Hide resolved
@Tobias-Fischer
Copy link
Contributor Author

It would be great if you could have another look @h-vetinari @hmaarrfk.

Also @jakirkham / @leofang / @adibbley it would be amazing if you could have a look to let us know which cuda packages are needed for ptxas.

@h-vetinari
Copy link
Member

which cuda packages are needed for ptxas.

This was answered in the CUDA build order thread. It should be in the CUDA compiler package (though it might still get sliced up a bit differently)

recipe/meta.yaml Outdated Show resolved Hide resolved
@jakirkham
Copy link
Member

which cuda packages are needed for ptxas.

This was answered in the CUDA build order thread. It should be in the CUDA compiler package (though it might still get sliced up a bit differently)

Indeed. xref: conda-forge/staged-recipes#21382 (comment)

A nit about how the patches are checked in, for the run-requirements I'm hoping we can get some insights from

Think I've missed the question here. Please let us know what you are looking for feedback on

@Tobias-Fischer
Copy link
Contributor Author

Hi @h-vetinari - now that we pushed faiss over the line, do you think we can move forward here as well?

I think the only thing left here is that cudatoolkit on conda-forge does not contain the ptxas binary at the moment. However, the migration to the new cuda stuff will probably take quite some time (just guessing here). This PR only makes things better, and enables at least some users to use the new triton, whereas it's broken at the moment without the PR.

It would be great if we could merge here, and then open an issue that keeps track of the cuda migrations.

@h-vetinari
Copy link
Member

Can you please confirm you're the author on all the patches you've added with your attribution, or point to the exact upstream PRs commits where they're taken from?

@h-vetinari
Copy link
Member

OK, I'm fine to leave the cudatoolkit as a run-dep until we get the new infrastructure. I've also looked more closely and all patches seem to be coming from you (perhaps I misremembered from another PR where some were taken from unreleased upstream commits).

Basically, this LGTM. Any last comments @hmaarrfk?

@Tobias-Fischer
Copy link
Contributor Author

Can you please confirm you're the author on all the patches you've added with your attribution, or point to the exact upstream PRs commits where they're taken from?

Confirmed :)

Tobias-Fischer and others added 3 commits May 25, 2023 15:36
* Search directly in CONDA_PREFIX/lib for the libdevice library

* use cuda toolkit for now
Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot @Tobias-Fischer (I cleaned up the churn in the commit history a bit to avoid having to squash everything, hope that's OK; if not feel free to force-push your own cleaned up history)

@hmaarrfk, I'm planning to merge this in ~24h, unless of course you have other comments or need some more time to review here - please let us know!

@Tobias-Fischer
Copy link
Contributor Author

LGTM, thanks a lot @Tobias-Fischer (I cleaned up the churn in the commit history a bit to avoid having to squash everything, hope that's OK; if not feel free to force-push your own cleaned up history)

Yes that's great, thanks a lot!

@Tobias-Fischer
Copy link
Contributor Author

Kind ping @h-vetinari @hmaarrfk :)

@hmaarrfk hmaarrfk merged commit 0f78fc7 into conda-forge:main May 28, 2023
@hmaarrfk
Copy link
Contributor

Thank you all!

@Tobias-Fischer Tobias-Fischer deleted the fix_third_party branch May 28, 2023 18:20
@h-vetinari
Copy link
Member

h-vetinari commented May 28, 2023

Kind ping @h-vetinari @hmaarrfk :)

I knew I had wanted to merge something, but had forgotten which PR 😂
Sorry about the delay, and thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants