Summary: Recently AMD moved the "hsa.h" include to "hsa/hsa.h". This causes several warning. This patch checks to see if we can include that one instead. This should hopefully keep things backwards compatible while silencing the warnings.
27 lines
693 B
C
27 lines
693 B
C
//===--- amdgpu/impl/hsa_api.h ------------------------------------ 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef AMDGPU_HSA_API_H_INCLUDED
|
|
#define AMDGPU_HSA_API_H_INCLUDED
|
|
|
|
#if defined(__has_include)
|
|
#if __has_include("hsa/hsa.h")
|
|
#include "hsa/hsa.h"
|
|
#include "hsa/hsa_ext_amd.h"
|
|
#elif __has_include("hsa.h")
|
|
#include "hsa.h"
|
|
#include "hsa_ext_amd.h"
|
|
#endif
|
|
#else
|
|
#include "hsa/hsa.h"
|
|
#include "hsa_ext_amd.h"
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|