Skip to content

commonfns: test_unary_fn returns CL_DEVICE_NOT_FOUND on verification failure instead of appropriate error #2600

@funch0za

Description

@funch0za

In the commonfs test, the test_unary_fn test case returns -1 if the calculated values are not equal to the reference values.
Excerpt from the test_unary_fn test case:

if (verifyFn((T *)&input_ptr.front(), (T *)&output_ptr.front(),                                                                            
                     n_elems * (i + 1)))                                                                                                           
        {                                                                                                                                          
            log_error("%s %s%d test failed\n", fnName.c_str(), tname.c_str(),                                                                      
                      ((g_arrVecSizes[i])));                                                                                                       
            err = -1;                                                                                                                              
        }

The -1 code corresponds to CL_DEVICE_NOT_FOUND.
Maybe in this case, you need to change the error code to another one? CL_DEVICE_NOT_FOUND may be misleading.

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