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

Build with pinned llvm-openmp #265

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

xhochy
Copy link
Member

@xhochy xhochy commented May 22, 2024

This will allow people to use scikit-learn with llvm-openmp versions as old as the compiler. This is useful in other conda-builds where llvm-openmp is pinned to the clang version.

I did rerender locally, but no changes were produced.

@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.

Comment on lines +43 to +44
- llvm-openmp # [osx]
- libgomp # [linux]
Copy link
Member

Choose a reason for hiding this comment

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

The same specifications are present in the build section.

Should it be removed for the current on that you propose?

Copy link
Member

@jjerphan jjerphan May 23, 2024

Choose a reason for hiding this comment

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

@xhochy: why mustn't the specification line 28 and line 29 be removed?

Edit: they must be present in this section, see the reasons in the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes! In the perfect world, they would suffice.

Copy link
Member

@jakirkham jakirkham May 23, 2024

Choose a reason for hiding this comment

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

Could we just add the desired pin in build?

Should add I'm confused as to why the requirement in build is not already aligned with the compiler, which it is installed next to

Edit: Maybe an example of the issue encountered would help. Is there one somewhere we can look at?

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 outlined the issue in conda-forge/openmp-feedstock#126 We actually install the desired pin in build but due to conda-builds internal behaviour, the run_exports is still taken from host. Thus, I don't see a solution where we don't add anything to host.

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok. Thank you Uwe! Very helpful 🙂

Wrote up a reply there on what we could consider next: conda-forge/openmp-feedstock#126 (comment)

Agree this is the best we can do for now

@jeremiedbb
Copy link
Contributor

in #241, we dropped these specifications in host because it should happen automatically. Has anything changed since then ?

@xhochy
Copy link
Member Author

xhochy commented May 22, 2024

At least the outcome is that scikit-learn has a llvm-openmp>=1.8.5 dependency at the moment.

@xhochy
Copy link
Member Author

xhochy commented May 22, 2024

Something with the run_exports seems to be not working. On the main build, we have 16.0.6 in build and implicitly(!) 18.1.5 in host. The run_exports are applied with the ones from host though.

@xhochy
Copy link
Member Author

xhochy commented May 22, 2024

Running conda-render on main shows that we add the run_exports of both llvm-openmp instances:

  run:
    - llvm-openmp >=16.0.6
    - llvm-openmp >=18.1.5
 …

@xhochy
Copy link
Member Author

xhochy commented May 22, 2024

It is either a openmp-feedstock or conda-build bug: conda-forge/openmp-feedstock#126 I have added a comment to the duplication in host so that we know why we currently have it.

@xhochy
Copy link
Member Author

xhochy commented May 22, 2024

I did remember this is not the first time I saw this issue on this feedstock: #177

@xhochy
Copy link
Member Author

xhochy commented May 22, 2024

Would you be OK with merging this? I hope I have sufficiently documented the reasoning/bugs.

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you, @xhochy.

This documented workaround is sufficient to me.

I do not think we need to rebuild the previous versions.

I would wait for someone else's opinion before merging.

@xhochy
Copy link
Member Author

xhochy commented May 23, 2024

I do not think we need to rebuild the previous versions.

No, they are mostly open as the change was only recently reverted.

FYI @jakirkham

Comment on lines +43 to +45
# See https://github.com/conda-forge/openmp-feedstock/issues/126
- llvm-openmp # [osx]
- libgomp # [linux]
Copy link
Member

@jakirkham jakirkham May 23, 2024

Choose a reason for hiding this comment

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

Do we need to do something like this (though maybe with tweaks) to better explicitly align versions between build & host?

Suggested change
# See https://github.com/conda-forge/openmp-feedstock/issues/126
- llvm-openmp # [osx]
- libgomp # [linux]
# See https://github.com/conda-forge/openmp-feedstock/issues/126
- llvm-openmp {{ llvm_openmp }} # [osx]
- libgomp {{ libgomp }} # [linux]

Edit: This may need to be done with the compiler versions themselves

Suggested change
# See https://github.com/conda-forge/openmp-feedstock/issues/126
- llvm-openmp # [osx]
- libgomp # [linux]
# See https://github.com/conda-forge/openmp-feedstock/issues/126
- llvm-openmp {{ c_compiler_version }} # [osx]
- libgomp {{ c_compiler_version }} # [linux]

Copy link
Member Author

Choose a reason for hiding this comment

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

No, they are already pinned in .ci_support:

Copy link
Member

Choose a reason for hiding this comment

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

Is that sufficiently pinned for our needs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes!

Copy link
Member

Choose a reason for hiding this comment

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

Sorry. Asking because this is only the major version and wasn't sure if that is enough for the use case that you asked about. If it is, great!

@jakirkham jakirkham merged commit 23ce304 into conda-forge:main May 23, 2024
26 checks passed
@jakirkham
Copy link
Member

Thanks Uwe and Julien! 🙏

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