[jit] Cloning constants in ClassType (#32371)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32371
After we add constants to ClassType, we didn't update clone to
clone the constants, this PR adds the support
fixes: https://github.com/pytorch/pytorch/issues/32368
Test Plan:
python test/test_jit.py
Imported from OSS
Differential Revision: D19564378
fbshipit-source-id: dbb13fb889d6ea9291034313b1f3c9aff4748bda