mirror of
https://github.com/amd/blis.git
synced 2026-06-08 23:08:30 +00:00
checkcpp test rule in Makefile
Change-Id: If01fe55e258e563a96cd8da9ea93d21063b730c2
This commit is contained in:
@@ -115,13 +115,13 @@ CINCFLAGS := -I$(INC_PATH)
|
||||
CXX = g++
|
||||
|
||||
# Use the CFLAGS for the configuration family.
|
||||
override CFLAGS += $(call get-user-cflags-for,$(CONFIG_NAME))
|
||||
override CFLAGS += $(call get-sandbox-cxxflags-for,$(CONFIG_NAME))
|
||||
|
||||
# Add local header paths to CFLAGS
|
||||
#CFLAGS = -O0 -g -Wall
|
||||
#CFLAGS += -I$(INC_PATH)
|
||||
override CFLAGS += -g -I$(TEST_SRC_PATH)
|
||||
override CFLAGS += -g -I$(CPP_SRC_PATH)
|
||||
override CFLAGS += -I$(TEST_SRC_PATH)
|
||||
override CFLAGS += -I$(CPP_SRC_PATH)
|
||||
|
||||
LINKER = $(CXX)
|
||||
|
||||
@@ -138,19 +138,8 @@ LIBBLIS_LINK := $(LIB_PATH)/$(LIBBLIS_L)
|
||||
#
|
||||
# blis
|
||||
#
|
||||
#all: blis
|
||||
all: blis
|
||||
|
||||
#blis: test_gemm_blis.x \
|
||||
test_hemm_blis.x \
|
||||
test_herk_blis.x \
|
||||
test_her2k_blis.x \
|
||||
test_symm_blis.x \
|
||||
test_syr2k_blis.x \
|
||||
test_syrk_blis.x \
|
||||
test_trmm_blis.x \
|
||||
test_trsm_blis.x \
|
||||
|
||||
|
||||
blis: test_asum_blis.x \
|
||||
test_axpy_blis.x \
|
||||
@@ -201,18 +190,14 @@ $(TEST_OBJ_PATH)/%.o: $(TEST_SRC_PATH)/%.cc
|
||||
$(CXX) $(CFLAGS) -c $< -o $@
|
||||
|
||||
test_%_blis.o: test_%.cc
|
||||
$(CXX) $(CFLAGS) -c $< -o $@
|
||||
@$(CXX) $(CFLAGS) -c $< -o $@
|
||||
|
||||
|
||||
# -- Executable file rules --
|
||||
|
||||
# NOTE: For the BLAS test drivers, we place the BLAS libraries before BLIS
|
||||
# on the link command line in case BLIS was configured with the BLAS
|
||||
# compatibility layer. This prevents BLIS from inadvertently getting called
|
||||
# for the BLAS routines we are trying to test with.
|
||||
|
||||
test_%_blis.x: test_%_blis.o $(LIBBLIS_LINK)
|
||||
$(LINKER) $^ $(LIBBLIS_LINK) $(LDFLAGS) -o $@
|
||||
@$(LINKER) $^ $(LIBBLIS_LINK) $(LDFLAGS) -o $@
|
||||
./$@
|
||||
|
||||
# -- Clean rules --
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
using namespace blis;
|
||||
using namespace std;
|
||||
//#define PRINT
|
||||
#define N 1
|
||||
|
||||
/*
|
||||
@@ -48,7 +47,7 @@ using namespace std;
|
||||
template< typename T >
|
||||
void test_hpr2( )
|
||||
{
|
||||
int n,lda;
|
||||
int n;
|
||||
int incX = -1;
|
||||
int incY = -1;
|
||||
n = N;
|
||||
@@ -64,12 +63,6 @@ T Y[1];
|
||||
T A_ref[1];
|
||||
A_ref[0] = { 0.829742, 0.0 };
|
||||
|
||||
#ifdef PRINT
|
||||
printf("Matrix A\n");
|
||||
printmatrix(A, lda, n, n,(char *) "A");
|
||||
printf("Vector X \n");
|
||||
printvector(X, n, (char *) "X");
|
||||
#endif
|
||||
blis::hpr2(
|
||||
CblasColMajor,
|
||||
CblasLower,
|
||||
@@ -82,12 +75,6 @@ T A_ref[1];
|
||||
A
|
||||
);
|
||||
|
||||
#ifdef PRINT
|
||||
printf("Matrix A after blis:hpr2\n");
|
||||
printmatrix (A, lda, n, n, (char *) "A output");
|
||||
printf(" A_ref blis:hpr2\n");
|
||||
printmatrix(A_ref, lda, n, n,(char *)"A_refoutput");
|
||||
#endif
|
||||
|
||||
if(computeErrorM(1, 1, n, n, A, A_ref )==1)
|
||||
printf("%s TEST FAIL\n" ,__PRETTY_FUNCTION__);
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
|
||||
using namespace blis;
|
||||
using namespace std;
|
||||
//#define PRINT
|
||||
//#define PRINT
|
||||
#define N 2
|
||||
/*
|
||||
* Test application assumes matrices to be column major, non-transposed
|
||||
@@ -47,20 +45,15 @@ using namespace std;
|
||||
template< typename T >
|
||||
void test_tpmv( )
|
||||
{
|
||||
int n,lda;
|
||||
int n;
|
||||
|
||||
n = N;
|
||||
lda = n;
|
||||
|
||||
T A[] = { -0.587f, 0.14f, 0.841f };
|
||||
T X[] = { -0.213f, 0.885f };
|
||||
int incX = -1;
|
||||
T X_ref[] = { -0.055233f, -0.519495f };
|
||||
|
||||
#ifdef PRINT
|
||||
printmatrix(A, lda ,n, n,(char *) "X");
|
||||
printvector(X, n,(char *) "X");
|
||||
#endif
|
||||
blis::tpmv(
|
||||
CblasColMajor,
|
||||
CblasLower,
|
||||
@@ -72,12 +65,6 @@ void test_tpmv( )
|
||||
incX
|
||||
);
|
||||
|
||||
#ifdef PRINT
|
||||
printvector(X, n, (char *)"X");
|
||||
printvector(X_ref, n,(char *) "X output");
|
||||
|
||||
|
||||
#endif
|
||||
if(computeErrorV(incX, incX, n, X, X_ref )==1)
|
||||
printf("%s TEST FAIL\n" , __PRETTY_FUNCTION__);
|
||||
else
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
|
||||
using namespace blis;
|
||||
using namespace std;
|
||||
//#define PRINT
|
||||
//#define PRINT
|
||||
#define N 2
|
||||
/*
|
||||
* Test application assumes matrices to be column major, non-transposed
|
||||
@@ -47,9 +45,8 @@ using namespace std;
|
||||
template< typename T >
|
||||
void test_tpsv( )
|
||||
{
|
||||
int n,lda;
|
||||
int n;
|
||||
n = N;
|
||||
lda = n;
|
||||
|
||||
T A[] = { -0.381f, 0.53f, 0.451f };
|
||||
T X[] = { 0.144f, 0.032f };
|
||||
@@ -58,10 +55,6 @@ void test_tpsv( )
|
||||
|
||||
|
||||
|
||||
#ifdef PRINT
|
||||
printmatrix(A, lda ,n,n,(char *)"A");
|
||||
printvector(X, n,(char *)"X");
|
||||
#endif
|
||||
blis::tpsv(
|
||||
CblasColMajor,
|
||||
CblasLower,
|
||||
@@ -73,11 +66,6 @@ void test_tpsv( )
|
||||
incX
|
||||
);
|
||||
|
||||
#ifdef PRINT
|
||||
printvector(X, n,(char *) "X blis::tpsv\n");
|
||||
printvector(X_ref, n,(char *) "X_ref blis::tpsv output");
|
||||
|
||||
#endif
|
||||
|
||||
if(computeErrorV(1,1, n, X, X_ref )==1)
|
||||
printf("%s TEST FAIL\n" , __PRETTY_FUNCTION__);
|
||||
|
||||
Reference in New Issue
Block a user