Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 253 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
version: 2.1

branches:
only:
- master
- dev
- amd

executors:
linux: # Docker using the Base Convenience Image
docker:
- image: cimg/base:2024.10
linuxnew: # Docker using the Base Convenience Image
docker:
- image: cimg/base:current-22.04
macos: &macos-executor # macos executor running Xcode
macos:
xcode: 14.2.0
linuxvm: # executor type
machine:
image: ubuntu-2204:current

workflows:
build:
jobs:
# Default:
# - build:
# os: linux
# CC: gcc
# OOT: 0
# TEST: FAST
# SDE: 0
# THR: none
# CONF: auto
# BLD: ''
# LDFLAGS: ''
# TESTSUITE_WRAPPER: ''
# PACKAGES: ''

# full testsuite (all tests + mixed datatype (gemm_nn only) + salt + OOT)
- build:
OOT: 1
TEST: ALL
SDE: 0
CONF: x86_64

# SDE testing for x86_64
- build:
# linuxvm must be used because it provides 8G RAM and SDE fails with 4G RAM
os: linuxvm
OOT: 0
TEST: FAST
SDE: 1
CONF: x86_64

# openmp build
- build:
THR: openmp

# pthreads build
- build:
THR: pthreads

# clang build
- build:
CC: clang
CXX: clang++
PACKAGES: clang

# macOS with system compiler (clang)
- build:
os: macos
CC: clang
CXX: clang++

# cortexa15 build and fast testsuite (qemu)
- build:
CC: arm-linux-gnueabihf-gcc
CXX: arm-linux-gnueabihf-g++
CONF: cortexa15
PACKAGES: 'gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-system-arm qemu-user'
TESTSUITE_WRAPPER: 'qemu-arm -cpu cortex-a15 -L /usr/arm-linux-gnueabihf/'

# cortexa57 build and fast testsuite (qemu)
- build:
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
CONF: cortexa57
PACKAGES: 'gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross qemu-system-arm qemu-user'
TESTSUITE_WRAPPER: 'qemu-aarch64 -L /usr/aarch64-linux-gnu/'

# Apple M1 (firestorm) build and fast testsuite (qemu)
- build:
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
CONF: firestorm
PACKAGES: 'gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross qemu-system-arm qemu-user'
TESTSUITE_WRAPPER: 'qemu-aarch64 -L /usr/aarch64-linux-gnu/'

# armsve build and fast testsuite (qemu)
- build:
CC: aarch64-linux-gnu-gcc-10
CXX: aarch64-linux-gnu-g++-10
CONF: armsve
PACKAGES: 'gcc-10-aarch64-linux-gnu g++-10-aarch64-linux-gnu libc6-dev-arm64-cross qemu-system-arm qemu-user'
TESTSUITE_WRAPPER: 'qemu-aarch64 -cpu max,sve=true,sve512=true -L /usr/aarch64-linux-gnu/'

# arm64 build and fast testsuite (qemu)
# NOTE: This entry omits the -cpu flag so that while both NEON and SVE kernels
# are compiled, only NEON kernels will be tested. (h/t to RuQing Xu)
- build:
CC: aarch64-linux-gnu-gcc-10
CXX: aarch64-linux-gnu-g++-10
CONF: arm64
PACKAGES: 'gcc-10-aarch64-linux-gnu g++-10-aarch64-linux-gnu libc6-dev-arm64-cross qemu-system-arm qemu-user'
TESTSUITE_WRAPPER: 'qemu-aarch64 -L /usr/aarch64-linux-gnu/'

# The RISC-V targets require the qemu version available in jammy or newer.
# When CI is upgraded, the packages should be activated and do_script.sh
# cleaned up.
# PACKAGES="qemu-user qemu-user-binfmt"
- build:
CONF: rv64iv
BLD: --disable-shared
LDFLAGS: -static
- build:
CONF: rv32iv
BLD: --disable-shared
LDFLAGS: -static
- build:
CONF: sifive_x280
BLD: --disable-shared
LDFLAGS: -static

jobs:
build:
parameters:
os:
type: executor
default: linux
CC:
type: string
default: gcc
CXX:
type: string
default: g++
OOT:
type: integer
default: 0
TEST:
type: string
default: FAST
SDE:
type: integer
default: 0
THR:
type: string
default: none
CONF:
type: string
default: auto
BLD:
type: string
default: ''
LDFLAGS:
type: string
default: ''
TESTSUITE_WRAPPER:
type: string
default: ''
PACKAGES:
type: string
default: ''
executor: << parameters.os >>
steps:
- checkout

- when:
condition:
not:
equal: [ *macos-executor, << parameters.os >> ]
steps:
- run:
name: Installing Dependencies
command:
sudo apt-get update && sudo NEEDRESTART_MODE=a apt-get install -y make python3 << parameters.PACKAGES >>

- run:
name: Configuring, Building, Testing
command: |
export DIST_PATH=.
export CC="<< parameters.CC >>"
export CXX="<< parameters.CXX >>"
export OOT="<< parameters.OOT >>"
export CONF="<< parameters.CONF >>"
export TEST="<< parameters.TEST >>"
export BLD="<< parameters.BLD >>"
export LDFLAGS="<< parameters.LDFLAGS >>"
export SDE="<< parameters.SDE >>"
export THR="<< parameters.THR >>"
export TESTSUITE_WRAPPER="<< parameters.TESTSUITE_WRAPPER >>"

pwd
if [ $OOT -eq 1 ]; then export DIST_PATH=`pwd`; mkdir ../oot; cd ../oot; chmod -R a-w $DIST_PATH; fi
pwd

if [ "$CONF" = "rv64iv" ]; then
$DIST_PATH/ci/do_riscv.sh "$CONF";
export CC=$DIST_PATH/../toolchain/riscv/bin/riscv64-unknown-linux-gnu-gcc;
export CXX=$DIST_PATH/../toolchain/riscv/bin/riscv64-unknown-linux-gnu-g++;
export TESTSUITE_WRAPPER="$DIST_PATH/../toolchain/qemu-riscv64 -cpu rv64,vext_spec=v1.0,v=true,vlen=128 -B 0x100000";
fi
if [ "$CONF" = "rv32iv" ]; then
$DIST_PATH/ci/do_riscv.sh "$CONF";
export CC=$DIST_PATH/../toolchain/riscv/bin/riscv32-unknown-linux-gnu-gcc;
export CXX=$DIST_PATH/../toolchain/riscv/bin/riscv32-unknown-linux-gnu-g++;
export TESTSUITE_WRAPPER="$DIST_PATH/../toolchain/qemu-riscv32 -cpu rv32,vext_spec=v1.0,v=true,vlen=128 -B 0x100000";
fi
if [ "$CONF" = "sifive_x280" ]; then
$DIST_PATH/ci/do_riscv.sh "$CONF";
export CC=$DIST_PATH/../toolchain/riscv/bin/clang;
export CXX=$DIST_PATH/../toolchain/riscv/bin/clang++;
export TESTSUITE_WRAPPER="$DIST_PATH/../toolchain/qemu-riscv64 -cpu rv64,vext_spec=v1.0,v=true,vlen=512 -B 0x100000";
fi

echo "Configuration:"
echo "CC = $CC"
echo "CXX = $CXX"
echo "OOT = $OOT"
echo "CONF = $CONF"
echo "THR = $THR"
echo "TEST = $TEST"
echo "BLD = $BLD"
echo "SDE = $SDE"
echo "DIST_PATH = $DIST_PATH"
echo "LDFLAGS = $LDFLAGS"
echo "TESTSUITE_WRAPPER = $TESTSUITE_WRAPPER"

$DIST_PATH/configure -p `pwd`/../install -t $THR $BLD CC=$CC $CONF
pwd
ls -l
$CC --version
$CC -v

make -j2
make install

if [ "$BLD" = "" ] && [ "$TESTSUITE_WRAPPER" = "" ] ; then $DIST_PATH/ci/cxx/cxx-test.sh $DIST_PATH $(ls -1 include); fi
# Qemu SVE is failing sgemmt in some cases. Skip as this issue is not observed
# on real chip (A64fx).
if [ "$CONF" = "armsve" ]; then sed -i 's/.*\<gemmt\>.*/0/' $DIST_PATH/testsuite/input.operations.fast; fi
if [ "$TEST" != "0" ]; then $DIST_PATH/ci/do_testsuite.sh; fi
if [ "$SDE" = "1" ]; then $DIST_PATH/ci/do_sde.sh; fi
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ script:
- if [ $OOT -eq 1 ]; then export DIST_PATH=`pwd`; mkdir ../oot; cd ../oot; chmod -R a-w $DIST_PATH; fi
- pwd
- if [ "$CONF" = "rv64iv" ]; then
$DIST_PATH/travis/do_riscv.sh "$CONF";
$DIST_PATH/ci/do_riscv.sh "$CONF";
export CC=$DIST_PATH/../toolchain/riscv/bin/riscv64-unknown-linux-gnu-gcc;
export CXX=$DIST_PATH/../toolchain/riscv/bin/riscv64-unknown-linux-gnu-g++;
export TESTSUITE_WRAPPER="$DIST_PATH/../toolchain/qemu-riscv64 -cpu rv64,vext_spec=v1.0,v=true,vlen=128 -B 0x100000";
fi
- if [ "$CONF" = "rv32iv" ]; then
$DIST_PATH/travis/do_riscv.sh "$CONF";
$DIST_PATH/ci/do_riscv.sh "$CONF";
export CC=$DIST_PATH/../toolchain/riscv/bin/riscv32-unknown-linux-gnu-gcc;
export CXX=$DIST_PATH/../toolchain/riscv/bin/riscv32-unknown-linux-gnu-g++;
export TESTSUITE_WRAPPER="$DIST_PATH/../toolchain/qemu-riscv32 -cpu rv32,vext_spec=v1.0,v=true,vlen=128 -B 0x100000";
fi
- if [ "$CONF" = "sifive_x280" ]; then
$DIST_PATH/travis/do_riscv.sh "$CONF";
$DIST_PATH/ci/do_riscv.sh "$CONF";
export CC=$DIST_PATH/../toolchain/riscv/bin/clang;
export CXX=$DIST_PATH/../toolchain/riscv/bin/clang++;
export TESTSUITE_WRAPPER="$DIST_PATH/../toolchain/qemu-riscv64 -cpu rv64,vext_spec=v1.0,v=true,vlen=512 -B 0x100000";
Expand All @@ -124,9 +124,9 @@ script:
- $CC -v
- make -j 2
- make install
- if [ "$BLD" = "" ]; then $DIST_PATH/travis/cxx/cxx-test.sh $DIST_PATH $(ls -1 include); fi
- if [ "$BLD" = "" ]; then $DIST_PATH/ci/cxx/cxx-test.sh $DIST_PATH $(ls -1 include); fi
# Qemu SVE is failing sgemmt in some cases. Skip as this issue is not observed
# on real chip (A64fx).
- if [ "$CONF" = "armsve" ]; then sed -i 's/.*\<gemmt\>.*/0/' $DIST_PATH/testsuite/input.operations.fast; fi
- if [ "$TEST" != "0" ]; then travis_wait 30 $DIST_PATH/travis/do_testsuite.sh; fi
- if [ "$SDE" = "1" ]; then travis_wait 30 $DIST_PATH/travis/do_sde.sh; fi
- if [ "$TEST" != "0" ]; then travis_wait 30 $DIST_PATH/ci/do_testsuite.sh; fi
- if [ "$SDE" = "1" ]; then travis_wait 30 $DIST_PATH/ci/do_sde.sh; fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions travis/cxx/cxx-test.sh → ci/cxx/cxx-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ if [ ! -e $INCLUDE_DIR/blis.h ]; then
exit 1
fi

if [ ! -e $SOURCE_DIR/travis/cxx/Makefile ]; then
if [ ! -e $SOURCE_DIR/ci/cxx/Makefile ]; then
echo "could not find cxx-test Makefile"
exit 1
fi

make -C $SOURCE_DIR/travis/cxx INCLUDE_DIR=$INCLUDE_DIR LIB_DIR=$LIB_DIR BUILD_DIR=$BUILD_DIR
make -C $SOURCE_DIR/ci/cxx INCLUDE_DIR=$INCLUDE_DIR LIB_DIR=$LIB_DIR BUILD_DIR=$BUILD_DIR
File renamed without changes.
35 changes: 22 additions & 13 deletions travis/do_sde.sh → ci/do_sde.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,32 @@ tar xvf $SDE_TARBALL

make -j2 testsuite-bin blastest-bin

TMP=`ldd ./test_libblis.x | grep ld | sed 's/^.*=> //'`
LD_SO=${TMP%% *}
TMP=`ldd ./test_libblis.x | grep libc | sed 's/^.*=> //'`
LIBC_SO=${TMP%% *}
TMP=`ldd ./test_libblis.x | grep libm | sed 's/^.*=> //'`
LIBM_SO=${TMP%% *}
for LIB in $LD_SO $LIBC_SO $LIBM_SO; do
$DIST_PATH/travis/patch-ld-so.py $LIB .tmp
chmod a+x .tmp
sudo mv .tmp $LIB
done

for ARCH in penryn sandybridge haswell skx knl piledriver steamroller excavator zen; do
export BLIS_ARCH_TYPE=-1

if [ "$ARCH" = "knl" ]; then
TESTSUITE_WRAPPER="$SDE -knl --"
elif [ "$ARCH" = "sandybridge" ]; then
# The sandybridge.def file causes a segfault in SDE on some systems.
# Instead, use the CPUID values for haswell, but force BLIS to use the
# sandybridge configuration.
TESTSUITE_WRAPPER="$SDE -cpuid_in $DIST_PATH/ci/cpuid/haswell.def --"
export BLIS_ARCH_TYPE=4
elif [ "$ARCH" = "piledriver" ]; then
# We used to "patch" ld.so and libm to remove CPUID checks so that glibc
# wouldn't try to use instructions not supported by SDE (FMA4). That no
# longer works, so test Piledriver/Steamroller/Excavator as haswell
# but with the configuration forced via environment variable.
TESTSUITE_WRAPPER="$SDE -cpuid_in $DIST_PATH/ci/cpuid/haswell.def --"
export BLIS_ARCH_TYPE=11
elif [ "$ARCH" = "steamroller" ]; then
TESTSUITE_WRAPPER="$SDE -cpuid_in $DIST_PATH/ci/cpuid/haswell.def --"
export BLIS_ARCH_TYPE=10
elif [ "$ARCH" = "excavator" ]; then
TESTSUITE_WRAPPER="$SDE -cpuid_in $DIST_PATH/ci/cpuid/haswell.def --"
export BLIS_ARCH_TYPE=9
else
TESTSUITE_WRAPPER="$SDE -cpuid_in $DIST_PATH/travis/cpuid/$ARCH.def --"
TESTSUITE_WRAPPER="$SDE -cpuid_in $DIST_PATH/ci/cpuid/$ARCH.def --"
fi

make TESTSUITE_WRAPPER="$TESTSUITE_WRAPPER" check
Expand Down
15 changes: 10 additions & 5 deletions travis/do_testsuite.sh → ci/do_testsuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,32 @@ export BLIS_JR_NT=1
export BLIS_IR_NT=1

if [ "$TEST" = "FAST" -o "$TEST" = "ALL" ]; then
make testblis-fast || cat ./output.testsuite
make testblis-fast
cat ./output.testsuite
$DIST_PATH/testsuite/check-blistest.sh ./output.testsuite
fi

if [ "$TEST" = "MD" -o "$TEST" = "ALL" ]; then
make testblis-md || cat ./output.testsuite
make testblis-md
cat ./output.testsuite
$DIST_PATH/testsuite/check-blistest.sh ./output.testsuite
fi

if [ "$TEST" = "SALT" -o "$TEST" = "ALL" ]; then
# Disable multithreading within BLIS.
export BLIS_JC_NT=1 BLIS_IC_NT=1 BLIS_JR_NT=1 BLIS_IR_NT=1
make testblis-salt || cat ./output.testsuite
make testblis-salt
cat ./output.testsuite
$DIST_PATH/testsuite/check-blistest.sh ./output.testsuite
fi

if [ "$TEST" = "1" -o "$TEST" = "ALL" ]; then
make testblis || cat ./output.testsuite
make testblis
cat ./output.testsuite
$DIST_PATH/testsuite/check-blistest.sh ./output.testsuite
fi

make testblas || cat ./output.testsuite
make testblas
cat ./output.testsuite
$DIST_PATH/blastest/check-blastest.sh

Loading