gpt4 book ai didi

crash - 遇到CUDA不可纠正的ECC错误

转载 作者:行者123 更新时间:2023-12-03 15:24:37 25 4
gpt4 key购买 nike

我的环境是

  • Windows 7 x64
  • Matlab 2012a x64
  • Cuda SDK 4.2
  • Tesla C2050 GPU

  • 我在弄清楚为什么我的GPU因“遇到无法纠正的ECC错误”而崩溃时遇到了麻烦。仅当我使用512个或更多线程时,才会发生此错误。我无法发布内核,但是我将尝试描述它的作用。

    通常,内核采用多个参数,并产生2个由线程大小M和另一个数字N定义的复杂矩阵。因此,返回的矩阵大小为MxN。典型的配置是512x512,但是每个数字都是独立的,并且可以向上或向下变化。当数字为256x256时,内核工作。

    每个线程(内核)基于线程ID(即大小999xM)从2D数组中提取999大小的向量,然后循环通过输出矩阵的行(0 .. N-1)进行计算。仅在 + - * /运算符之间使用pow,sin和cos计算了许多中间参数。要计算输出矩阵之一,需要执行一个附加循环以汇总先前提取的999向量的贡献。该循环进行一些中间计算,以确定允许贡献的值的范围。然后,通过由计算出的分数值的余弦值和正弦值确定的因子来缩放贡献。这是它崩溃的地方。如果我坚持使用恒定值或1.0或其他任何值,则内核执行不会有麻烦。但是,当仅包含一个调用(cos或正弦)时,内核崩溃。

    一些伪代码如下:
    kernel()
    {

    /* Extract 999 vector from 2D array 999xM - one 999 vector for each thread. */
    for (int i = 0; i < 999; i++)
    {
    .....
    }

    /* Cycle through the 2nd dimension of the output matricies */
    for (int j = 0; j < N; j++)
    {
    /* Calculate some intermediate variables */

    /* Calculate the real and imaginary components of the first output matrix */
    /* real = cos(value), imaginary = sin(value) */

    /* Construct the first output matrix from some intermediate variables and the real and imaginary components */

    /* Calculate some more intermediate variables */

    /* cycle through the extracted vector (0 .. 998) */
    for (int k = 0; k < 999; k++)
    {

    /* Calculate some more intermediate variables */

    /* Determine the range of allowed values to contribute to the second output matrix. */

    /* Calculate the real and imaginary components of the second output matrix */
    /* real = cos(value), imaginary = sin(value) */
    /* This is were it crashes, unless real and imaginary are constant values (1.0) */

    /* Sum up the contributions of the extracted vector to the second output matrix */

    }
    /* Construct the Second output matrix from some intermediate variables and the real and imaginary components */

    }
    }

    我以为这可能是由于寄存器限制所致,但是占用计算器表明情况并非如此,我所使用的少于32,768个具有512个线程的寄存器。任何人都可以对造成这种情况的原因提出任何建议吗?

    这是ptasx信息:
    ptxas info    : Compiling entry function '_Z40KerneliidddddPKdS0_S0_S0_iiiiiiiiiPdS1_S1_S1_S1_S1_S1_S1_S1_S1_' for 'sm_20' 

    ptxas info : Function properties for _Z40KerneliidddddPKdS0_S0_S0_iiiiiiiiiPdS1_S1_S1_S1_S1_S1_S1_S1_S1_

    8056 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads

    ptxas info : Function properties for __internal_trig_reduction_slowpathd

    40 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads

    ptxas info : Used 53 registers, 232 bytes cmem[0], 144 bytes cmem[2], 28 bytes cmem[16]

    tmpxft_00001d70_00000000-3_MexFunciton.cudafe1.cpp

    最佳答案

    “不可纠正的ECC错误”通常是指硬件故障。 ECC是纠错码,一种检测和纠正RAM中存储的位中的错误的方法。宇宙射线会在很长一段时间内破坏一次存储在RAM中的位,但是“不可纠正的ECC错误”表示有几位从RAM存储中出来是“错误的”-对于ECC来说,恢复原始位值太多了。

    这可能意味着您的GPU设备内存中的RAM单元有故障或边缘不足。

    任何种类的边缘电路都不会100%失效,但是在大量使用和随之而来的温度升高的压力下更有可能失效。

    到处都有诊断实用程序,可以对PC的所有RAM组进行压力测试,以确认或查明哪个芯片发生故障,但是我不知道用于测试GPU的设备RAM组的模拟器件。

    如果您可以访问另一台具有类似功能的GPU的计算机,请尝试在该计算机上运行您的应用程序以查看其行为。如果您在第二台计算机上没有收到ECC错误,则可以确认该问题几乎可以肯定是第一台计算机的硬件造成的。如果您在第二台计算机上遇到相同的ECC错误,请忽略我在此处编写的所有内容,然后继续查找您的软件错误。除非您的代码实际上造成了硬件损坏,否则两台机器具有相同硬件故障的机会非常小。

    关于crash - 遇到CUDA不可纠正的ECC错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11839555/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com