Fix constant folding of arithmetic operations with symbolic values. (#108160)
Partial fix: #108067
This PR fixes an inductor bug where it assumed the type of arithmetic nodes arguments were
all `Tensor`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108160
Approved by: https://github.com/lezcano