[TensorExpr] Make tensorOrConstant non-templatized function. (#42202)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42202
Currently we used the template in order to be able to take both
`std::vector<ExprHandle>` and `std::vector<VarHandle>`. However,
semantics of this function tells that the only allowed option should be
the former one: we're specifying indices for the tensor access we want
to generate. While it could be convenient to avoid conversion from
vector of vars to a vector of exprs at the callsites, it makes the code
less explicit and thus more difficult to reason about.
Test Plan: Imported from OSS
Reviewed By: SplitInfinity
Differential Revision: D22806429
Pulled By: ZolotukhinM
fbshipit-source-id: 8403af5fe6947c27213050a033e79a09f7075d4c
Author
Mikhail Zolotukhin