Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

Inspector Executor COO

$
0
0

Hi,

I tried Inspector Executor using CSR storage format and it is fine. But when I tried the COO version, I get 

SPARSE_STATUS_NOT_SUPPORTED error, in the mkl_sparse_optimize function. Here is a my code:

//Get COO Arrays
//IF you need the implementation of this function I can provide it, I can sort based on column or row used both same error
    ExtractCoo(argv[1], &nr, &nc, &nnz, &rows, &columns, &A);

    float * x = (float*)malloc(nc * sizeof(float)),
        *y = (float*)malloc(nr * sizeof(float));


    //3) Prepare X Array
    for (int i = 0; i < nc; i++)
    {
        x[i] = static_cast <float> (rand()) / static_cast <float> (RAND_MAX);

    }

CALL_AND_CHECK_STATUS(
            mkl_sparse_s_create_coo(&cooInternal, SPARSE_INDEX_BASE_ONE, nr, nc,nnz, rows, columns, A),"Error in csrCreate \n");

 CALL_AND_CHECK_STATUS(
            mkl_sparse_set_mv_hint(cooInternal, SPARSE_OPERATION_NON_TRANSPOSE, martixDescription, runs),
            "Error after Sparse Hint \n");

 mkl_sparse_set_memory_hint (cooInternal, SPARSE_MEMORY_AGGRESSIVE);

CALL_AND_CHECK_STATUS(
            mkl_sparse_optimize(cooInternal),
            "Error after MKL_SPARSE_OPTIMIZE \n"); // Here I get an error

 // Cold Start
mkl_sparse_s_mv(SPARSE_OPERATION_NON_TRANSPOSE, 1, cooInternal, martixDescription, x, 0, y);

 for (int i = 0; i < runs; i++)
{
            stime = dsecnd();
            mkl_sparse_s_mv(SPARSE_OPERATION_NON_TRANSPOSE, 1, cooInternal, martixDescription, x, 0, y);
            etime = dsecnd();
            runResults[i] = (etime - stime);
 }

 

So what am I doing wrong ?

 

Thanks,

Mohammad Almasri

 

 


Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>