Commit 9e7cca9d authored by rocking's avatar rocking
Browse files

Add comment

parent 4726df77
...@@ -163,6 +163,8 @@ bool maxpool_bwd_test(bool do_verification, ...@@ -163,6 +163,8 @@ bool maxpool_bwd_test(bool do_verification,
size_t pool_bwd_workspace_sz = pool_bwd.GetWorkSpaceSize(pool_bwd_argument_ptr.get()); size_t pool_bwd_workspace_sz = pool_bwd.GetWorkSpaceSize(pool_bwd_argument_ptr.get());
DeviceMem pool_bwd_workspace_device_buf(pool_bwd_workspace_sz); DeviceMem pool_bwd_workspace_device_buf(pool_bwd_workspace_sz);
// similar to din_device_buf.SetZero()
// we need to set workspace to be zero
pool_bwd_workspace_device_buf.SetZero(); pool_bwd_workspace_device_buf.SetZero();
pool_bwd.SetWorkSpacePointer(pool_bwd_argument_ptr.get(), pool_bwd.SetWorkSpacePointer(pool_bwd_argument_ptr.get(),
pool_bwd_workspace_device_buf.GetDeviceBuffer()); pool_bwd_workspace_device_buf.GetDeviceBuffer());
......
...@@ -244,6 +244,7 @@ struct DeviceIndexPoolBwdImpl : public DeviceIndexPoolBwd<DOutDataType, IndexDat ...@@ -244,6 +244,7 @@ struct DeviceIndexPoolBwdImpl : public DeviceIndexPoolBwd<DOutDataType, IndexDat
} }
}; };
// User need to set the value of workspace to zero
size_t GetWorkSpaceSize(const BaseArgument* pArg) const override size_t GetWorkSpaceSize(const BaseArgument* pArg) const override
{ {
const Argument* pArg_ = dynamic_cast<const Argument*>(pArg); const Argument* pArg_ = dynamic_cast<const Argument*>(pArg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment