SIGN IN SIGN UP

Fix accessing nullptr in some ops

Summary:
When dim is 0, some data pointers in a tensor, like Tensor.strides() and Tensor.sizes() is nullptr. We should not access it, even though it's a no-op in a memcpy.

This is enforced in fbcode but not xplat.

Reviewed By: manuelcandales

Differential Revision: D48477031

fbshipit-source-id: 582da830dc47869cad2a8675cf928e3c8f1d8e43
H
Hansong Zhang committed
ce5d965d17a71168de95e1431369c9d71b8f1671
Parent: 19a5994
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 8/18/2023, 7:47:52 PM