SWDEV-435702 - the functions in bf16 header need to be static
If the compiler decides not to inline these functions, we might break ODR (one definition rule) due to this file being included in multiple files and being linked together
Change-Id: Iacbfdabb53f5b4e5db8c690b23f3730ec9af16c0
[ROCm/clr commit: 77c581a3eb]
Dieser Commit ist enthalten in:
1 Ursprung
70ee947527
Commit
07237ed91d
1 Datei geändert
+2
-2
@@ -94,12 +94,12 @@
|
||||
#include "math_fwd.h" // ocml device functions
|
||||
|
||||
#if defined(__HIPCC_RTC__)
|
||||
#define __HOST_DEVICE__ __device__
|
||||
#define __HOST_DEVICE__ __device__ static
|
||||
#else
|
||||
#include <algorithm>
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
#define __HOST_DEVICE__ __host__ __device__ inline
|
||||
#define __HOST_DEVICE__ __host__ __device__ static inline
|
||||
#endif
|
||||
|
||||
#define HIPRT_ONE_BF16 __float2bfloat16(1.0f)
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren