User Guide

  • 2021.2
  • 03/26/2021
  • Public Content
Contents

Mismatched Queue

Occurs when a pointer allocated for a certain queue is used for a different queue.
Problem type: Memory leak
ID
Code Location
Description
1
Allocation site
Represents source location of memory allocation in a Data Parallel C++ (DPC++) code.
DPC++ programs use queues for planning tasks for kernels. Each pointer is allocated for a certain device and is associated with a certain queue. Using a pointer allocated for one queue with another queue results in an error.
DPC++ Example
cl::sycl::queue queue_1(cl::sycl::cpu_selector{}); cl::sycl::queue queue_2(cl::sycl::cpu_selector{}); int* deviceData = (int*)sycl::malloc_device(sizeInBytes, queue_1.get_device(), queue_1.get_context()); queue_2.memcpy(deviceData, hostData, sizeInBytes).wait(); // it should be queue_1.memcpy(deviceData, hostData, sizeInBytes).wait();

Possible Correction Strategies

Consider reducing the amount of queues or using one queue if possible.
If you are using multiple queues, consider using shared memory pointers.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.