mex/mexcuda for a target GPU
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with GPU Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!