CPU Targets for Precompilation

Is there a way to pass CPU targets to ITensor.compile(), as can be done with the cpu_target argument to PackageCompiler.create_sysimage()? (relevant source: PackageCompiler.jl-create_sysimage)

I encountered an error similar to Question for use ITensor compile() in shell when running my code on a cluster, since the architecture of some nodes is casecadelake and icelake for others (the sysimage was compiled on a node with icelake architecture). I was hoping to be able to change the target, as mentioned in this Julia doc.

Alternatively, if I could determine where the source code of the ITensors.compile function is, I would be happy to add this as an additional argument and push it back, if that might be of broader use.

That sounds reasonable, though honestly I’m starting to regret that we defined ITensor.compile at all, it is just a simple wrapper around PackageCompiler.create_sysimage that calls a script that runs DMRG, it is easy enough to just call PackageCompiler.create_sysimage directly and get all of the customizability you need from that.

Thank you! I suspected as much, but I am grateful for the confirmation nonetheless. Would you happen to know the filename of the script? I can look for it either on GitHub or my local ITensor installation. Thanks!

The implementation is here: ITensorMPS.jl/ext/ITensorMPSPackageCompilerExt at v0.3.7 · ITensor/ITensorMPS.jl · GitHub.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.