Intel® Inspector Help

Invalid Kernel Argument

Occurs when a null or an invalid pointer is passed to a kernel via buffer or queue.

Problem type: Memory leak

ID

Code Location

Description

1

Allocation site

Represents a source location of a pointer with no registered allocation operations or a deleted pointer.

cl::sycl::buffer<InputT, 1> inputBuf(inputPtr, size); 

    queue.submit([&](cl::sycl::handler &cgh) 

    { 

        auto inputAcc = inputBuf.template get_access<cl::sycl::access::mode::read>(cgh); 

        cgh.parallel_for<class my_task>(cl::sycl::range<1> { size }, [=](cl::sycl::id<1> idx) { 

            outputPtr[0] += some_function(inputAcc[idx]); 

       } 

    } 

A kernel argument is invalid if it contains:

Possible Correction Strategies

Depending on the type of invalid kernel argument, use the following correction hints: