长时间运行的任务上的OpenCL错误 [英] OpenCL errors on long running tasks

查看:129
本文介绍了长时间运行的任务上的OpenCL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在nVidia Quattro 6000设备上运行一个长期运行的内核.内核涉及一个包含数万次迭代的循环.

I'm running a long-running kernel on a nVidia Quattro 6000 device. The kernel involves a loop with tens of thousands of iterations.

运行内核时,两秒钟后屏幕变黑,Windows重新启动了GPU驱动程序,clFinish返回了错误.因此,我又获得了第二张GPU卡,仅用于显示,现在2秒钟的超时不再适用.

When I ran the kernel, after 2 seconds the screen went black, Windows restarted GPU drivers and clFinish returned an error. So I got myself a second GPU card just for displaying and now the 2 seconds timeout does not apply.

内核计算了50秒,然后出现了这些错误(前缀为"GPU ERROR"的行是clCreateContext错误回调打印的错误):

The kernel computed for 50 seconds and then there were these errors (lines prefixed by "GPU ERROR" are errors printed by clCreateContext error callback):

GPU ERROR:
CL_OUT_OF_RESOURCES error executing clFinish on Quadro 6000 (Device 0).

Computation finished, took 50 seconds (00:00:50)
GPU ERROR:
CL_OUT_OF_RESOURCES error waiting for idle on Quadro 6000 (Device 0).

clFinish() returned CL_OUT_OF_RESOURCES
GPU ERROR:
CL_OUT_OF_RESOURCES error waiting for idle on Quadro 6000 (Device 0).

我该怎么办?

为简单起见,这是此内核的精简版本.实际上,它在曲面上执行集成,这就是为什么我需要一个循环-但是这个简单的版本也崩溃了,因为n足够大.

For the sake of simplicity, this is a stripped down version of this kernel. In reality it performs integration over a curved surface, that's why I need a loop - but this simple version crashes too, for large enough n.

__kernel void integrate(
                 __global float *input,
                 __global float *output,
                 unsigned int n,
         float c)
{
  size_t kernel_idx = (get_global_id(1)*get_global_size(0) + get_global_id(0));
  if(kernel_idx < inputWidth*inputHeight*inputDepth)
  {
    int j;
    ...
    float sum = 0.0;

    for(j = 0; j < n; j++) // y
    {
      sum += input[j];
    }

    output[kernel_idx] = sum;
    }
}

推荐答案

检查您的TDR注册表项并进行相应调整

Check your TDR registry key and adjust accordingly

http://msdn.microsoft.com/zh-CN/library/windows/hardware/ff569918%28v=vs.85%29.aspx

这篇关于长时间运行的任务上的OpenCL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆