Skip to content

Commit 326469e

Browse files
authored
Merge pull request #3042 from martin-frbg/develop
Move FMA3 option setting to the kernel makefile
2 parents b26e32c + c73d8ee commit 326469e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Makefile.x86_64

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ CCOMMON_OPT += -mavx2
3232
FCOMMON_OPT += -mavx2
3333
endif
3434
endif
35-
ifndef OLDGCC
36-
ifdef HAVE_FMA3
37-
CCOMMON_OPT += -mfma
38-
FCOMMON_OPT += -mfma
39-
endif
40-
endif
4135

4236
ifeq ($(CORE), SKYLAKEX)
4337
ifndef DYNAMIC_ARCH

kernel/Makefile.L1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
FMAFLAG=
2+
ifndef OLDGCC
3+
ifdef HAVE_FMA3
4+
FMAFLAG = -mfma
5+
endif
6+
endif
7+
8+
19
### AMAX ###
210

311
ifndef SAMAXKERNEL
@@ -828,10 +836,10 @@ $(KDIR)xnrm2_k$(TSUFFIX).$(SUFFIX) $(KDIR)xnrm2_k$(TPSUFFIX).$(PSUFFIX) : $(KE
828836
$(CC) $(CFLAGS) -DCOMPLEX -c -DXDOUBLE $< -o $@
829837

830838
$(KDIR)srot_k$(TSUFFIX).$(SUFFIX) $(KDIR)srot_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(SROTKERNEL)
831-
$(CC) -c $(CFLAGS) -UCOMPLEX -UCOMPLEX -UDOUBLE $< -o $@
839+
$(CC) -c $(CFLAGS) $(FMAFLAG) -UCOMPLEX -UCOMPLEX -UDOUBLE $< -o $@
832840

833841
$(KDIR)drot_k$(TSUFFIX).$(SUFFIX) $(KDIR)drot_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(DROTKERNEL)
834-
$(CC) -c $(CFLAGS) -UCOMPLEX -UCOMPLEX -DDOUBLE $< -o $@
842+
$(CC) -c $(CFLAGS) $(FMAFLAG) -UCOMPLEX -UCOMPLEX -DDOUBLE $< -o $@
835843

836844
$(KDIR)qrot_k$(TSUFFIX).$(SUFFIX) $(KDIR)qrot_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(QROTKERNEL)
837845
$(CC) -c $(CFLAGS) -UCOMPLEX -UCOMPLEX -DXDOUBLE $< -o $@

0 commit comments

Comments
 (0)