GCC 15 SUP kernel workaround (2)

Previous commit (30c42202d7) for this problem turned off
-ftree-slp-vectorize optimizations for all kernels. Instead, copy
the approach of upstream BLIS commit 36effd70b6a323856d98 and disable
these optimizations only for the affected files by using GCC pragmas

AMD-Internal: [CPUPL-6579]
This commit is contained in:
Smyth, Edward
2025-09-04 17:14:06 +01:00
committed by GitHub
parent 197165318c
commit a4db661b44
10 changed files with 62 additions and 15 deletions

View File

@@ -33,6 +33,13 @@
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2019 - 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2019 - 2025, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -33,6 +33,13 @@
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2022 - 2025, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -33,6 +33,13 @@
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2019 - 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2019 - 2025, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -33,6 +33,13 @@
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2020 - 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2020 - 2025, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -33,6 +33,13 @@
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2021 - 2023, Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2021 - 2025, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -33,6 +33,13 @@
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT

View File

@@ -31,6 +31,14 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT
#include "bli_x86_asm_macros.h"

View File

@@ -32,6 +32,13 @@
*/
// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845).
// Only check for version 15 since this may be fixed in 16, and also make sure the
// compiler isn't clang since it also confusingly defines __GNUC__
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15
#pragma GCC optimize("-fno-tree-slp-vectorize")
#endif
#include "blis.h"
#define BLIS_ASM_SYNTAX_ATT
#include "bli_x86_asm_macros.h"