Comments (2)
I believe the problem is more general than stdlibs, it looks like setting JULIA_CPU_TARGET
always results in compiling code only for the generic target, if we can trust the parsing done by Base.parse_image_targets
and Base.parse_cache_header
. Consider this script
# Cleanup Example precompile dir
example_dir = joinpath(first(Base.DEPOT_PATH), "compiled", "v$(Base.thisminor(Base.VERSION))"[begin:end-2], "Example")
rm(example_dir; force=true, recursive=true)
# Install Example
using Pkg
Pkg.activate(; temp=true, io=devnull)
Pkg.add("Example"; io=stdout)
# Find compile cache
pkg = Base.identify_package("Example")
cachefiles = Base.find_all_in_cache_path(pkg)
isempty(cachefiles) && error(pkg, " has not yet been precompiled for julia ", Base.VERSION, ". Reinstall the package with `Pkg.add(\"Example\"; io=stdout)` to see why")
pkgpath = Base.locate_package(pkg)
idx = findfirst(cachefiles) do cf
Base.stale_cachefile(pkgpath, cf) !== true
end
targets = Base.parse_image_targets(Base.parse_cache_header(cachefiles[idx])[7])
# Show target
@show targets
With Julia v1.10.3 I get
% julia example_targets.jl
targets = Base.ImageTarget[haswell; flags=0; features_en=(sse3, pclmul, ssse3, fma, cx16, sse4.1, sse4.2, movbe, popcnt, aes, xsave, avx, f16c, fsgsbase, bmi, avx2, bmi2, sahf, lzcnt)]
% JULIA_CPU_TARGET='generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1);x86-64-v4,-rdrnd,base(1)' julia example_targets.jl
targets = Base.ImageTarget[generic; flags=0; features_en=(cx16)]
Moreover, shuffling the targets:
% JULIA_CPU_TARGET='sandybridge,-xsaveopt,clone_all;generic;haswell,-rdrnd,base(0);x86-64-v4,-rdrnd,base(0)' julia example_targets.jl
targets = Base.ImageTarget[sandybridge; flags=0; features_en=(sse3, pclmul, ssse3, cx16, sse4.1, sse4.2, popcnt, xsave, avx, sahf)]
So we always compile only for the first target of the list, whatever that is.
CC: @gbaraldi @vchuravy @timholy.
from julia.
That's not too surprising since stdlibs are compiled identically to normal packages.
from julia.
Related Issues (20)
- `make test-all` does not emit error even if test dependencies are missing in stdlib
- Document to use nightly Julia to contribute to the standard library HOT 2
- Over/underflow in complex power function
- Proposed Negation Default Broadcast Behavior HOT 4
- Dotplot not overlaying violin plot HOT 1
- Filenames on Windows in coverage output are missing drive letter HOT 2
- Add ability to specify multiple paths via --code-coverage=@<path>
- ^C inside pkg-add prompt causes assertion abort
- Argument destructuring returned from macro accidentally assigns global
- Potentially erring paths in matrix logarithms HOT 1
- `nm -D --with-symbol-versions` unreliable
- julia1.10.4 using CUDA ERROR: failed to parse TOML output from running "~/.julia/packages/CUDA_Runtime_jll/VNnmC/.pkg/select_artifacts.jl", got: TOML Parser error: none:1:7 error: expected equal sign after key
- Stack overflow during gc_read_stack on win32 HOT 2
- Make an `isdense` trait HOT 8
- `factorize(<:AbstractMatrix)` prefers `Cholesky` but `factorize(<:Hermitian)` prefers `BunchKaufman` HOT 2
- Concurrent program crashes 1.12 nightly build (1.10 is fine) HOT 1
- Intermittent segmentation fault while running CFITSIO tests on nightly HOT 2
- Conversion to pointer not defined for `Base.ReinterpretArray` on v1.11 and above HOT 2
- Julia Rejecting this target due to use of runtime-disabled feature HOT 3
- Package precompilation spinners not erased before running tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from julia.