Commit Graph

5 Commits

Author SHA1 Message Date
6993e4a9f7 Caffe2 Functional enforcing inplace output (#10797)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10797

A few operators enforces in-place output (e.g., running mean/var for SpatialBN). Functional right now doesn't follow the inplace_enforced_ rules in OpSchema and therefore, the RunNetOnce() will fail on OpSchema->Verify(). Edit the output_names in Functional following the rules to pass check.

Reviewed By: jerryzh168

Differential Revision: D9470582

fbshipit-source-id: 168efeccecc32184bd1d02f3fefe8e61faa4e0f4
2018-08-23 22:42:47 -07:00
e5fe66d7ea Add support for specifying device_option in Functional (#9619)
Summary:
e.g.
```
Functional.Add(x, y, device_option=DeviceOption(HIP, 0))

```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/9619

Differential Revision: D8966599

Pulled By: bddppq

fbshipit-source-id: 22235e42f19278e79802642798bf0ee70a1202f6
2018-07-24 14:41:59 -07:00
1d5780d42c Remove Apache headers from source.
* LICENSE file contains details, so removing from individual source files.
2018-03-27 13:10:18 -07:00
8286ce1e3a Re-license to Apache
Summary: Closes https://github.com/caffe2/caffe2/pull/1260

Differential Revision: D5906739

Pulled By: Yangqing

fbshipit-source-id: e482ba9ba60b5337d9165f28f7ec68d4518a0902
2017-09-28 16:22:00 -07:00
23f4f78c22 Functional C2
Summary:
Supporting calling C2 operators as functions, e.g.
```
from caffe2.python.functional import Functional
Y = Functional.Relu(X)[0]
```
Supporting numpy arrays as input for now.

Reviewed By: bddppq

Differential Revision: D5791821

fbshipit-source-id: 7e936ad52b8b304c5e210248bd6649fd066cd909
2017-09-13 15:37:28 -07:00