From 12ffd568b04feda57147c13b67717416a01c82f8 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sat, 22 Aug 2015 00:24:28 +0800 Subject: [PATCH 1/3] Add Travis CI. --- .travis.yml | 34 ++++++++++++++++++++++++++++++ build/check-test.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 .travis.yml create mode 100755 build/check-test.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..f32532465 --- /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 + - if [ $RUN_TEST -eq 1 ]; then make test; fi + - if [ $RUN_TEST -eq 1 ]; then ./build/check-test.sh ./output.testsuite; fi \ No newline at end of file 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 From efa641e36b73abee34166a252e90e28a6281d92d Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sat, 22 Aug 2015 03:15:50 +0800 Subject: [PATCH 2/3] Try to fix the compiling bug on travis. --- .travis.yml | 4 ++-- Makefile | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f32532465..bfe7412a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,6 @@ addons: script: - ./configure $BUILD_CONFIG - - make - - if [ $RUN_TEST -eq 1 ]; then make test; fi + - 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) \ From 4f88c29f9e634cbb6fb22d8c88931f0ec78ad7db Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Wed, 14 Oct 2015 12:57:50 -0500 Subject: [PATCH 3/3] Detect Intel Broadwell (using Haswell config). --- build/auto-detect/cpuid_x86.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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; }