diff options
author | Sebastian Messmer <messmer@fb.com> | 2018-09-10 12:31:22 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-09-10 12:40:16 -0700 |
commit | ce6906b05116a0ef9dfd3e52284c0fcf77186129 (patch) | |
tree | b2a8c2ec874b07cfbb5a890d702c807f7bb0e22d /caffe2/operators/if_op.h | |
parent | 040d75d455cb2963de9a147001f11f63459c0620 (diff) | |
download | pytorch-ce6906b05116a0ef9dfd3e52284c0fcf77186129.tar.gz pytorch-ce6906b05116a0ef9dfd3e52284c0fcf77186129.tar.bz2 pytorch-ce6906b05116a0ef9dfd3e52284c0fcf77186129.zip |
Narrowing Blob (#11167)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11167
Narrow the Blob API as preparation for merging Blob/IValue
- get rid of templated IsType and Operator::InputIsType / OutputIsType
- Use 'using' instead of 'typedef' for DestroyCall (just for readability)
Reviewed By: ezyang
Differential Revision: D9623916
fbshipit-source-id: 952f0b0cf5a525094b02e8d2798dd57a56a9e1d8
Diffstat (limited to 'caffe2/operators/if_op.h')
-rw-r--r-- | caffe2/operators/if_op.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/caffe2/operators/if_op.h b/caffe2/operators/if_op.h index cff2a620ef..e76fea0ee8 100644 --- a/caffe2/operators/if_op.h +++ b/caffe2/operators/if_op.h @@ -32,7 +32,7 @@ class IfOp final : public Operator<Context> { bool RunOnDevice() override { CAFFE_ENFORCE( - this->template InputIsType<Tensor>(0, Context::GetDeviceType()), + this->InputIsTensorType(0, Context::GetDeviceType()), "Invalid condition in If operator: tensor expected"); const auto& condition = Input(0); |