llvm/clang/tools/nvptx-arch/NVPTXArch.cpp

//===- NVPTXArch.cpp - list installed NVPTX devies ------*- 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 CUDA gpus installed in the
// system.
//
//===----------------------------------------------------------------------===//

#include "clang/Basic/Version.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/Error.h"
#include <cstdint>
#include <cstdio>
#include <memory>

usingnamespacellvm;

static cl::opt<bool> Help("h", cl::desc("Alias for -help"), cl::Hidden);

static void PrintVersion(raw_ostream &OS) {}
// Mark all our options with this category, everything else (except for -version
// and -help) will be hidden.
static cl::OptionCategory NVPTXArchCategory("nvptx-arch options");

CUresult;

CUdevice_attribute;

CUdevice;

CUresult (*cuInit)(unsigned int);
CUresult (*cuDeviceGetCount)(int *);
CUresult (*cuGetErrorString)(CUresult, const char **);
CUresult (*cuDeviceGet)(CUdevice *, int);
CUresult (*cuDeviceGetAttribute)(int *, CUdevice_attribute, CUdevice);

constexpr const char *DynamicCudaPath =;

llvm::Error loadCUDA() {}

static int handleError(CUresult Err) {}

int main(int argc, char *argv[]) {}