[all-commits] [llvm/llvm-project] 6bef34: [TargetParser] Add a list of Intel GPUs, and use i...

Nikita Kornev via All-commits all-commits at lists.llvm.org
Thu Sep 24 08:55:43 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6bef34a7ebbef9b11654aef83c8fbc1b0dc16860
      https://github.com/llvm/llvm-project/commit/6bef34a7ebbef9b11654aef83c8fbc1b0dc16860
  Author: Nikita Kornev <nikita.kornev at intel.com>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    M clang/tools/offload-arch/CMakeLists.txt
    M clang/tools/offload-arch/LevelZeroArch.cpp
    M clang/unittests/offload-arch/CMakeLists.txt
    M clang/unittests/offload-arch/OffloadArchTest.cpp
    A llvm/include/llvm/TargetParser/IntelGPUTargetParser.def
    A llvm/include/llvm/TargetParser/IntelGPUTargetParser.h
    M llvm/include/module.modulemap
    M llvm/lib/TargetParser/CMakeLists.txt
    A llvm/lib/TargetParser/IntelGPUTargetParser.cpp
    M llvm/unittests/TargetParser/CMakeLists.txt
    A llvm/unittests/TargetParser/IntelGPUTargetParserTest.cpp

  Log Message:
  -----------
  [TargetParser] Add a list of Intel GPUs, and use it in offload-arch (#222072)

Currently offload-arch prints Intel GPU identifiers like "Intel(R) Data
Center GPU Max 1100" which are not legal values for clang's
--offload-arch option.

Print an architecture name instead, e.g. "xe-pvc". The driver reports a
GPU IP version, the GMDID, for every device. Add a table that maps a
GMDID to a name, and look the device up in it. A device that is missing
from the table is printed by its numeric version, e.g. "xe_35.11.0". A
device whose driver does not report a GMDID is skipped.

The table goes in llvm/TargetParser, next to the other GPU lists,
because other tools need it too. Some of them are LLVM libraries, which
cannot include a clang header.

Every row of IntelGPUTargetParser.def holds a name that --offload-arch
accepts, the major and minor components of the GMDID that the device
reports, and the IGCA (Intel Graphics Compute Architecture) target and
feature sets that the name maps to. The revision component is left out,
so every revision of a device gets the same name. A few names, such as
xe-dg2, cover a whole product line. No device reports a GMDID for those,
so offload-arch never prints them.

The header declares only the functions that offload-arch needs. More
will follow when something needs them.

---------

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list