# Clarifications on JULIA\_CPU\_TARGET

**URL:** <https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807>\
**Category:** General Usage\
**Tags:** precompilation, compiler\
**Created:** [December 30, 2025, 4:30pm UTC](https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807 "2025-12-30T16:30:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [December 30, 2025, 4:30pm UTC](https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807/1 "2025-12-30T16:30:29Z")

</div>

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](https://discourse.julialang.org/t/understanding-julia-cpu-target/116774)
- [Questions about JULIA\_CPU\_TARGET](https://discourse.julialang.org/t/questions-about-julia-cpu-target/125339)
- [Arm64 julia/docker on AWS EC2: cpu target recommendations](https://discourse.julialang.org/t/arm64-julia-docker-on-aws-ec2-cpu-target-recommendations/115776)

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?)

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [January 14, 2026, 3:59pm UTC](https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807/2 "2026-01-14T15:59:05Z")

</div>

Since we’re past the holidays, bumping in hopes of drawing feedback 🙂
