-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
220 changed files
with
23,701 additions
and
10,619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Copyright 2018 Stefan Seefeld | ||
# Distributed under the Boost Software License, Version 1.0. | ||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) | ||
|
||
version: 1.0.{build}-{branch} | ||
|
||
shallow_clone: true | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
- /feature\/.*/ | ||
|
||
environment: | ||
matrix: | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | ||
TOOLSET: msvc-14.1 | ||
CXXSTD: 17 | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | ||
TOOLSET: msvc-14.0 | ||
CXXSTD: 11 | ||
|
||
cache: | ||
- c:\tools\vcpkg\installed\ | ||
|
||
install: | ||
# Install OpenCL runtime (driver) for Intel / Xeon package | ||
- appveyor DownloadFile "http://registrationcenter-download.intel.com/akdlm/irc_nas/9022/opencl_runtime_16.1.1_x64_setup.msi" | ||
- start /wait msiexec /i opencl_runtime_16.1.1_x64_setup.msi /qn /l*v msiexec2.log | ||
# FIXME: To be removed https://help.appveyor.com/discussions/problems/13000-cmake_toolchain_filevcpkgcmake-conflicts-with-cmake-native-findboostcmake" | ||
- ps: 'Write-Host "Installing latest vcpkg.cmake module" -ForegroundColor Magenta' | ||
- appveyor DownloadFile https://raw.githubusercontent.com/Microsoft/vcpkg/master/scripts/buildsystems/vcpkg.cmake -FileName "c:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" | ||
- set "TRIPLET=x64-windows" | ||
- vcpkg --triplet %TRIPLET% install opencl clblas | ||
- set PATH=C:\Tools\vcpkg\installed\%TRIPLET%\bin;%PATH% | ||
- set VCPKG_I=C:\Tools\vcpkg\installed\%TRIPLET%\include | ||
- set VCPKG_L=C:\Tools\vcpkg\installed\%TRIPLET%\lib | ||
- set BOOST_BRANCH=develop | ||
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master | ||
- cd .. | ||
- git clone -b %BOOST_BRANCH% https://github.com/boostorg/boost.git boost-root | ||
- cd boost-root | ||
- git submodule update --init tools/build | ||
- git submodule update --init libs/config | ||
- git submodule update --init tools/boostdep | ||
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\numeric\ublas | ||
- python tools/boostdep/depinst/depinst.py -I benchmarks numeric/ublas | ||
- xcopy %APPVEYOR_BUILD_FOLDER%\opencl.jam %USERPROFILE% | ||
- xcopy %APPVEYOR_BUILD_FOLDER%\clblas.jam %USERPROFILE% | ||
- ps: | | ||
# Creating %USERPROFILE%/user-config.jam file | ||
@' | ||
import os regex toolset ; | ||
local toolset = [ regex.split [ os.environ TOOLSET ] "-" ] ; | ||
local vcpkg_i = [ os.environ VCPKG_I ] ; | ||
local vcpkg_l = [ os.environ VCPKG_L ] ; | ||
using $(toolset[1]) : $(toolset[2-]:J="-") : ; | ||
using opencl : : <include>$(vcpkg_i) <search>$(vcpkg_l) ; | ||
using clblas : : <include>$(vcpkg_i) <search>$(vcpkg_l) ; | ||
'@ | sc "$env:USERPROFILE/user-config.jam" | ||
- cmd /c bootstrap | ||
- b2 -j3 headers | ||
|
||
build: off | ||
|
||
test_script: | ||
#- PATH=%ADDPATH%%PATH% | ||
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% | ||
- set ADDRMD=address-model=64 | ||
- b2 -j3 libs/numeric/ublas/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% | ||
- b2 -j3 libs/numeric/ublas/benchmarks toolset=%TOOLSET% %CXXSTD% %ADDRMD% | ||
- b2 -j3 libs/numeric/ublas/examples/tensor toolset=%TOOLSET% %CXXSTD% %ADDRMD% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /bin/bash -e | ||
|
||
wget https://github.com/clMathLibraries/clBLAS/releases/download/v2.12/clBLAS-2.12.0-Linux-x64.tar.gz | ||
tar xvf clBLAS-2.12.0-Linux-x64.tar.gz | ||
if [ ${CLBLAS_PREFIX} ]; then | ||
mkdir -p ${CLBLAS_PREFIX}/lib/ | ||
cp -r clBLAS-2.12.0-Linux-x64/include ${CLBLAS_PREFIX}/include | ||
cp -r clBLAS-2.12.0-Linux-x64/lib64/* ${CLBLAS_PREFIX}/lib/ | ||
cp -r clBLAS-2.12.0-Linux-x64/bin ${CLBLAS_PREFIX}/bin | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/bin/bash | ||
#this might work on other DEB based distros, YMMV | ||
#prereqs: wget, rpm2cpio, cpio, clinfo (for testing), and no other conflicting OpenCL drivers | ||
#Get this file | ||
#https://software.intel.com/en-us/articles/opencl-drivers#philinux | ||
#http://registrationcenter.intel.com/irc_nas/4181/opencl_runtime_14.2_x64_4.5.0.8.tgz | ||
#or this one http://registrationcenter.intel.com/irc_nas/5193/opencl_runtime_15.1_x64_5.0.0.57.tgz | ||
#wget http://registrationcenter.intel.com/irc_nas/4181/opencl_runtime_14.2_x64_4.5.0.8.tgz | ||
wget http://registrationcenter.intel.com/irc_nas/5193/opencl_runtime_15.1_x64_5.0.0.57.tgz | ||
|
||
#unpack the tarball | ||
tar xvf opencl_runtime_15.1_x64_5.0.0.57.tgz | ||
|
||
#unpack the rpms | ||
#according to http://mhr3.blogspot.com/2013/06/opencl-on-ubuntu-1304.html, we don't need all of them unpacked | ||
#basically, just the ICD itself | ||
rpm2cpio opencl_runtime_15.1_x64_5.0.0.57/rpm/opencl-1.2-intel-cpu-5.0.0.57-1.x86_64.rpm | cpio -idmv | ||
|
||
#stub out the directory structure for the deb package as a staging area | ||
#some of these steps are from here http://mhr3.blogspot.com/2013/06/opencl-on-ubuntu-1304.html | ||
mkdir opencl-driver-intel-cpu | ||
cd opencl-driver-intel-cpu | ||
mkdir DEBIAN | ||
mkdir -p etc/OpenCL/vendors | ||
mkdir -p usr/lib/x86_64-linux-gnu/OpenCL/vendors/intel | ||
mkdir -p usr/share/doc/opencl-driver-intel-cpu | ||
cd .. | ||
|
||
#put the right description of the package in the right place | ||
#from the blog post with my modifications | ||
#version number is from the filename | ||
cat <<'EOF' >> opencl-driver-intel-cpu/DEBIAN/control | ||
Package: opencl-driver-intel-cpu | ||
Version: 5.0.0.57 | ||
Section: libs | ||
Priority: optional | ||
Architecture: amd64 | ||
Depends: ocl-icd-libopencl1 (>= 2.0), libnuma1 | ||
Maintainer: Your Name | ||
Description: Intel OpenCL CPU implementation | ||
This package provides Intel OpenCL implementation which can utilize Intel Core processors. | ||
EOF | ||
|
||
#copy over the documentation into the deb staging area | ||
cp opt/intel/opencl-1.2-5.0.0.57/doc/* opencl-driver-intel-cpu/usr/share/doc/opencl-driver-intel-cpu/ | ||
|
||
#the icd registry could be copied from opt/intel/opencl-1.2-5.0.0.57/etc/intel64.icd | ||
#but it's wrong anyway and we'd have to change it, handle this later | ||
|
||
#now put the libs where they go in the staging area | ||
cp opt/intel/opencl-1.2-5.0.0.57/lib64/* opencl-driver-intel-cpu/usr/lib/x86_64-linux-gnu/OpenCL/vendors/intel/ | ||
|
||
#now deal with that icd registry | ||
cat <<'EOF' >> opencl-driver-intel-cpu/etc/OpenCL/vendors/intel64.icd | ||
/usr/lib/x86_64-linux-gnu/OpenCL/vendors/intel/libintelocl.so | ||
EOF | ||
|
||
#finally build the deb package | ||
dpkg-deb --build opencl-driver-intel-cpu | ||
|
||
#and install it | ||
sudo dpkg --install opencl-driver-intel-cpu.deb | ||
sudo apt-get install -f | ||
sudo ldconfig | ||
clinfo #this verifies it installed correctly | ||
#cleanup | ||
rm -rf opencl-driver-intel-cpu opencl_runtime_15.1_x64_5.0.0.57* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Copyright 2018 Stefan Seefeld | ||
# Distributed under the Boost Software License, Version 1.0. | ||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) | ||
|
||
|
||
language: cpp | ||
|
||
sudo: required | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
- doc | ||
- ci | ||
|
||
# env: specifies additional global variables to define per row in build matrix | ||
env: | ||
global: | ||
- CLBLAS_PREFIX=${TRAVIS_BUILD_DIR}/CLBLAS/ | ||
- PATH=${CLBLAS_PREFIX}/bin:$PATH | ||
- LD_LIBRARY_PATH=${CLBLAS_PREFIX}/lib:$LD_LIBRARY_PATH | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=11 | ||
- os: linux | ||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=17 | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-7 | ||
- libopenblas-base | ||
- rpm2cpio | ||
- cpio | ||
- clinfo | ||
- opencl-headers | ||
- ocl-icd-opencl-dev | ||
|
||
before_install: | ||
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then .ci/install-ocl-ubuntu.sh; fi | ||
- .ci/install-clblas.sh | ||
- cmake --version; | ||
- ${CC} --version; | ||
- ${CXX} --version; | ||
|
||
install: | ||
- cd .. | ||
- git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root | ||
- cd boost-root | ||
- git submodule update --init --jobs 8 tools/build | ||
- git submodule update --init --jobs 8 libs/config | ||
- git submodule update --init --jobs 8 tools/boostdep | ||
- mkdir -p libs/numeric/ | ||
- cp -r $TRAVIS_BUILD_DIR/* libs/numeric/ublas | ||
- python tools/boostdep/depinst/depinst.py -I benchmarks numeric/ublas | ||
- ./bootstrap.sh | ||
- ./b2 -j 8 headers | ||
|
||
# Use before_script: to run configure steps | ||
before_script: | ||
|
||
|
||
# use script: to execute build steps | ||
script: | ||
- |- | ||
echo "using $TOOLSET : : $COMPILER ;" >> ~/user-config.jam; | ||
echo "using clblas : : <include>${CLBLAS_PREFIX}/include <search>${CLBLAS_PREFIX}/lib ;" >> ~/user-config.jam; | ||
cp $TRAVIS_BUILD_DIR/opencl.jam ~/ | ||
cp $TRAVIS_BUILD_DIR/clblas.jam ~/ | ||
- ./b2 -j 8 libs/numeric/ublas/test toolset=$TOOLSET cxxstd=$CXXSTD | ||
- ./b2 -j 8 libs/numeric/ublas/benchmarks toolset=$TOOLSET cxxstd=$CXXSTD | ||
- ./b2 -j 8 libs/numeric/ublas/examples/tensor toolset=$TOOLSET cxxstd=$CXXSTD | ||
|
||
notifications: | ||
email: | ||
on_success: always |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CONFIG -= qt | ||
CONFIG += depend_includepath | ||
win*: CONFIG += console | ||
|
||
# ublas include directory | ||
INCLUDEPATH += \ | ||
../../../../../include | ||
|
||
QMAKE_CXXFLAGS += -fno-inline | ||
QMAKE_CXXFLAGS += -std=c++17 | ||
|
||
# If ublas tests are build with boost source code then, | ||
# then boost headers and boost libraries should be used. | ||
exists(../../../../../../boost-build.jam) { | ||
INCLUDEPATH += ../../../../../../.. | ||
LIBS += -L../../../../../../../stage/lib | ||
QMAKE_RPATHDIR += ../../../../../../../stage/lib | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TEMPLATE = subdirs | ||
SUBDIRS = tensor |
7 changes: 7 additions & 0 deletions
7
IDEs/qtcreator/examples/tensor/construction_access/example_construction_access.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TEMPLATE = app | ||
TARGET = construction_access | ||
|
||
include (../../configuration.pri) | ||
|
||
SOURCES += \ | ||
../../../../../examples/tensor/construction_access.cpp |
7 changes: 7 additions & 0 deletions
7
IDEs/qtcreator/examples/tensor/einstein_notation/example_einstein_notation.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TEMPLATE = app | ||
TARGET = einstein_notation | ||
|
||
include (../../configuration.pri) | ||
|
||
SOURCES += \ | ||
../../../../../examples/tensor/einstein_notation.cpp |
7 changes: 7 additions & 0 deletions
7
IDEs/qtcreator/examples/tensor/prod_expressions/example_prod_expressions.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TEMPLATE = app | ||
TARGET = prod_expression | ||
|
||
include (../../configuration.pri) | ||
|
||
SOURCES += \ | ||
../../../../../examples/tensor/prod_expressions.cpp |
7 changes: 7 additions & 0 deletions
7
IDEs/qtcreator/examples/tensor/simple_expressions/example_simple_expressions.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TEMPLATE = app | ||
TARGET = simple_expressions | ||
|
||
include (../../configuration.pri) | ||
|
||
SOURCES += \ | ||
../../../../../examples/tensor/simple_expressions.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
TEMPLATE = subdirs | ||
SUBDIRS = construction_access simple_expressions prod_expressions einstein_notation | ||
|
||
|
||
construction_access.file = construction_access/example_construction_access.pro | ||
simple_expressions.file = simple_expressions/example_simple_expressions.pro | ||
prod_expressions.file = prod_expressions/example_prod_expressions.pro | ||
einstein_notation.file = einstein_notation/example_einstein_notation.pro | ||
|
Oops, something went wrong.