Skip to content

Commit

Permalink
Work around windows/osx gcc12 x86_64 tree-optimizer problem and add a…
Browse files Browse the repository at this point in the history
…n osx/gcc12 build to Azure CI (#3745)

Add pragma to disable the gcc tree-optimizer for some x86_64 S and Z kernels with gcc12 on OSX or Windows
  • Loading branch information
martin-frbg authored Sep 3, 2022
1 parent 93a6e5f commit 739c3c4
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 12 deletions.
8 changes: 8 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ jobs:
brew update
make USE_THREADS=0 CC=gcc-10 FC=gfortran-10
- job: OSX_GCC12
pool:
vmImage: 'macOS-latest'
steps:
- script: |
brew update
make CC=gcc-12 FC=gfortran-12
- job: OSX_OpenMP_Clang
pool:
vmImage: 'macOS-10.15'
Expand Down
5 changes: 4 additions & 1 deletion kernel/x86_64/sgemv_n_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/


#include "common.h"

#if (defined(OS_DARWIN) || defined(OS_WINDOWS)) && (defined(__GNUC__) && __GNUC__ > 11)
#pragma GCC optimize("no-tree-vectorize")
#endif


#if defined(BULLDOZER) || defined(PILEDRIVER) || defined(STEAMROLLER) || defined(EXCAVATOR)
#include "sgemv_n_microk_bulldozer-4.c"
Expand Down
5 changes: 4 additions & 1 deletion kernel/x86_64/sgemv_t_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/


#include "common.h"

#if (defined(OS_DARWIN) || defined(OS_WINDOWS)) && (defined(__GNUC__) && __GNUC__ > 11)
#pragma GCC optimize("no-tree-vectorize")
#endif

#if defined(NEHALEM)
#include "sgemv_t_microk_nehalem-4.c"
#elif defined(BULLDOZER) || defined(PILEDRIVER) || defined(STEAMROLLER) || defined(EXCAVATOR)
Expand Down
5 changes: 4 additions & 1 deletion kernel/x86_64/ssymv_L.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/


#include "common.h"

#if (defined(OS_DARWIN) || defined(OS_WINDOWS)) && (defined(__GNUC__) && __GNUC__ > 11)
#pragma GCC optimize("no-tree-vectorize")
#endif

#if defined(BULLDOZER) || defined(PILEDRIVER) || defined(STEAMROLLER) || defined(EXCAVATOR)
#include "ssymv_L_microk_bulldozer-2.c"
#elif defined(NEHALEM)
Expand Down
5 changes: 4 additions & 1 deletion kernel/x86_64/ssymv_U.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/


#include "common.h"

#if (defined(OS_DARWIN) || defined(OS_WINDOWS)) && (defined(__GNUC__) && __GNUC__ > 11)
#pragma GCC optimize("no-tree-vectorize")
#endif


#if defined(BULLDOZER) || defined(PILEDRIVER) || defined(STEAMROLLER) || defined(EXCAVATOR)
#include "ssymv_U_microk_bulldozer-2.c"
Expand Down
4 changes: 3 additions & 1 deletion kernel/x86_64/zdot.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/


#include "common.h"

#if (defined(OS_DARWIN) || defined(OS_WINDOWS)) && (defined(__GNUC__) && __GNUC__ > 11)
#pragma GCC optimize("no-tree-vectorize")
#endif

#if defined(BULLDOZER)
#include "zdot_microk_bulldozer-2.c"
Expand Down
9 changes: 3 additions & 6 deletions kernel/x86_64/zgemv_n_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/

#include <stdlib.h>
#include <stdio.h>
#include "common.h"

#if (defined(OS_DARWIN) || defined(OS_WINDOWS)) && (defined(__GNUC__) && __GNUC__ > 11)
#pragma GCC optimize("no-tree-vectorize")
#endif

#if defined(HASWELL) || defined(ZEN) || defined (SKYLAKEX) || defined (COOPERLAKE) || defined (SAPPHIRERAPIDS)
#include "zgemv_n_microk_haswell-4.c"
Expand Down Expand Up @@ -231,10 +232,6 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha_r,FLOAT alpha_i,
FLOAT xbuffer[8],*ybuffer;


#if 0
printf("%s %d %d %.16f %.16f %d %d %d\n","zgemv_n",m,n,alpha_r,alpha_i,lda,inc_x,inc_y);
#endif

if ( m < 1 ) return(0);
if ( n < 1 ) return(0);

Expand Down
4 changes: 3 additions & 1 deletion kernel/x86_64/zgemv_t_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/


#include "common.h"

#if (defined(OS_DARWIN) || defined(OS_WINDOWS)) && (defined(__GNUC__) && __GNUC__ > 11)
#pragma GCC optimize("no-tree-vectorize")
#endif

#if defined(BULLDOZER) || defined(PILEDRIVER) || defined(STEAMROLLER) || defined(EXCAVATOR)
#include "zgemv_t_microk_bulldozer-4.c"
Expand Down

0 comments on commit 739c3c4

Please sign in to comment.