[all-commits] [llvm/llvm-project] 91b9bd: [AMDGPU] Support -mcpu=native for OpenCL

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Thu Jul 13 13:22:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91b9bdeb92562d3030d834489185a10aa8e241ef
      https://github.com/llvm/llvm-project/commit/91b9bdeb92562d3030d834489185a10aa8e241ef
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2023-07-13 (Thu, 13 Jul 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/lib/Driver/ToolChains/AMDGPU.cpp

  Log Message:
  -----------
  [AMDGPU] Support -mcpu=native for OpenCL

When -mcpu=native is specified, try detecting GPU
on the system by using amdgpu-arch tool. If it
fails to detect GPU, emit an error about GPU
not detected. If multiple GPUs are detected,
use the first GPU and emit a warning.

Reviewed by: Matt Arsenault, Fangrui Song

Differential Revision: https://reviews.llvm.org/D154531




More information about the All-commits mailing list