From fd17fd4aa9cf323a37412e6b29919a4320cb90d4 Mon Sep 17 00:00:00 2001 From: Bram Wasti Date: Fri, 30 Nov 2018 17:27:22 -0800 Subject: [PATCH] Fix 'unknown type name 'optional'' (#14383) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14383 D11669870 seems to have missed a spot that wasn't triggered before the stacked code above Reviewed By: smessmer Differential Revision: D13198269 fbshipit-source-id: 74592bedae0721acee744e31ca95253ea6efdedb --- aten/src/ATen/core/Type.h | 2 +- aten/src/ATen/templates/Type.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aten/src/ATen/core/Type.h b/aten/src/ATen/core/Type.h index 2e38e83..fd480b4 100644 --- a/aten/src/ATen/core/Type.h +++ b/aten/src/ATen/core/Type.h @@ -135,7 +135,7 @@ struct CAFFE2_API Type { return backendToDeviceType(backend()); } - virtual Tensor copy(const Tensor & src, bool non_blocking=false, optional to_device={}) const = 0; + virtual Tensor copy(const Tensor & src, bool non_blocking=false, c10::optional to_device={}) const = 0; virtual Tensor & copy_(Tensor & self, const Tensor & src, bool non_blocking=false) const = 0; virtual void backward( diff --git a/aten/src/ATen/templates/Type.h b/aten/src/ATen/templates/Type.h index fd79fcc..6afb82d 100644 --- a/aten/src/ATen/templates/Type.h +++ b/aten/src/ATen/templates/Type.h @@ -106,7 +106,7 @@ struct CAFFE2_API Type { return backendToDeviceType(backend()); } - virtual Tensor copy(const Tensor & src, bool non_blocking=false, optional to_device={}) const = 0; + virtual Tensor copy(const Tensor & src, bool non_blocking=false, c10::optional to_device={}) const = 0; virtual Tensor & copy_(Tensor & self, const Tensor & src, bool non_blocking=false) const = 0; virtual void backward( -- 2.7.4