Repository navigation
Resolve host CPU to generic outside of x86 - #15481
Conversation
|
I wonder if it would make more sense to just emit an error here or at least some kind of warning. It will very surprising/confusing to the user if the pass |
The problem is, because of JitGlobals, the warning would trigger on every run. Maybe I can change that to keep |
a4822ba to
a74dd0e
Compare
|
Does this PR try to resolve the |
|
I have updated this PR with what I feel is the best we can do here. I can't just leave Again the current state is that This is not specifically about RISC-V. I'm running into this on Arm here. Also not explicitly using the flag here. But JitGlobals is causing this to be implicitly used, internally. |
If it's so "marginally" used/valuable... why don't we just remove it :) |
I'm not saying that |
Following iree-org#15477, `cpu` is treated as a x86-only thing, except for the special value `host` that gets resolved to the actual host CPU and CPU features. JitGlobals creates a host target, that gets resolved accordingly. The resolved CPU is then recorded in a `hal.devices.targets` attribute. If the CPU field is set to the actual host CPU identifier there, then that will trigger the error message about that being a x86-only thing: ``` error: Resolution of target CPU to target CPU features is not implemented on this target architecture. Pass explicit CPU features instead of a CPU on this architecture, or implement that. ``` So this needs to be left empty in that case. No functional difference, as that CPU is just ignored anyway (which is what the error message is about).
Following #15477,
cpuis treated as a x86-only thing, except for the special valuehostthat gets resolved to the actual host CPU and CPU features.JitGlobals creates a host target, that gets resolved accordingly. The resolved CPU is then recorded in a
hal.devices.targetsattribute. If the CPU field is set to the actual host CPU identifier there, then that will trigger the error message about that being a x86-only thing:So this needs to be set to "generic" in that case. No functional difference, as that CPU is just ignored anyway (which is what the error message is about).