Target strings on Apache TVM


target string format

tvm.target.Target("llvm -keys=XXX -mcpu=YYY -mtriple=ZZZ")

-mtriple=ZZZ

tvm.target.Target("llvm -keys=cpu         -mcpu=XXX -mtriple=x86_64-pc-linux-gnu")
tvm.target.Target("llvm -keys=cpu         -mcpu=XXX -mtriple=x86_64-pc-windows-gnu")
tvm.target.Target("llvm -keys=arm_cpu,cpu -mcpu=XXX -mtriple=aarch64-linux-gnu")
tvm.target.Target("llvm -keys=arm_cpu,cpu -mcpu=XXX -mtriple=aarch64-linux-android")
tvm.target.Target("llvm -keys=arm_cpu,cpu -mcpu=XXX -mtriple=armv7a-linux-eabi")
tvm.target.Target("llvm -keys=arm_cpu,cpu -mcpu=XXX -mtriple=armv7l-linux-gnueabihf")
tvm.target.Target("llvm -keys=arm_cpu,cpu -mcpu=XXX -mtriple=aarch64-win32-msvc")
tvm.target.Target("llvm -keys=arm_cpu,cpu -mcpu=XXX -mtriple=aarch64-apple-darwin")

attribute

Use -mattr= to set attribute.

tvm.target.Target("llvm -keys=arm_cpu,cpu -mcpu=generic -mtriple=aarch64-linux-gnu -mattr=+neon")

-mcpu=YYY

x86

$ llc-18 -march=x86 -mcpu=help
Available CPUs for this target:

  alderlake               - Select the alderlake processor.
  amdfam10                - Select the amdfam10 processor.
  arrowlake               - Select the arrowlake processor.
  arrowlake-s             - Select the arrowlake-s processor.
  arrowlake_s             - Select the arrowlake_s processor.
  athlon                  - Select the athlon processor.
  athlon-4                - Select the athlon-4 processor.
  athlon-fx               - Select the athlon-fx processor.
  athlon-mp               - Select the athlon-mp processor.
  athlon-tbird            - Select the athlon-tbird processor.
  athlon-xp               - Select the athlon-xp processor.
  athlon64                - Select the athlon64 processor.
  athlon64-sse3           - Select the athlon64-sse3 processor.
  atom                    - Select the atom processor.
  atom_sse4_2             - Select the atom_sse4_2 processor.
  atom_sse4_2_movbe       - Select the atom_sse4_2_movbe processor.
  barcelona               - Select the barcelona processor.
  bdver1                  - Select the bdver1 processor.
  bdver2                  - Select the bdver2 processor.
  bdver3                  - Select the bdver3 processor.
  bdver4                  - Select the bdver4 processor.
  bonnell                 - Select the bonnell processor.
  broadwell               - Select the broadwell processor.
  btver1                  - Select the btver1 processor.
  btver2                  - Select the btver2 processor.
  c3                      - Select the c3 processor.
  c3-2                    - Select the c3-2 processor.
  cannonlake              - Select the cannonlake processor.
  cascadelake             - Select the cascadelake processor.
  clearwaterforest        - Select the clearwaterforest processor.
  cooperlake              - Select the cooperlake processor.
  core-avx-i              - Select the core-avx-i processor.
  core-avx2               - Select the core-avx2 processor.
  core2                   - Select the core2 processor.
  core_2_duo_sse4_1       - Select the core_2_duo_sse4_1 processor.
  core_2_duo_ssse3        - Select the core_2_duo_ssse3 processor.
  core_2nd_gen_avx        - Select the core_2nd_gen_avx processor.
  core_3rd_gen_avx        - Select the core_3rd_gen_avx processor.
  core_4th_gen_avx        - Select the core_4th_gen_avx processor.
  core_4th_gen_avx_tsx    - Select the core_4th_gen_avx_tsx processor.
  core_5th_gen_avx        - Select the core_5th_gen_avx processor.
  core_5th_gen_avx_tsx    - Select the core_5th_gen_avx_tsx processor.
  core_aes_pclmulqdq      - Select the core_aes_pclmulqdq processor.
  core_i7_sse4_2          - Select the core_i7_sse4_2 processor.
  corei7                  - Select the corei7 processor.
  corei7-avx              - Select the corei7-avx processor.
  emeraldrapids           - Select the emeraldrapids processor.
  generic                 - Select the generic processor.
  geode                   - Select the geode processor.
  goldmont                - Select the goldmont processor.
  goldmont-plus           - Select the goldmont-plus processor.
  goldmont_plus           - Select the goldmont_plus processor.
  gracemont               - Select the gracemont processor.
  grandridge              - Select the grandridge processor.
  graniterapids           - Select the graniterapids processor.
  graniterapids-d         - Select the graniterapids-d processor.
  graniterapids_d         - Select the graniterapids_d processor.
  haswell                 - Select the haswell processor.
  i386                    - Select the i386 processor.
  i486                    - Select the i486 processor.
  i586                    - Select the i586 processor.
  i686                    - Select the i686 processor.
  icelake-client          - Select the icelake-client processor.
  icelake-server          - Select the icelake-server processor.
  icelake_client          - Select the icelake_client processor.
  icelake_server          - Select the icelake_server processor.
  ivybridge               - Select the ivybridge processor.
  k6                      - Select the k6 processor.
  k6-2                    - Select the k6-2 processor.
  k6-3                    - Select the k6-3 processor.
  k8                      - Select the k8 processor.
  k8-sse3                 - Select the k8-sse3 processor.
  knl                     - Select the knl processor.
  knm                     - Select the knm processor.
  lakemont                - Select the lakemont processor.
  lunarlake               - Select the lunarlake processor.
  meteorlake              - Select the meteorlake processor.
  mic_avx512              - Select the mic_avx512 processor.
  nehalem                 - Select the nehalem processor.
  nocona                  - Select the nocona processor.
  opteron                 - Select the opteron processor.
  opteron-sse3            - Select the opteron-sse3 processor.
  pantherlake             - Select the pantherlake processor.
  penryn                  - Select the penryn processor.
  pentium                 - Select the pentium processor.
  pentium-m               - Select the pentium-m processor.
  pentium-mmx             - Select the pentium-mmx processor.
  pentium2                - Select the pentium2 processor.
  pentium3                - Select the pentium3 processor.
  pentium3m               - Select the pentium3m processor.
  pentium4                - Select the pentium4 processor.
  pentium4m               - Select the pentium4m processor.
  pentium_4               - Select the pentium_4 processor.
  pentium_4_sse3          - Select the pentium_4_sse3 processor.
  pentium_ii              - Select the pentium_ii processor.
  pentium_iii             - Select the pentium_iii processor.
  pentium_iii_no_xmm_regs - Select the pentium_iii_no_xmm_regs processor.
  pentium_m               - Select the pentium_m processor.
  pentium_mmx             - Select the pentium_mmx processor.
  pentium_pro             - Select the pentium_pro processor.
  pentiumpro              - Select the pentiumpro processor.
  prescott                - Select the prescott processor.
  raptorlake              - Select the raptorlake processor.
  rocketlake              - Select the rocketlake processor.
  sandybridge             - Select the sandybridge processor.
  sapphirerapids          - Select the sapphirerapids processor.
  sierraforest            - Select the sierraforest processor.
  silvermont              - Select the silvermont processor.
  skx                     - Select the skx processor.
  skylake                 - Select the skylake processor.
  skylake-avx512          - Select the skylake-avx512 processor.
  skylake_avx512          - Select the skylake_avx512 processor.
  slm                     - Select the slm processor.
  tigerlake               - Select the tigerlake processor.
  tremont                 - Select the tremont processor.
  westmere                - Select the westmere processor.
  winchip-c6              - Select the winchip-c6 processor.
  winchip2                - Select the winchip2 processor.
  x86-64                  - Select the x86-64 processor.
  x86-64-v2               - Select the x86-64-v2 processor.
  x86-64-v3               - Select the x86-64-v3 processor.
  x86-64-v4               - Select the x86-64-v4 processor.
  yonah                   - Select the yonah processor.
  znver1                  - Select the znver1 processor.
  znver2                  - Select the znver2 processor.
  znver3                  - Select the znver3 processor.
  znver4                  - Select the znver4 processor.

aarch64

$ llc-18 -march=aarch64 -mcpu=help
Available CPUs for this target:

  a64fx           - Select the a64fx processor.
  ampere1         - Select the ampere1 processor.
  ampere1a        - Select the ampere1a processor.
  ampere1b        - Select the ampere1b processor.
  apple-a10       - Select the apple-a10 processor.
  apple-a11       - Select the apple-a11 processor.
  apple-a12       - Select the apple-a12 processor.
  apple-a13       - Select the apple-a13 processor.
  apple-a14       - Select the apple-a14 processor.
  apple-a15       - Select the apple-a15 processor.
  apple-a16       - Select the apple-a16 processor.
  apple-a17       - Select the apple-a17 processor.
  apple-a7        - Select the apple-a7 processor.
  apple-a8        - Select the apple-a8 processor.
  apple-a9        - Select the apple-a9 processor.
  apple-latest    - Select the apple-latest processor.
  apple-m1        - Select the apple-m1 processor.
  apple-m2        - Select the apple-m2 processor.
  apple-m3        - Select the apple-m3 processor.
  apple-s4        - Select the apple-s4 processor.
  apple-s5        - Select the apple-s5 processor.
  carmel          - Select the carmel processor.
  cortex-a34      - Select the cortex-a34 processor.
  cortex-a35      - Select the cortex-a35 processor.
  cortex-a510     - Select the cortex-a510 processor.
  cortex-a520     - Select the cortex-a520 processor.
  cortex-a53      - Select the cortex-a53 processor.
  cortex-a55      - Select the cortex-a55 processor.
  cortex-a57      - Select the cortex-a57 processor.
  cortex-a65      - Select the cortex-a65 processor.
  cortex-a65ae    - Select the cortex-a65ae processor.
  cortex-a710     - Select the cortex-a710 processor.
  cortex-a715     - Select the cortex-a715 processor.
  cortex-a72      - Select the cortex-a72 processor.
  cortex-a720     - Select the cortex-a720 processor.
  cortex-a73      - Select the cortex-a73 processor.
  cortex-a75      - Select the cortex-a75 processor.
  cortex-a76      - Select the cortex-a76 processor.
  cortex-a76ae    - Select the cortex-a76ae processor.
  cortex-a77      - Select the cortex-a77 processor.
  cortex-a78      - Select the cortex-a78 processor.
  cortex-a78c     - Select the cortex-a78c processor.
  cortex-r82      - Select the cortex-r82 processor.
  cortex-x1       - Select the cortex-x1 processor.
  cortex-x1c      - Select the cortex-x1c processor.
  cortex-x2       - Select the cortex-x2 processor.
  cortex-x3       - Select the cortex-x3 processor.
  cortex-x4       - Select the cortex-x4 processor.
  cyclone         - Select the cyclone processor.
  exynos-m3       - Select the exynos-m3 processor.
  exynos-m4       - Select the exynos-m4 processor.
  exynos-m5       - Select the exynos-m5 processor.
  falkor          - Select the falkor processor.
  generic         - Select the generic processor.
  kryo            - Select the kryo processor.
  neoverse-512tvb - Select the neoverse-512tvb processor.
  neoverse-e1     - Select the neoverse-e1 processor.
  neoverse-n1     - Select the neoverse-n1 processor.
  neoverse-n2     - Select the neoverse-n2 processor.
  neoverse-v1     - Select the neoverse-v1 processor.
  neoverse-v2     - Select the neoverse-v2 processor.
  saphira         - Select the saphira processor.
  thunderx        - Select the thunderx processor.
  thunderx2t99    - Select the thunderx2t99 processor.
  thunderx3t110   - Select the thunderx3t110 processor.
  thunderxt81     - Select the thunderxt81 processor.
  thunderxt83     - Select the thunderxt83 processor.
  thunderxt88     - Select the thunderxt88 processor.
  tsv110          - Select the tsv110 processor.

RV32

$ llc-18 -march=riscv32 -mcpu=help
Available CPUs for this target:

  generic             - Select the generic processor.
  generic-rv32        - Select the generic-rv32 processor.
  generic-rv64        - Select the generic-rv64 processor.
  rocket              - Select the rocket processor.
  rocket-rv32         - Select the rocket-rv32 processor.
  rocket-rv64         - Select the rocket-rv64 processor.
  sifive-7-series     - Select the sifive-7-series processor.
  sifive-e20          - Select the sifive-e20 processor.
  sifive-e21          - Select the sifive-e21 processor.
  sifive-e24          - Select the sifive-e24 processor.
  sifive-e31          - Select the sifive-e31 processor.
  sifive-e34          - Select the sifive-e34 processor.
  sifive-e76          - Select the sifive-e76 processor.
  sifive-p450         - Select the sifive-p450 processor.
  sifive-p670         - Select the sifive-p670 processor.
  sifive-s21          - Select the sifive-s21 processor.
  sifive-s51          - Select the sifive-s51 processor.
  sifive-s54          - Select the sifive-s54 processor.
  sifive-s76          - Select the sifive-s76 processor.
  sifive-u54          - Select the sifive-u54 processor.
  sifive-u74          - Select the sifive-u74 processor.
  sifive-x280         - Select the sifive-x280 processor.
  syntacore-scr1-base - Select the syntacore-scr1-base processor.
  syntacore-scr1-max  - Select the syntacore-scr1-max processor.
  veyron-v1           - Select the veyron-v1 processor.
  xiangshan-nanhu     - Select the xiangshan-nanhu processor.

RV64

$ llc-18 -march=riscv64 -mcpu=help
Available CPUs for this target:

  generic             - Select the generic processor.
  generic-rv32        - Select the generic-rv32 processor.
  generic-rv64        - Select the generic-rv64 processor.
  rocket              - Select the rocket processor.
  rocket-rv32         - Select the rocket-rv32 processor.
  rocket-rv64         - Select the rocket-rv64 processor.
  sifive-7-series     - Select the sifive-7-series processor.
  sifive-e20          - Select the sifive-e20 processor.
  sifive-e21          - Select the sifive-e21 processor.
  sifive-e24          - Select the sifive-e24 processor.
  sifive-e31          - Select the sifive-e31 processor.
  sifive-e34          - Select the sifive-e34 processor.
  sifive-e76          - Select the sifive-e76 processor.
  sifive-p450         - Select the sifive-p450 processor.
  sifive-p670         - Select the sifive-p670 processor.
  sifive-s21          - Select the sifive-s21 processor.
  sifive-s51          - Select the sifive-s51 processor.
  sifive-s54          - Select the sifive-s54 processor.
  sifive-s76          - Select the sifive-s76 processor.
  sifive-u54          - Select the sifive-u54 processor.
  sifive-u74          - Select the sifive-u74 processor.
  sifive-x280         - Select the sifive-x280 processor.
  syntacore-scr1-base - Select the syntacore-scr1-base processor.
  syntacore-scr1-max  - Select the syntacore-scr1-max processor.
  veyron-v1           - Select the veyron-v1 processor.
  xiangshan-nanhu     - Select the xiangshan-nanhu processor.