Open amberhassaan opened 1 year ago
I should also add that the output tensor dx
for backward pass also fails verification when workspace
is not zeroed
out. CC: @JehandadKhan
@JehandadKhan @amberhassaan The workspace content should not be part of the verification process at all, this buffer is necessary for the library to store intermediate calculations, they may differ in different solvers and this is normal.
If an error is found in the library, accompany your messages with an example of code or command line how to reproduce it.
@amberhassaan Is this ticket still relevant? Thanks!
I believe it is.
In function
verify_bacward_data_lstm<T>::gpu()
we seemingly inadvertently rely on the workspace beingzeroed out
. We create astd::vector
for workspace just to create a gpu bufferworkspace_dev
withhandle.Write()
. Creating this vector has a subtle effect of zeroing out the GPU buffer when the copy happens. If we don't zero out the workspace, theverify_backward_data_lstm
fails when it tries to compare the::gpu
workspace with::cpu
workspace.CC: @JehandadKhan .