-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update PyTorch to CUDA 9.0, CuDNN 7.0.3, MKL, build magma with MKL
- Loading branch information
Showing
5 changed files
with
151 additions
and
26 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 @@ | ||
*.pkg.tar.xz |
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,84 @@ | ||
# Maintainer: pingplug <pingplug@foxmail.com> | ||
# Contributor: cornholio <vigo.the.unholy.carpathian@gmail.com> | ||
|
||
##### Configuration Options | ||
# Specify GPU compute capability Fermi (2.x) or Kepler (3.x) or Maxwell (5.x) | ||
#_GPU_TARGET=Fermi | ||
#_GPU_TARGET=Kepler | ||
#_GPU_TARGET=Maxwell | ||
# Can also be one of these: sm20 sm30 sm35 sm50 | ||
_GPU_TARGET=sm61 | ||
# Set _USE_CMAKE=1 to use CMake | ||
_USE_CMAKE=0 | ||
##### End | ||
|
||
pkgname=magma-mkl | ||
pkgver=2.2.0 | ||
pkgrel=1 | ||
pkgdesc="Provides a dense linear algebra library similar to LAPACK but for heterogeneous/hybrid architectures, starting with current 'Multicore+GPU' systems. (with CUDA and MKL)" | ||
arch=("i686" "x86_64") | ||
url="http://icl.cs.utk.edu/magma/" | ||
license=(custom) | ||
depends=("cuda>=6.5.0" "gsl" "python" "intel-mkl") | ||
makedepends=("gcc-fortran") | ||
options=('staticlibs') | ||
sha1sums=('7f884e4c80dd296939174282d69d19cc1cca71a5') | ||
source=("http://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-${pkgver}.tar.gz") | ||
provides=('magma') | ||
conflicts=('magma') | ||
|
||
build() { | ||
cd "${srcdir}/magma-${pkgver}" | ||
|
||
if ((_USE_CMAKE == 0)) | ||
then | ||
# Modify Makefile | ||
cp make.inc-examples/make.inc.mkl-gcc make.inc | ||
sed -i "/#GPU_TARGET ?=/c GPU_TARGET = ${_GPU_TARGET}" make.inc | ||
sed -i '/#CUDADIR/c CUDADIR = /opt/cuda' make.inc | ||
|
||
export MKL_ROOT=/opt/intel/mkl | ||
export MKL_INCLUDE=$MKL_ROOT/include | ||
export MKL_LIBRARY=$MKL_ROOT/lib/intel64 | ||
source /opt/intel/mkl/bin/mklvars.sh intel64 | ||
source /opt/intel/bin/compilervars.sh intel64 # For MKL 2018, this is a symlink to /opt/intel/compilers_and_libraries_2018.0.128/linux/bin/compilervars.sh | ||
|
||
make clean | ||
make lib | ||
make sparse | ||
make test | ||
else | ||
# FIXME: there is no shared library | ||
mkdir build && cd build | ||
cmake -DGPU_TARGET=${_GPU_TARGET} \ | ||
-DCUDA_HOST_COMPILER=/opt/cuda/bin/gcc \ | ||
-DCMAKE_INSTALL_PREFIX=/opt/magma .. | ||
make | ||
fi | ||
} | ||
|
||
package() { | ||
if ((_USE_CMAKE == 0)) | ||
then | ||
cd "${srcdir}/magma-${pkgver}" | ||
make prefix="${pkgdir}/opt/magma" install | ||
#rm "${pkgdir}/opt/magma/include/*.mod" | ||
else | ||
cd "${srcdir}/magma-${pkgver}/build" | ||
make DESTDIR="${pkgdir}" install | ||
fi | ||
|
||
mkdir -p ${pkgdir}/opt/magma/example | ||
cp -ru ${srcdir}/magma-${pkgver}/example/* ${pkgdir}/opt/magma/example/ | ||
|
||
mkdir -p ${pkgdir}/opt/magma/testing | ||
cp -ru ${srcdir}/magma-${pkgver}/testing/* ${pkgdir}/opt/magma/testing/ | ||
|
||
rm -rf ${pkgdir}/opt/magma/lib/pkgconfig | ||
mkdir -p ${pkgdir}/usr/share/licenses/magma | ||
cp ${srcdir}/magma-${pkgver}/COPYRIGHT ${pkgdir}/usr/share/licenses/magma/LICENSE | ||
|
||
# Add libmagma to LD_LIBRARY_PATH | ||
mkdir -p "${pkgdir}/etc/ld.so.conf.d/" | ||
echo "/opt/magma/lib" > "${pkgdir}/etc/ld.so.conf.d/magma.conf" | ||
} |
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
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
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