【问题标题】:CUDA cudaDeviceSynchronize complete Error codes reference? [duplicate]CUDA cudaDeviceSynchronize 完整的错误代码参考? [复制]
【发布时间】:2017-05-21 22:06:02
【问题描述】:

我收到“CudaDeviceSynchronize 在运行后返回错误代码 75 一些 内核

(听起来我的代码中缺少一些简单的东西)

但我没有找到关于该代码的任何参考/问答/主题,而 cuda-memcheck 仅指其他错误,而不是生成错误代码 75 的错误。

我想知道是否有任何 CUDA 内置函数来描述这段代码?

或任何列出错误代码的官方/非官方(在线)参考资料?

谢谢! :)

【问题讨论】:

    标签: cuda


    【解决方案1】:
    1. 在 cuda 文档中查找函数。 CudaDeviceSynchronize 被描述为 here

    __host__ ​ __device__ ​cudaError_t cudaDeviceSynchronize ( void )

    1. 所以您的错误代码 75 的类型为 cudaError_t

    2. 在 cuda 标头中查找 cudaError_t 枚举定义。它位于include/driver_types.h。并得到错误 75

    /**
    * While executing a kernel, the device encountered an instruction
    * which can only operate on memory locations in certain address spaces
    * (global, shared, or local), but was supplied a memory address not
    * belonging to an allowed address space.
    * The context cannot be used, so it must be destroyed (and a new one should be created).
    * All existing device memory allocations from this context are invalid
    * and must be reconstructed if the program is to continue using CUDA.
    */
    cudaErrorInvalidAddressSpace          =     75,
    

    【讨论】:

    • 你刚刚学会了一个人如何钓鱼 :) 谢谢!我将本地声明的非指针变量分配给全局数组的元素。
    猜你喜欢
    • 2014-05-28
    • 2011-04-20
    • 2016-05-03
    • 2010-09-07
    • 1970-01-01
    • 2012-03-31
    • 2016-01-29
    • 2012-10-14
    相关资源
    最近更新 更多