Treat Scalar parameter as if it is constant (#53582)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53582
We will pass `Scalar` by reference in the following commit,
i.e. `const Scalar&`.
ghstack-source-id: 123965970
Test Plan: Imported from OSS
Reviewed By: smessmer
Differential Revision: D26904444
fbshipit-source-id: 7f58ee4e38dcd860f0d1120cab4e82f35ca3770f