[te] Fix casting of unsigned char, and abs(int) (#44157)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/44157
Test Plan: Imported from OSS
Reviewed By: navahgar
Differential Revision: D23528507
Pulled By: bertmaher
fbshipit-source-id: c5ef0422a91a4665b616601bed8b7cd137be39f9