correct some cpp extension code usages and documents (#39766)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/39766
Test Plan: Imported from OSS
Differential Revision: D21967284
Pulled By: glaringlee
fbshipit-source-id: 8597916bee247cb5f8c82ed8297119d2f3a72170