开发者

cuda surface memory error

开发者 https://www.devze.com 2023-03-13 04:29 出处:网络
My cuda code works fine. but when I include the follo开发者_如何学编程wing on top of my code it gives some errors.

My cuda code works fine. but when I include the follo开发者_如何学编程wing on top of my code it gives some errors.

surface<void,2> sImg;

fatal   : Parsing error near '.surf': syntax error

How can I solve this?

When I declare "sImg" inside the main method it compiles..


The following doesnt work..

surface<void,2> sImg;

int main()
{
    return 0;
}


I changed Properties-->CUDA Runtime API-->GPU-->GPR Architecture1 to sm_20 Now it compiles..


Are you declaring it inside a .cu file where the kernel using the surface is declared ?

That statements needs to be parsed by the nvcc compiler to become effective.

If that does not work then post the error log of the compiler.

0

精彩评论

暂无评论...
验证码 换一张
取 消