//===- AMDGPUArch.cpp - list AMDGPU installed ----------*- C++ -*---------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file implements a tool for detecting name of AMDGPU installed in system. // This tool is used by AMDGPU OpenMP and HIP driver. // //===----------------------------------------------------------------------===// #include "clang/Basic/Version.h" #include "llvm/Support/CommandLine.h" usingnamespacellvm; static cl::opt<bool> Help("h", cl::desc("Alias for -help"), cl::Hidden); // Mark all our options with this category. static cl::OptionCategory AMDGPUArchCategory("amdgpu-arch options"); static void PrintVersion(raw_ostream &OS) { … } int printGPUsByHSA(); int printGPUsByHIP(); int main(int argc, char *argv[]) { … }