mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
[nnc] Fixed warning due to implicit parameter conversion (#64117)
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
This commit is contained in:
parent
d3bcba5f85
commit
a836d83957
|
|
@ -319,11 +319,16 @@ class TORCH_API BufHandle : public ExprHandle {
|
|||
// 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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user