Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64117
Test Plan: Imported from OSS
Reviewed By: ZolotukhinM
Differential Revision:
D30616945
Pulled By: navahgar
fbshipit-source-id:
eaf69232ac4a684ab5f97a54a514971655f86ef3
// object. For example: VarHandle x('x'); ExprHandle x2 = x;
class TORCH_API VarHandle : public ExprHandle {
public:
+ // Creates an empty VarHandle whose base Var is set to nullptr.
VarHandle() : ExprHandle() {}
+
explicit VarHandle(Dtype dtype) : ExprHandle(Var::make(dtype)) {}
+
VarHandle(const std::string& name_hint, Dtype dtype)
: ExprHandle(Var::make(name_hint, dtype)) {}
+
explicit VarHandle(VarPtr node) : ExprHandle(node) {}
+
VarPtr node() const {
return static_to<Var>(ExprHandle::node());
}