highway icon indicating copy to clipboard operation
highway copied to clipboard

FR: avoid "unknown" in list_targets

Open eustas opened this issue 11 months ago • 1 comments

Here is what I see, when I build libjxl on s390x:

Compiled HWY_TARGETS:   EMU128
HWY_ATTAINABLE_TARGETS: EMU128
HWY_BASELINE_TARGETS:   EMU128
HWY_STATIC_TARGET:      EMU128
HWY_BROKEN_TARGETS:    
HWY_DISABLED_TARGETS:   Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown
Current CPU supports:   Z15 Z14 EMU128 SCALAR

There is a long list in disabled targets and no clues why Z14 / Z15 are not compiled.

eustas avatar Jan 16 '25 11:01 eustas

Thanks for raising this. The Unknown are because TargetName only returns a string when HWY_ARCH* matches the architecture of that target. I see that JPEG XL defines 8 non-S390 targets in HWY_DISABLED_TARGET. That almost explains this: we have 9x Unknown here.

I suppose we can remove those #if to print the actual target names, would that help?

As to building Z14/Z15: this requires Clang 19(!) or GCC 9. Note also that HWY_ATTAINABLE_S390X is gated on #if HWY_ARCH_S390X && HWY_BASELINE_Z14 != 0. Would you like to try changing the second condition to HWY_HAVE_RUNTIME_DISPATCH? Otherwise, we'd have to build with the Z14 flags.

HTH?

jan-wassenberg avatar Jan 17 '25 10:01 jan-wassenberg