Clarifications on JULIA_CPU_TARGET

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:

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) over clone_all that the compiler might decide wrongly about whether code would benefit under a new target? And vice versa, the only downside of clone_all that 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?)

1 Like