Fix 'unknown type name 'optional'' (#14383)
authorBram Wasti <bwasti@fb.com>
Sat, 1 Dec 2018 01:27:22 +0000 (17:27 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 1 Dec 2018 01:29:50 +0000 (17:29 -0800)
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
aten/src/ATen/templates/Type.h

index 2e38e83..fd480b4 100644 (file)
@@ -135,7 +135,7 @@ struct CAFFE2_API Type {
     return backendToDeviceType(backend());
   }
 
-  virtual Tensor copy(const Tensor & src, bool non_blocking=false, optional<Device> to_device={}) const = 0;
+  virtual Tensor copy(const Tensor & src, bool non_blocking=false, c10::optional<Device> to_device={}) const = 0;
   virtual Tensor & copy_(Tensor & self, const Tensor & src, bool non_blocking=false) const = 0;
 
   virtual void backward(
index fd79fcc..6afb82d 100644 (file)
@@ -106,7 +106,7 @@ struct CAFFE2_API Type {
     return backendToDeviceType(backend());
   }
 
-  virtual Tensor copy(const Tensor & src, bool non_blocking=false, optional<Device> to_device={}) const = 0;
+  virtual Tensor copy(const Tensor & src, bool non_blocking=false, c10::optional<Device> to_device={}) const = 0;
   virtual Tensor & copy_(Tensor & self, const Tensor & src, bool non_blocking=false) const = 0;
 
   virtual void backward(