Visible to Intel only — GUID: GUID-9C7A97C5-DEC0-455B-810C-8E28522AA6F4
Visible to Intel only — GUID: GUID-9C7A97C5-DEC0-455B-810C-8E28522AA6F4
DPCT1097
Message
The function <backward function name> may require the workspace used to save intermediate results from function <forward function name>. By default, a workspace from engine_ext is selected according to the source data pointer, but this may be incorrect and cause a workspace data race. You may need to rewrite this code.
Detailed Help
You can manually pass a dnnl::memory object generated from the forward function to the backward function.
For example, this original CUDA* code:
cudnnLRNCrossChannelForward(handle, ...); ... cudnnLRNCrossChannelBackward(handle, ...);
results in the following migrated SYCL* code:
handle.lrn_forward(...); ... handle.lrn_backward(...);
which is manually adjusted to:
dnnl::memory workspace; handle.lrn_forward(..., &workspace); ... handle.lrn_backward(..., &workspace);
Suggestions to Fix
You may need to adjust the original code.