run gpu function using matlab

i am writing the following command to use gpu:
k=parallel.gpu.CUDAKernel('STOMP.ptx', 'STOMP.cu','WavefrontUpdateSelfJoin')
using matlab 2015a on Windows 7. I get the following error at runtime:
error using parallel.internal.gpu.handleKernelArgs>iParseToken (line272)
unsupported type argument specification 'volatile unsigned long long int* profile'
error in parallel.internal.gpu.handleKernelArgs>iParseCPrototype (line 191)
error in parallel.internal.gpu.handleKernelArgs (line 79)

回答 (2 件)

Joss Knight
Joss Knight 2017 年 5 月 22 日

0 投票

The argument parser cannot handle your type qualifier 'volatile' in order to work out the appropriate datatypes of arrays to pass to the kernel.
Either remove the qualifier 'volatile' (which is meaningless for a function argument anyway), or specify the prototype of your kernel function directly as a string instead of passing the .cu file in its entirety.
Mohsen Moftah
Mohsen Moftah 2017 年 5 月 25 日
編集済み: Walter Roberson 2017 年 5 月 25 日

0 投票

I removed the 'volatile' qualifier from the .cu file and regenerated the .ptx. but i got the following
error when using parallel.gpu.CUDAKernel:
an error occurred during PTX compilation of <image>
The information log was:
<No information>
The error log was:
<No information>
the CUDA error code was: CUDA_ERROR_UNKONWN

1 件のコメント

Joss Knight
Joss Knight 2017 年 5 月 29 日
編集済み: Joss Knight 2017 年 5 月 29 日
Did you recompile your kernel?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGPU Computing についてさらに検索

製品

質問済み:

2017 年 5 月 21 日

編集済み:

2017 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by