flame / blis

BLAS-like Library Instantiation Software Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integrate armsve in arm64 family : runtime detection and kernel selection

egaudry opened this issue · comments

I believe the current arm64 config option will not include the armsve kernels.

configure: configuration 'arm64' is registered.
configure: 'arm64' is defined as having the following sub-configurations:
configure:    firestorm thunderx2 cortexa57 cortexa53 generic
configure: which collectively require the following kernels:
configure:    armv8a generic
configure: checking sub-configurations:
configure:   'firestorm' is registered...and exists.
configure:   'thunderx2' is registered...and exists.
configure:   'cortexa57' is registered...and exists.
configure:   'cortexa53' is registered...and exists.
configure:   'generic' is registered...and exists.

With new processors getting on the market, with SVE, it might be interesting to include the armsve optimization in the arm64 family, and to support the detection of sve at runtime.

@devinamatthews @jeffhammond

@xrq-phys @fgvanzee IIRC the previous problem with including armsve in arm64 was the need to use newer compilers? I think this is fixed now with clang/gcc version detection, right?

Unsure about version detection, but if it's OK (metaconfig excludes non-supported subconfigs), we can do the following to add armsve to the arm64 line in config_registry:

  • Change #if (defined(BLIS_FAMILY_ARMSVE) && !defined(BLIS_FAMILY_A64FX)) conditions to always true.
  • Add a non-SVE early return to config/armsve/bli_cntx_init_armsve.c. (e.g. by using this patch)

Confirmed working. Raising PR.