//===- Utils.cpp - MLIR ROCDL target utils ----------------------*- 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 files defines ROCDL target related utility classes and functions. // //===----------------------------------------------------------------------===// #include "mlir/Target/LLVM/ROCDL/Utils.h" #include "mlir/Dialect/GPU/IR/GPUDialect.h" #include "mlir/Dialect/LLVMIR/ROCDLDialect.h" #include "llvm/ADT/StringMap.h" #include "llvm/Frontend/Offloading/Utility.h" usingnamespacemlir; usingnamespacemlir::ROCDL; std::optional<DenseMap<StringAttr, NamedAttrList>> mlir::ROCDL::getAMDHSAKernelsELFMetadata(Builder &builder, ArrayRef<char> elfData) { … } gpu::KernelTableAttr mlir::ROCDL::getKernelMetadata(Operation *gpuModule, ArrayRef<char> elfData) { … }