Revert "add a cast function that suppresses -Wcast-function-type-strict (#100170)"
This reverts commit 642f4ed606b3d66bab21d44019ae5762637eeca9.
Reverted https://github.com/pytorch/pytorch/pull/100170 on behalf of https://github.com/atalman due to breaking internal builds ([comment](https://github.com/pytorch/pytorch/pull/100170#issuecomment-1540140636))