Created
May 1, 2017 21:59
-
-
Save rkujawa/400a1331fdf102b4b0538147e52bbaec to your computer and use it in GitHub Desktop.
Compiling GPU accelerated things on Fedora 26
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
# using plain CUDA (requires cuda-devel) | |
nvcc --compiler-options "-std=c++98" -I /usr/include/cuda/ -o executable source.cu | |
# using OpenACC with NVPTX (requires gcc-offload-nvptx and cuda-devel) | |
gcc source.c -fopenacc -foffload=nvptx-none -foffload="-O3" -O3 -o executable | |
# using OpenCL with CUDA backend (requires cuda-devel, opencl-headers, ocl-icd, ocl-icd-devel) | |
gcc -Wall -W -O3 -I /usr/include/cuda -o executable source.cpp -L/usr/lib64 -Wl,-R,/usr/lib64 -lOpenCL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment