I am trying to generate precompiled files for packages that are reusable across a number of computers that share a common DEPOT_PATH through a shared filesystem. I would ideally want to precompile package .so and .ji files only once, and reuse those files for all julia installations.
Although my clusters are fairly homogeneous architecture wise, I do have a small number of instruction set architectures that have to coexist.
According to the docs, you can target a number of different targets separated by semicolons, and if I understood correctly, the host machine will take the most suitable ISA inside that precompiled file.
My question is regarding how to set an appropriate value for JULIA_CPU_TARGET. I don’t understand the exact function of all the flags mentioned in the sysimage documentation, such as rdrnd, haswell base(n) and so on.
It appears that the LLVM might be helpful, but as someone without a formal cs background, I’m feel a little bit lost in that document. Do you know any other documents that may explain the basics of LLVM flags for Julia, so as to decide which set of flags has to be put (if at all, maybe just generic may work but I have to test that), and how to determine the compatibility tree of the different instruction set architectures available through JULIA_CPU_TARGET?
Just wanted to leave this link here in case it’s helpful. I had similar questions (but about the automatic package precompilation, not with sysimages, but the process is “similar” )
The upshot is that I also ended up using generic followed by the CPU architectures returned from Sys.CPU_NAME which I crawled on our cluster with a short script, so something like
You might want to add ,clone_all to all variants except the first. Without it, specific variants will one be compiled if they are necessary or estimated to be superior to a generic one. With it, everything will be duplicated for all architectures.