Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
use prebuilt magma binary on windows (from PyTorch)
rem update blas dir and cuda version
set BLAS_DIR=D:\Programs\OpenBLAS-0.3.7-x64
set CUDA_PREFIX=cuda100
set OUTPUT_EXE=build\main
set MAGMA_DIR=%~dp0\build\magma
if not exist %MAGMA_DIR% (
rem using static library precompiled for pytorch
rem Make sure you have 7z and curl installed.
curl -k -o build/magma.7z
7z x -aoa build/magma.7z -obuild/magma
nvcc main.c -o %OUTPUT_EXE% ^
-I%MAGMA_DIR%\include ^
-L%BLAS_DIR%\lib -L%MAGMA_DIR%\lib ^
-lcusparse -lcublas -lmagma -lmagma_sparse -llibopenblas ^
-Xcompiler /MD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment