Visible to Intel only — GUID: GUID-465D5BEC-CA46-4073-839F-A8E4D401A610
Visible to Intel only — GUID: GUID-465D5BEC-CA46-4073-839F-A8E4D401A610
DPCT1024
Message
The original code returned the error code that was further consumed by the program logic. This original code was replaced with 0. You may need to rewrite the program logic consuming the error code.
Detailed Help
This warning is generated in cases where in the original code, the CUDA* API call returns the error code, which is consumed by the program logic:
handleError(cudaEventRecord(e));
If in the resulting code the CUDA API call is replaced by the code, which does not return the error code, 0 is used as an input to the program logic, consuming the error code:
e_ct1 = clock(), handleError(0);
The error handling code in that case must be verified and may require replacing it with exception handling code or removed completely.
Suggestions to Fix
Verify the code correctness.
For example, this original CUDA code:
void foo() {
cudaEvent_t e;
...
handleError(cudaEventRecord(e));
...
}
results in the following migrated SYCL* code:
void foo() {
dpct::event_ptr e;
std::chrono::time_point<std::chrono::steady_clock> e_ct1;
...
/*
DPCT1024:1: The original code returned the error code that was further
consumed by the program logic. This original code was replaced with 0. You may
need to rewrite the program logic consuming the error code.
*/
e_ct1 = std::chrono::steady_clock::now();
handleError(0);
...
}
which is rewritten to:
void foo() {
dpct::event_ptr e;
std::chrono::time_point<std::chrono::steady_clock> e_ct1;
...
e_ct1 = std::chrono::steady_clock::now();
...
}