mex/mexcuda for a target GPU
이전 댓글 표시
I have obtained 3rd party code consisting of both a mex gateway file main.cpp and some other .cu source files. The compilation routine provided with this code is of the form,
mex -largeArrayDims main.cpp cuda_routine1.cu cuda_routine2.cu
The problem is, I need to compile so that the resulting mex file can run on a different target machine with a different graphics card from the machine that I will compile with. When compiling directly with nvcc, it appears from this blog that you can specify a target architecture using the -arch flag.
My question is, is it possible to do something similar when working through mex() or mexcuda()? Would a solution be to pass nvcc flags through the call to mex/mexcuda, and if so how might the call to mex above be modified to do so?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with GPU Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!