Skip to content

Conversation

@staticfloat
Copy link
Member

This alters CompilerSupportLibraries_jll, OpenBLAS_jll and libblastrampoline_jll to use LazyLibrary objects and thereby be loaded only upon first dlopen() or ccall() to the individual library objects. Note that this is one of the more complicated cases, as libblastrampoline must have OpenBLAS_jll added as a dynamic dependency (as it does not actually have it listed in its shared object headers) and also has some on-load callbacks that must be invoked.

This must be paired with the appropriate base Julia changes [0].

[0] JuliaLang/julia#57719

staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 11, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 11, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 11, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 11, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 12, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 12, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 12, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 12, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 12, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 12, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

This must be paired with the appropriate base Julia changes [0].

[0] JuliaLang/julia#57719
This ensures that our LazyLibrary code, (which makes one allocation)
does not fail these tests.  Some of these `@allocations` checks had
already included warm-up code, this simply expands that to the rest that
I could find.
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 13, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 15, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 16, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
@staticfloat staticfloat merged commit 1ce8426 into master Mar 16, 2025
0 of 2 checks passed
@staticfloat staticfloat deleted the sf/lazy_jlls branch March 16, 2025 21:06
staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 16, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

This must be paired with the appropriate `LinearAlgebra.jl` changes [0].

[0] JuliaLang/LinearAlgebra.jl#1235
@ViralBShah
Copy link
Member

Should this backport to 1.12

@staticfloat
Copy link
Member Author

Yes, assuming the base PR also gets back ported

staticfloat added a commit to JuliaLang/julia that referenced this pull request Mar 16, 2025
This alters CompilerSupportLibraries_jll, OpenBLAS_jll and
libblastrampoline_jll to use `LazyLibrary` objects and thereby be loaded
only upon first `dlopen()` or `ccall()` to the individual library
objects.  Note that this is one of the more complicated cases, as
`libblastrampoline` must have OpenBLAS_jll added as a dynamic dependency
(as it does not actually have it listed in its shared object headers)
and also has some on-load callbacks that must be invoked.

Long-term, I would like to replace the bespoke JLLs here with actual JLL
source code, and vendor a version of `LazyJLLWrappers` in-tree to do the
actual code generation even for Base.  That is left as future work.

[0] JuliaLang/LinearAlgebra.jl#1235
@ViralBShah ViralBShah added the backport 1.12 Change should be backported to release-1.12 label Mar 19, 2025
@ViralBShah
Copy link
Member

ViralBShah commented Mar 19, 2025

Marked for backport to 1.12 since the Julia PR also is.

cc @KristofferC

@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Mar 26, 2025
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.

3 participants