diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..bfe7412a5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +language: c +sudo: false + +compiler: + - gcc + +env: + - RUN_TEST=1 BUILD_CONFIG="auto" + - RUN_TEST=1 BUILD_CONFIG="reference" + - RUN_TEST=1 BUILD_CONFIG="dunnington" + - RUN_TEST=0 BUILD_CONFIG="sandybridge" + - RUN_TEST=0 BUILD_CONFIG="haswell" + - RUN_TEST=0 BUILD_CONFIG="bulldozer" + - RUN_TEST=0 BUILD_CONFIG="piledriver" + - RUN_TEST=0 BUILD_CONFIG="carrizo" + +install: +- if [ "$CC" = "gcc" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + - clang + + + +script: + - ./configure $BUILD_CONFIG + - make CC=gcc-4.8 + - if [ $RUN_TEST -eq 1 ]; then make BLIS_ENABLE_TEST_OUTPUT=yes test; fi + - if [ $RUN_TEST -eq 1 ]; then ./build/check-test.sh ./output.testsuite; fi \ No newline at end of file diff --git a/Makefile b/Makefile index 9ad0d7568..c9fe957b5 100644 --- a/Makefile +++ b/Makefile @@ -633,6 +633,11 @@ ifeq ($(BLIS_ENABLE_VERBOSE_MAKE_OUTPUT),yes) ./$(TESTSUITE_BIN) -g $(TESTSUITE_CONF_GEN_PATH) \ -o $(TESTSUITE_CONF_OPS_PATH) \ > $(TESTSUITE_OUT_FILE) + +else ifeq ($(BLIS_ENABLE_TEST_OUTPUT), yes) + ./$(TESTSUITE_BIN) -g $(TESTSUITE_CONF_GEN_PATH) \ + -o $(TESTSUITE_CONF_OPS_PATH) | \ + tee $(TESTSUITE_OUT_FILE) else @echo "Running $(TESTSUITE_BIN) with output redirected to '$(TESTSUITE_OUT_FILE)'" @./$(TESTSUITE_BIN) -g $(TESTSUITE_CONF_GEN_PATH) \ diff --git a/build/auto-detect/cpuid_x86.c b/build/auto-detect/cpuid_x86.c index 6bbaf9f4e..9a703c085 100644 --- a/build/auto-detect/cpuid_x86.c +++ b/build/auto-detect/cpuid_x86.c @@ -172,6 +172,7 @@ int cpu_detect() case 12: case 15: //Haswell + case 13: //Broadwell if(support_avx()) { return CPUNAME_HASWELL; }else{ @@ -185,6 +186,9 @@ int cpu_detect() case 5: case 6: //Haswell + case 7: + case 15: + //Broadwell if(support_avx()) { return CPUNAME_HASWELL; }else{ @@ -192,6 +196,17 @@ int cpu_detect() } } break; + case 5: + switch (model) { + case 6: + //Broadwell + if(support_avx()) { + return CPUNAME_HASWELL; + }else{ + return CPUNAME_REFERENCE; //OS doesn't support AVX + } + } + break; } break; } diff --git a/build/check-test.sh b/build/check-test.sh new file mode 100755 index 000000000..6277ada45 --- /dev/null +++ b/build/check-test.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# BLIS +# An object-based framework for developing high-performance BLAS-like +# libraries. +# +# Copyright (C) 2015, The University of Texas at Austin +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# - Neither the name of The University of Texas at Austin nor the names +# of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 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. +# +# + +# +# check-test.sh +# +# Zhang Xianyi +# + + +grep -q FAILURE $1 + +if [ $? -eq 0 ]; then + echo "Test Failure" + exit 1 +else + echo "Test Pass" + exit 0 +fi \ No newline at end of file