Software Archive
Read-only legacy content
17061 Discussions

How to use CAO mode (Compiler Assisted Offload) of MKL

yu__frank
Beginner
330 Views

Hello everyone

I want use the CAO mode of MKL.

I writed a sample code ,

#pragma offload target(mic) \

    in(n, alpha, incx, incy) \
    in(x:length(n)) \
    in(y:length(n)) \
    out(y:length(n))
{
    cblas_caxpy(n, &alpha, x, incx, y, incy);
}

Compiler ICC printf some error message:

mkl_test.cpp(63): error: function "cblas_caxpy" called in offload region must have been declared with compatible "target" attribute
        cblas_caxpy(n, &alpha, x, incx, y, incy);

 

So , Is the MKL(2017) support 's CAO mode.

0 Kudos
1 Solution
2 Replies
Loc_N_Intel
Employee
331 Views
0 Kudos
yu__frank
Beginner
330 Views

Nguyen .

Thanks for response.

I run the example successful.

There is another important thing to note here. The MKL library of MIC is not installed by default, you need to manually install it.

0 Kudos
Reply