Visible to Intel only — GUID: GUID-792C671F-11BC-4383-AE61-43BCF9D04226
Visible to Intel only — GUID: GUID-792C671F-11BC-4383-AE61-43BCF9D04226
DPCT1026
Message
The call to <API name> was removed because <reason>.
Detailed Help
API calls from the original application, which do not have functionally compatible SYCL* API calls are removed if Intel® DPC++ Compatibility Tool determines that it should not affect the program logic.
Possible reasons for removal:
SYCL currently does not support setting resource limits on devices.
SYCL currently does not support associating USM with a specific queue.
SYCL currently does not support query operations on queues.
SYCL currently does not support capture operations on queues.
SYCL currently does not support configuring shared memory on devices.
SYCL currently does not support setting cache config on devices.
SYCL currently does not support registering of existing host memory for use by device. Use USM to allocate memory for use by host and device.
SYCL currently does not support setting flags for devices.
SYCL currently does not support memory access across peer devices.
There is no corresponding API in SYCL.
The call is redundant in SYCL.
Suggestions to Fix
Verify the code correctness.
For example, this original CUDA* code:
__device__ void bar(int *a) {
__ldg(a);
}
__global__ void kernel() {
return;
}
void foo() {
cudaLimit limit;
cudaStream_t stream;
unsigned int flags;
cudaSharedMemConfig config;
cudaDeviceSetLimit(limit, 0);
cudaStreamAttachMemAsync(stream, nullptr);
cudaStreamQuery(stream);
cudaDeviceSetSharedMemConfig(config);
cudaDeviceSetCacheConfig(cudaFuncCachePreferNone);
cudaSetDeviceFlags(flags);
cuInit(0);
float *aptr;
cudaStreamAttrValue stream_attribute = {};
stream_attribute.accessPolicyWindow.base_ptr = aptr;
stream_attribute.accessPolicyWindow.num_bytes = 8 * 8 * 8;
stream_attribute.accessPolicyWindow.hitRatio = 1.0f;
stream_attribute.accessPolicyWindow.hitProp = cudaAccessPropertyPersisting;
stream_attribute.accessPolicyWindow.missProp = cudaAccessPropertyStreaming;
cudaStreamSetAttribute(stream, cudaStreamAttributeAccessPolicyWindow, &stream_attribute);
cudaStreamGetAttribute(stream, cudaStreamAttributeAccessPolicyWindow, &stream_attribute);
cudaCtxResetPersistingL2Cache();
cuCtxResetPersistingL2Cache();
cudaFuncSetAttribute(kernel, cudaFuncAttributeMaxDynamicSharedMemorySize, 8 * 8 * 8);
cudaFuncSetAttribute(kernel, cudaFuncAttributePreferredSharedMemoryCarveout, 8 * 8 * 8);
}
results in the following migrated SYCL code:
void bar(int *a) {
/*
DPCT1026:0: The call to __ldg was removed because there is no corresponding
API in SYCL.
*/
*a;
}
void kernel() {
return;
}
void foo() {
cudaLimit limit;
dpct::queue_ptr stream;
unsigned int flags;
int config;
/*
DPCT1026:1: The call to cudaDeviceSetLimit was removed because SYCL currently
does not support setting resource limits on devices.
*/
/*
DPCT1026:2: The call to cudaStreamAttachMemAsync was removed because SYCL
currently does not support associating USM with a specific queue.
*/
/*
DPCT1026:3: The call to cudaStreamQuery was removed because SYCL currently
does not support query operations on queues.
*/
/*
DPCT1026:4: The call to cudaDeviceSetSharedMemConfig was removed because SYCL
currently does not support configuring shared memory on devices.
*/
/*
DPCT1026:5: The call to cudaDeviceSetCacheConfig was removed because SYCL
currently does not support setting cache config on devices.
*/
/*
DPCT1026:6: The call to cudaSetDeviceFlags was removed because SYCL currently
does not support setting flags for devices.
*/
/*
DPCT1026:7: The call to cuInit was removed because this call is redundant in
SYCL.
*/
float *aptr;
/*
DPCT1007:8: Migration of cudaStreamAttrValue is not supported.
*/
cudaStreamAttrValue stream_attribute = {};
/*
DPCT1026:9: The call to cudaStreamSetAttribute was removed because SYCL currently
does not support setting cache config on devices.
*/
/*
DPCT1026:10: The call to cudaStreamGetAttribute was removed because SYCL currently
does not support setting cache config on devices.
*/
/*
DPCT1026:11: The call to cudaCtxResetPersistingL2Cache was removed because SYCL
currently does not support setting cache config on devices.
*/
/*
DPCT1026:12: The call to cuCtxResetPersistingL2Cache was removed because SYCL
currently does not support setting cache config on devices.
*/
/*
DPCT1026:13: The call to cudaFuncSetAttribute was removed because SYCL currently
does not support corresponding setting.
*/
/*
DPCT1026:14: The call to cudaFuncSetAttribute was removed because SYCL currently
does not support corresponding setting.
*/
}
which is rewritten to:
void bar(int *a) {
*a;
}
void foo() {
cudaLimit limit;
dpct::queue_ptr stream;
unsigned int flags;
size_t count;
int config;
float *aptr;
}