include/hip/hip_bfloat16.h Source File

include/hip/hip_bfloat16.h Source File#

HIP Runtime API Reference: include/hip/hip_bfloat16.h Source File
hip_bfloat16.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
11#ifndef _HIP_BFLOAT16_H_
12#define _HIP_BFLOAT16_H_
13
14#if !defined(__HIPCC_RTC__)
15#include <hip/hip_common.h>
16#endif
17
18#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
19#include <hip/amd_detail/amd_hip_bfloat16.h>
20#elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
21#warning "hip_bfloat16.h is not supported on nvidia platform"
22#else
23#error ("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
24#endif
25
26#endif // _HIP_BFLOAT16_H_