Run CUDA or PTX Code on GPU

1 次查看(过去 30 天)
Mikhail
Mikhail 2014-12-16
编辑: matt dash 2014-12-16
Hi all, I have a problem with running CUDA code on GPU. According to Run CUDA or PTX Code on GPU, I have to create PTX file from my kernel.cu file. I did it with VS2013: Converting CUDA .cu file to PTX file.
But after I tried to run it in Matlab, I got an error:
Error using iCheckPTXEntryAgainstCProto (line 370) The number of inputs to the PTX code (0) is NOT the same as the number of inputs in the C prototype (6)
On VS2013 everything runs ok. Can one specify, how kernel.cu must look in order everything to be ok? May be one provide me a simple valid CUDA kernel (like adding two vectors on GPU). Thanks

回答(1 个)

matt dash
matt dash 2014-12-16
编辑:matt dash 2014-12-16
I'm not sure, but this sounds like some kind of compilation error maybe, or an error in how you're calling the ptx file from matlab. It might help if you posted your code. Basically matlab is parsing both your .cu file and your .ptx file, and it's finding that they have different numbers of input arguments.
Since both the .cu and .ptx file are plain text, you might be able to skim them and see whether they have the same number of inputs. (The ptx is not quite human-readable, but you should at least be able to find where the inputs are defined)
Edit: might also help to see exactly what command you're running to compile the ptx file.

类别

Help CenterFile Exchange 中查找有关 GPU Computing 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by