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!