Fix missing return in HIPStreamMasqueradingAsCUDA::operator<< (#17961)
authorJunjie Bai <bai@in.tum.de>
Wed, 13 Mar 2019 23:01:45 +0000 (16:01 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 13 Mar 2019 23:04:42 +0000 (16:04 -0700)
Summary:
```
In file included from /var/lib/jenkins/workspace/aten/src/ATen/native/hip/BatchLinearAlgebra.hip:3:
In file included from /var/lib/jenkins/workspace/aten/src/ATen/hip/HIPContext.h:5:
/var/lib/jenkins/workspace/aten/src/ATen/hip/impl/HIPStreamMasqueradingAsCUDA.h:107:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
1 warning generated.
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17961

Reviewed By: houseroad

Differential Revision: D14436421

Pulled By: bddppq

fbshipit-source-id: 962665602178699d7c7b55f4ca7ff1eb72ee0349

aten/src/ATen/hip/impl/HIPStreamMasqueradingAsCUDA.h

index f37aa22..77176a3 100644 (file)
@@ -104,6 +104,7 @@ inline void setCurrentHIPStreamMasqueradingAsCUDA(HIPStreamMasqueradingAsCUDA st
 
 inline std::ostream& operator<<(std::ostream& stream, const HIPStreamMasqueradingAsCUDA& s) {
   stream << s.hip_stream() << " (masquerading as CUDA)";
+  return stream;
 }
 
 }} // namespace c10::hip