Add guard for named tensors in the JIT (#25344)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25344
Test Plan
- [namedtensor ci]
Test Plan: Imported from OSS
Differential Revision: D17101487
Pulled By: zou3519
fbshipit-source-id: d6170a809dfd98e6a4dba8450433c439962991cc