inductor: add device and dtype check before doing cpu fx packed weight (#99028)
fix https://github.com/pytorch/pytorch/issues/96406 and https://github.com/pytorch/pytorch/issues/98979
Pull Request resolved: https://github.com/pytorch/pytorch/pull/99028
Approved by: https://github.com/jgong5, https://github.com/jansel