mirror of
https://github.com/amd/blis.git
synced 2026-04-20 07:38:53 +00:00
Fail-safe updates to Makefiles in 'test' dir.
Details:
- Updated Makefiles in test, test/3, and test/sup so that running any of
the usual targets without having first built BLIS results in a helpful
error message. For example, if BLIS is not yet configured, make will
output:
Makefile:327: *** Cannot proceed: config.mk not detected! Run
configure first. Stop.
Similarly, if BLIS is configured but not yet built, make will output:
Makefile:340: *** Cannot proceed: BLIS library not yet built! Run
make first. Stop.
In previous commits, these actions would result in a rather cryptic
make error such as:
make: *** No rule to make target 'test_sgemm_2400_asm_blis_st.x',
needed by 'blis-nat-st'. Stop.
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#
|
||||
|
||||
.PHONY: all \
|
||||
check-env check-env-mk check-lib \
|
||||
clean cleanx
|
||||
|
||||
|
||||
@@ -285,21 +286,21 @@ VENDOR_2S_OBJS := $(call get-2s-objs,vendor)
|
||||
VENDOR_2S_BINS := $(patsubst %.o,%.x,$(VENDOR_2S_OBJS))
|
||||
|
||||
# Define some targets associated with the above object/binary files.
|
||||
blis-nat-st: $(BLIS_NAT_ST_BINS)
|
||||
blis-nat-1s: $(BLIS_NAT_1S_BINS)
|
||||
blis-nat-2s: $(BLIS_NAT_2S_BINS)
|
||||
blis-nat-st: check-env $(BLIS_NAT_ST_BINS)
|
||||
blis-nat-1s: check-env $(BLIS_NAT_1S_BINS)
|
||||
blis-nat-2s: check-env $(BLIS_NAT_2S_BINS)
|
||||
|
||||
openblas-st: $(OPENBLAS_ST_BINS)
|
||||
openblas-1s: $(OPENBLAS_1S_BINS)
|
||||
openblas-2s: $(OPENBLAS_2S_BINS)
|
||||
openblas-st: check-env $(OPENBLAS_ST_BINS)
|
||||
openblas-1s: check-env $(OPENBLAS_1S_BINS)
|
||||
openblas-2s: check-env $(OPENBLAS_2S_BINS)
|
||||
|
||||
eigen-st: $(EIGEN_ST_BINS)
|
||||
eigen-1s: $(EIGEN_1S_BINS)
|
||||
eigen-2s: $(EIGEN_2S_BINS)
|
||||
eigen-st: check-env $(EIGEN_ST_BINS)
|
||||
eigen-1s: check-env $(EIGEN_1S_BINS)
|
||||
eigen-2s: check-env $(EIGEN_2S_BINS)
|
||||
|
||||
vendor-st: $(VENDOR_ST_BINS)
|
||||
vendor-1s: $(VENDOR_1S_BINS)
|
||||
vendor-2s: $(VENDOR_2S_BINS)
|
||||
vendor-st: check-env $(VENDOR_ST_BINS)
|
||||
vendor-1s: check-env $(VENDOR_1S_BINS)
|
||||
vendor-2s: check-env $(VENDOR_2S_BINS)
|
||||
|
||||
mkl-st: vendor-st
|
||||
mkl-1s: vendor-1s
|
||||
@@ -317,7 +318,7 @@ armpl-2s: vendor-2s
|
||||
.INTERMEDIATE: $(VENDOR_ST_OBJS) $(VENDOR_1S_OBJS) $(VENDOR_2S_OBJS)
|
||||
|
||||
|
||||
# --Object file rules --
|
||||
# -- Object file rules --
|
||||
|
||||
#$(TEST_OBJ_PATH)/%.o: $(TEST_SRC_PATH)/%.c
|
||||
# $(CC) $(CFLAGS) -c $< -o $@
|
||||
@@ -453,6 +454,21 @@ test_%_$(P2_MAX)_vendor_2s.x: test_%_$(P2_MAX)_vendor_2s.o $(LIBBLIS_LINK)
|
||||
$(CC) $(strip $< $(VENDORP_LIB) $(LIBBLIS_LINK) $(LDFLAGS) -o $@)
|
||||
|
||||
|
||||
# -- Environment check rules --
|
||||
|
||||
check-env: check-lib
|
||||
|
||||
check-env-mk:
|
||||
ifeq ($(CONFIG_MK_PRESENT),no)
|
||||
$(error Cannot proceed: config.mk not detected! Run configure first)
|
||||
endif
|
||||
|
||||
check-lib: check-env-mk
|
||||
ifeq ($(wildcard $(LIBBLIS_LINK)),)
|
||||
$(error Cannot proceed: BLIS library not yet built! Run make first)
|
||||
endif
|
||||
|
||||
|
||||
# -- Clean rules --
|
||||
|
||||
clean: cleanx
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
.PHONY: all \
|
||||
blis openblas atlas mkl \
|
||||
check-env check-env-mk check-lib \
|
||||
clean cleanx
|
||||
|
||||
|
||||
@@ -165,7 +166,7 @@ CFLAGS += -I$(TEST_SRC_PATH)
|
||||
#all: blis openblas atlas mkl
|
||||
all: blis openblas mkl
|
||||
|
||||
blis: \
|
||||
blis: check-env \
|
||||
test_dotv_blis.x \
|
||||
test_axpyv_blis.x \
|
||||
test_gemv_blis.x \
|
||||
@@ -183,7 +184,7 @@ blis: \
|
||||
test_trmm_blis.x \
|
||||
test_trsm_blis.x
|
||||
|
||||
openblas: \
|
||||
openblas: check-env \
|
||||
test_dotv_openblas.x \
|
||||
test_axpyv_openblas.x \
|
||||
test_gemv_openblas.x \
|
||||
@@ -201,7 +202,7 @@ openblas: \
|
||||
test_trmm_openblas.x \
|
||||
test_trsm_openblas.x
|
||||
|
||||
atlas: \
|
||||
atlas: check-env \
|
||||
test_dotv_atlas.x \
|
||||
test_axpyv_atlas.x \
|
||||
test_gemv_atlas.x \
|
||||
@@ -219,7 +220,8 @@ atlas: \
|
||||
test_trmm_atlas.x \
|
||||
test_trsm_atlas.x
|
||||
|
||||
mkl: test_dotv_mkl.x \
|
||||
mkl: check-env \
|
||||
test_dotv_mkl.x \
|
||||
test_axpyv_mkl.x \
|
||||
test_gemv_mkl.x \
|
||||
test_ger_mkl.x \
|
||||
@@ -236,7 +238,8 @@ mkl: test_dotv_mkl.x \
|
||||
test_trmm_mkl.x \
|
||||
test_trsm_mkl.x
|
||||
|
||||
essl: test_dotv_essl.x \
|
||||
essl: check-env \
|
||||
test_dotv_essl.x \
|
||||
test_axpyv_essl.x \
|
||||
test_gemv_essl.x \
|
||||
test_ger_essl.x \
|
||||
@@ -253,7 +256,8 @@ essl: test_dotv_essl.x \
|
||||
test_trmm_essl.x \
|
||||
test_trsm_essl.x
|
||||
|
||||
mac: test_dotv_mac.x \
|
||||
mac: check-env \
|
||||
test_dotv_mac.x \
|
||||
test_axpyv_mac.x \
|
||||
test_gemv_mac.x \
|
||||
test_ger_mac.x \
|
||||
@@ -322,6 +326,21 @@ test_%_blis.x: test_%_blis.o $(LIBBLIS_LINK)
|
||||
$(LINKER) $< $(LIBBLIS_LINK) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
# -- Environment check rules --
|
||||
|
||||
check-env: check-lib
|
||||
|
||||
check-env-mk:
|
||||
ifeq ($(CONFIG_MK_PRESENT),no)
|
||||
$(error Cannot proceed: config.mk not detected! Run configure first)
|
||||
endif
|
||||
|
||||
check-lib: check-env-mk
|
||||
ifeq ($(wildcard $(LIBBLIS_LINK)),)
|
||||
$(error Cannot proceed: BLIS library not yet built! Run make first)
|
||||
endif
|
||||
|
||||
|
||||
# -- Clean rules --
|
||||
|
||||
clean: cleanx
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
st mt \
|
||||
blissup-st blisconv-st eigen-st openblas-st vendor-st blasfeo-st libxsmm-st \
|
||||
blissup-mt blisconv-mt eigen-mt openblas-mt vendor-mt \
|
||||
check-env check-env-mk check-lib \
|
||||
clean cleanx
|
||||
|
||||
|
||||
@@ -485,24 +486,24 @@ all: st
|
||||
st: blissup-st blisconv-st \
|
||||
eigen-st openblas-st blasfeo-st libxsmm-st vendor-st
|
||||
|
||||
blissup-st: $(BLISSUP_ST_BINS)
|
||||
blisconv-st: $(BLISLPAB_ST_BINS)
|
||||
eigen-st: $(EIGEN_ST_BINS)
|
||||
openblas-st: $(OPENBLAS_ST_BINS)
|
||||
blasfeo-st: $(BLASFEO_ST_BINS)
|
||||
libxsmm-st: $(LIBXSMM_ST_BINS)
|
||||
vendor-st: $(VENDOR_ST_BINS)
|
||||
blissup-st: check-env $(BLISSUP_ST_BINS)
|
||||
blisconv-st: check-env $(BLISLPAB_ST_BINS)
|
||||
eigen-st: check-env $(EIGEN_ST_BINS)
|
||||
openblas-st: check-env $(OPENBLAS_ST_BINS)
|
||||
blasfeo-st: check-env $(BLASFEO_ST_BINS)
|
||||
libxsmm-st: check-env $(LIBXSMM_ST_BINS)
|
||||
vendor-st: check-env $(VENDOR_ST_BINS)
|
||||
|
||||
# -- Multithreaded --
|
||||
|
||||
mt: blissup-mt blisconv-mt \
|
||||
eigen-mt openblas-mt vendor-mt
|
||||
|
||||
blissup-mt: $(BLISSUP_MT_BINS)
|
||||
blisconv-mt: $(BLISLPAB_MT_BINS)
|
||||
eigen-mt: $(EIGEN_MT_BINS)
|
||||
openblas-mt: $(OPENBLAS_MT_BINS)
|
||||
vendor-mt: $(VENDOR_MT_BINS)
|
||||
blissup-mt: check-env $(BLISSUP_MT_BINS)
|
||||
blisconv-mt: check-env $(BLISLPAB_MT_BINS)
|
||||
eigen-mt: check-env $(EIGEN_MT_BINS)
|
||||
openblas-mt: check-env $(OPENBLAS_MT_BINS)
|
||||
vendor-mt: check-env $(VENDOR_MT_BINS)
|
||||
|
||||
|
||||
# --- Object file rules --------------------------------------------------------
|
||||
@@ -650,6 +651,21 @@ test_%_vendor_mt.x: test_%_vendor_mt.o $(LIBBLIS_LINK)
|
||||
$(CC) $(strip $< $(VENDORP_LIB) $(LIBBLIS_LINK) $(LDFLAGS) -o $@)
|
||||
|
||||
|
||||
# -- Environment check rules --
|
||||
|
||||
check-env: check-lib
|
||||
|
||||
check-env-mk:
|
||||
ifeq ($(CONFIG_MK_PRESENT),no)
|
||||
$(error Cannot proceed: config.mk not detected! Run configure first)
|
||||
endif
|
||||
|
||||
check-lib: check-env-mk
|
||||
ifeq ($(wildcard $(LIBBLIS_LINK)),)
|
||||
$(error Cannot proceed: BLIS library not yet built! Run make first)
|
||||
endif
|
||||
|
||||
|
||||
# -- Clean rules --
|
||||
|
||||
clean: cleanx
|
||||
|
||||
Reference in New Issue
Block a user