Le jeudi 04 février 2016 à 17:17 -0800, Pavel a écrit :
> I am deploying a CPU-intensive application on Google Cloud Compute
> with Julia code running inside a Docker container. GCloud instances
> have a few different CPU architectures depending on the zone.
> Ideally, I would like to pre-compile Julia images (i.e. different
> docker container images) for all of those architectures.
> 
> Currently the following runs on container launch:
> 
>     include(joinpath(JULIA_HOME, Base.DATAROOTDIR, "julia",
> "build_sysimg.jl"))
>     build_sysimg(joinpath(dirname(Libdl.dlpath("libjulia")),"sys"),
> "native", "/home/juser/jimg.jl", force=true)
> 
> so that the "native" setting pre-compiles for the CPU that these
> commands are running on. That takes time and having that done at the
> container image build time would save cloud runtime.
> 
> Would it be possible to pre-compile for different CPUs on my
> development machine or do I need to run the pre-compilation on those
> exact CPUs? If the former is possible, what build_sysimg arguments
> would help? GCloud virtual machine architectures of interest include
> Sandy Bridge, Ivy Bridge, and Haswell CPU types.
You should be able to build images for older architectures on a machine
with a newer one, i.e. build images for Sandy Bridge and Ivy Bridge on
a Haswell machine. I don't think it would work in the other direction,
since some instructions wouldn't be supported and the code wouldn't
run.

So in your case you could replace "native" with "sandybridge",
"ivybridge", "haswell", or any value from the list printed by
llc -mattr=help.


Regards

Reply via email to