Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

in-order command execution bug #13

Open
@xrataj00

Description

@xrataj00

Following OPENCV test code outputs "fail" every few seconds based on GPU usage. It is using clEnqueueNDRangeKernel internally.

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>

#include <iostream>
#include <unistd.h>

using namespace cv;
using namespace std;

int main( int argc, char** argv ) {    
    UMat uimage = cv::UMat::zeros(640,640, CV_8U);
   
    while(1) {
        UMat uimage_res, uimage_canny;
        Mat image;
        
        uimage_canny = cv::UMat(uimage.rows,uimage.cols, CV_8U,255);
        Canny(uimage, uimage_canny, 20,50, 3);
       
        resize(uimage_canny,uimage_res, Size(500,500));        
        uimage_res.copyTo(image);
        
        if(image.at<uchar>(0,0) != 0) cout << "fail" << endl;
    }    
    
    return 0;
}

I have tested following debian packages:
1.3.0 OK
1.3.1 OK
1.3.2 FAIL

And last 3 commits:
e1b2419 OK
ab45f14 FAIL
fc5f430 FAIL

Looks like it has something to do with out of order execution which was added in last two commits because when I change:
https://github.com/intel/beignet/blob/master/src/cl_api_kernel.c#L226
to:

cl_bool allow_immediate_submit = false;

It is running fine. But that does not explain why release 1.3.2 is failing too.

Because compute-runtime is still quite far away for debian it would be nice if you can take a look on that. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions