dynamo: Don't crash with internal error if getattr on a tensor fails (#144817)
Summary:
This prevents crashes when getattr is called on a tensor for something
which doesn't exist.
X-link: https://github.com/pytorch/pytorch/pull/144817
Approved by: https://github.com/williamwen42, https://github.com/jansel
Reviewed By: kit1980
Differential Revision: D68304676
Pulled By: c00w
fbshipit-source-id: aabd53d950a19e2837ff15e11a39cc1771ac4ec5