Intel® Inspector User Guide for Linux* OS

ID 767796
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Host Pointer Used on Device

Occurs when a pointer from a program executed on host is used to pass data directly to a device kernel.

ID

Code Location

Description

1

Allocation site

Represents a source location of a host pointer used to pass data directly to a device kernel.

DPC++ Example

int* inputPtr = new int[N];  //host pointer 

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

    { 

        cgh.parallel_for<class kernel1>(range, 

                                    [=](cl::sycl::item<1> itemID) 

                                    { 

                                        size_t i = itemID.get_id(0); 

                                        inputPtr[i] = i + 1;    

                                    }); 

    }).wait(); 

Possible Correction Strategies

Consider using buffers, shared memory pointers, or device pointers to avoid passing data using host pointers.