I’m looking into adjusting JULIA_CPU_TARGET for a container deployed on AWS, and think I’m close to understanding it.
These threads have helped:
- Understanding JULIA_CPU_TARGET
- Questions about JULIA_CPU_TARGET
- Arm64 julia/docker on AWS EC2: cpu target recommendations
A few remaining questions:
- When a target is using a prior target as a base, is there a way to know what functions it has compiled specifically for that target vs. using the base target? To determine what, if any, benefit the specific target might be providing.
- Is there any way to compare versions of a function compiled for different targets to see what the differences are?
- Is the only downside of
base(i)overclone_allthat the compiler might decide wrongly about whether code would benefit under a new target? And vice versa, the only downside ofclone_allthat the compiled images significantly grow in size, and take longer to compile? - Is there a way to know which of those would be selected when executing on a given machine?
To partly answer my fourth question, it seems the only place where an easy check for match in Julia occurs is in the C function jl_check_pkgimage_clones, which in turn uses pkgimg_init_cb, which returns the index of the matching image. But this value is not returned to Julia; just a rejection message, if it was rejected, or nothing. And pkgimg_init_cb isn’t exposed externally. Is that the only way? (Aside: would a PR to expose this value be welcome?)