Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit d84b089

Browse filesBrowse files
Merge pull request #6 from bibikar/master
Add configurable accuracy in Makefile
2 parents 9d5b191 + 1977402 commit d84b089
Copy full SHA for d84b089

File tree

Expand file treeCollapse file tree

1 file changed

+26
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+26
-8
lines changed
Open diff view settings
Collapse file

‎numpy/umath/Makefile‎

Copy file name to clipboard
+26-8Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
1-
# Copyright (C) 2018 Intel Corporation
1+
# Copyright (C) 2018-2019 Intel Corporation
22
#
33
# SPDX-License-Identifier: MIT
44

55
CC = icc
66
CFLAGS = -qopenmp -xCORE-AVX2 -axCOMMON-AVX512 -O3 \
7-
-g -fp-model precise -fimf-precision=high -lmkl_rt
7+
-g -lmkl_rt
88

99
PYTHON ?= python
1010

11-
all: umath_precise
12-
./umath_precise
11+
ACC ?= la
12+
ifeq ($(ACC), ha)
13+
CFLAGS += -fimf-precision=high -D_VML_ACCURACY_HA_
14+
CFLAGS += -fp-model precise
15+
endif
16+
ifeq ($(ACC), la)
17+
CFLAGS += -fimf-precision=medium -D_VML_ACCURACY_LA_
18+
endif
19+
ifeq ($(ACC), ep)
20+
CFLAGS += -fimf-precision=low -fimf-domain-exclusion=31 -D_VML_ACCURACY_EP_
21+
endif
22+
23+
TARGET=umath_$(ACC)
24+
25+
26+
all: $(TARGET)
27+
./$(TARGET)
1328

1429
clean:
15-
rm -f umath_precise umath_bench.c
30+
rm -f umath_ha umath_la umath_ep umath_bench.c
31+
32+
compile: $(TARGET)
33+
1634

17-
umath_precise: umath_bench.c
18-
$(CC) umath_bench.c $(CPPFLAGS) $(CFLAGS) -o umath_precise
35+
$(TARGET): umath_bench.c
36+
$(CC) umath_bench.c $(CPPFLAGS) $(CFLAGS) -o $(TARGET)
1937

2038
umath_bench.c: umath_bench.c.src
2139
$(PYTHON) -m numpy.distutils.conv_template umath_bench.c.src
2240

23-
.PHONY: all clean
41+
.PHONY: all clean compile

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.