Add set_to_none option to C++ API (#68801)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/68167.
Signed-off-by: Vinnam Kim <vinnam.kim@makinarocks.ai>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68801
Reviewed By: mruberry
Differential Revision: D32625239
Pulled By: jbschlosser
fbshipit-source-id: 5f09b959e23d5448106a47029d06ec20ad094d82