================ @@ -0,0 +1,105 @@ +//===- InstrProfilingPlatformROCmHSADefs.h - mirrored HSA decls ----------===// +// +// 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 +// +//===----------------------------------------------------------------------===// +// +// Minimal HSA type/enum/function-pointer declarations used by the Linux-only +// supplemental HSA drain (InstrProfilingPlatformROCmHSA.cpp). compiler-rt +// cannot depend on the ROCm headers at build time, and the runtime dlopens +// libhsa-runtime64.so rather than linking it, so the handful of declarations +// the drain needs are mirrored here under a prof_hsa_* prefix. +// +// Values mirror hsa/hsa.h and hsa/hsa_ven_amd_loader.h. These are part of HSA's +// stable, versioned C ABI (libhsa-runtime64.so.1), so they do not shift. When +// the real ROCm headers are available at build time the mirror is cross-checked +// against them with static_asserts (see PROFILE_VERIFY_HSA_ABI in +// InstrProfilingPlatformROCmHSA.cpp); update both together if HSA ever changes. +// +//===----------------------------------------------------------------------===// + +#ifndef PROFILE_INSTRPROFILINGPLATFORMROCMHSADEFS_H +#define PROFILE_INSTRPROFILINGPLATFORMROCMHSADEFS_H + +#include <stddef.h> +#include <stdint.h> + +typedef uint32_t prof_hsa_status_t; +#define PROF_HSA_STATUS_SUCCESS ((prof_hsa_status_t)0x0) +#define PROF_HSA_STATUS_INFO_BREAK ((prof_hsa_status_t)0x1) + +typedef struct { ---------------- lfmeadow wrote:
Perhaps a follow-on PR? https://github.com/llvm/llvm-project/pull/203056 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
