Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

windrvr6.sys lead to blue Screen

I am implementing Support Vector Machine(SVM) predict function on de5net_a7 but I have some problem that the program will lead blue screen on win10 and win7 system,

The OpenCL program working properly on GPU,and the sdk can generate .aocx file,my SDK version is 16.1,how can i solve this problem. Thank you very much.

This is my kernel code:
#define GSIZE 64
__attribute__((num_simd_work_items(4)))
__attribute__((reqd_work_group_size(1,1,64)))
__kernel void classification(__global uchar * restrict textures, __global uchar * restrict SVS,  __global float * restrict alphas,
                    float gamma,__global float * restrict result)
{
    uint gidx = get_global_id(0);    //img_w
    uint gidy = get_global_id(1);    //img_h
    uint gidz = get_global_id(2);    //sv_num
    int img_w = get_global_size(0);
    uint lid = get_local_id(2);    //64
    uint group_size_z = get_num_groups(2);
    uint group_id_z = get_group_id(2);
    __local uchar texture;
    __local float alpha_local;
    __local float res;
    __local float gamma_local;
    if(lid==0){
        gamma_local = gamma;
       # pragma unroll
        for(int i=0;i<90;i++){
            texture = textures;
            if(i<GSIZE){
                alpha_local = alphas;
            }
        }
    }
    barrier(CLK_LOCAL_MEM_FENCE);
    int temp = 0;
    int i=0;
   # pragma unroll
    for(i=0;i<86;i+=4){
        int t0 = SVS-texture;
        int t1 = SVS-texture;
        temp += t0*t0+t1*t1;
        t0 = SVS-texture;
        t1 = SVS-texture;
        temp += t0*t0+t1*t1;
    }
   # pragma unroll
    for(;i<90;i++){
        int t0 = SVS-texture;
        temp += t0*t0;
    }
    res = alpha_local*exp(-1*gamma_local*(float)temp);
    barrier(CLK_LOCAL_MEM_FENCE);
    if(lid==0){
        float sum=0;
       # pragma unroll
        for(int i=0;i<GSIZE-3;i+=4){
            sum += res;
            sum += res;
            sum += res;
            sum += res;
        }
        result = sum;
    }
}

https://alteraforum.com/forum/attachment.php?attachmentid=14263&stc=1

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    This problem is not related to your kernel or code; this is either related to Altera's PCI-E driver, or the driver of some other device installed on your machine. Have you been able to successfully run the diagnose script to make sure your board works correctly?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you for your reply, the diagnose script can run successfully and other kernel works correctly on my board...

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That is strange; however, my original point still stands. Blue Screens in Windows are either caused by faulty hardware or bugs in device drivers; in your case, it is probably the latter. I would contact Terasic in this case and send them the kernel dump from the Blue Screen so that they can analyze it and find the bug in the driver.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I really appreciate your generous help&#65292; I will test the program on linux&#65292;thanks again!