[inductor] generate nan in the cpp backend (#89289)
Summary: Fixes https://github.com/pytorch/torchdynamo/issues/1797
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89289
Approved by: https://github.com/ngimel, https://github.com/jansel, https://github.com/jgong5