Scott Todd
Scott Todd
I can take a pass at this, unless someone else wants to. Plan: * Emit a warning if `--iree-llvmcpu-target-cpu` is omitted * (Maybe?) emit a warning if `iree-llvmcpu-target-cpu-features` is omitted...
Can someone clarify why we have all three of these flags? * `--iree-llvmcpu-target-triple` * `--iree-llvmcpu-target-cpu` * `--iree-llvmcpu-target-cpu-features` It seems like the triple could be a superset of the cpu? Is...
More context on `cpu` vs `cpu-features`: * https://github.com/iree-org/iree/pull/15477 * https://github.com/iree-org/iree/pull/15481 * https://github.com/iree-org/iree/pull/15484
Made some progress stepping through the details: * I tried [this resnet50 ONNX model](https://github.com/onnx/models/blob/main/validated/vision/classification/resnet/model/resnet50-v1-12.onnx) with and without `--iree-llvmcpu-target-cpu=host` on my system. I see about 140ms with the flag and 170ms...
@marbre pointed out that for bare metal arm, the target handling is letting some "errors" fall through: https://github.com/iree-org/iree/blob/e19950c4c01b20c329d22e729212d182da9fee76/compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp#L83-L97 https://github.com/iree-org/iree/blob/e19950c4c01b20c329d22e729212d182da9fee76/compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp#L147-L155 Sample logs: https://github.com/iree-org/iree-bare-metal-arm/actions/runs/10923467370/job/30320173426#step:11:262 ``` [158/258] Generating simple_mul_int_bytecode_module_static_c_module_emitc.h, simple_mul_int_bytecode_module_static_c_module.o, simple_mul_int_bytecode_module_static_c_module.h error: Resolution...
More context for my previous comment: https://github.com/iree-org/iree/pull/15387
I noticed that we override the `targetTriple` (`--iree-llvm-target-triple=`) string when using embedded linking: https://github.com/iree-org/iree/blob/e19950c4c01b20c329d22e729212d182da9fee76/compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp#L139-L146 However, we only override _parts_ of the triple, not the full object/string. In particular, that code...
> Does that mean that if you compile on x86_64, your code generated with llvm-cpu won't be compatible with aarch64? Answering my own question - yes. Compiled with embedded linking...
Either way, we could have our docs explain OS, arch, features, etc. OS: matters when using the system linker (for full integration with debug tools). Does not matter with embedded...
Ehhh... we only support the "host" CPU name on x86? https://github.com/iree-org/iree/blob/e19950c4c01b20c329d22e729212d182da9fee76/compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp#L50 The https://github.com/llvm/llvm-project/blob/main/llvm/lib/TargetParser/Host.cpp file supports plenty of other architectures though...