Implement c10 ops needed for benchmark#9360
Conversation
7ead30c to
6ac5c07
Compare
6ac5c07 to
0cd1fd0
Compare
caffe2/core/dispatch/DispatchTable.h
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/utils/SmallVector.h
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/utils/ArrayRef.h
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/utils/AlignOf.h
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Is this PR intended for merging, or just to put it somewhere where people can get to it? I see a lot of copy pasting and that makes me very nervous. Clearly in the terminal state, we don't want copy pasted copies of code. What is the justification for copy pasting to this degree? I am also wondering if there is too much boilerplate to be nimble here. For example, if I understand correctly, |
0cd1fd0 to
4b2641b
Compare
|
I'll remove the copy pasta. |
4b2641b to
de63f1f
Compare
de63f1f to
bb34304
Compare
bb34304 to
9829a04
Compare
9829a04 to
a148c77
Compare
a148c77 to
688d674
Compare
688d674 to
11a66b0
Compare
11a66b0 to
ffb3ed0
Compare
ffb3ed0 to
6b28774
Compare
6b28774 to
c165337
Compare
c165337 to
766d48f
Compare
766d48f to
c7c496b
Compare
c7c496b to
18d487c
Compare
Differential Revision: D9095209 fbshipit-source-id: 3bd23462c1b7baf86bc5d88643aefc9b4c21b6c8
Differential Revision: D8926785 fbshipit-source-id: f1f656e3ef20d102c163b083d6d378379e338490
Differential Revision: D8961693 fbshipit-source-id: 9f678e3fed8ff5942a097d64433eb909f6a07b33
Summary: This diff takes ArrayRef.h and moves it to ATen/core, including all its dependencies. Differential Revision: D9074144 fbshipit-source-id: 1069ad11b076296c26dd0b7b0f758fff9f2018b1
Summary:
This adds the capability for caffe2 to call c10 operators and adds a dummy c10 sigmoid op as a proof of concept.
I used this test script to make sure it works:
from caffe2.python import workspace, model_helper
import numpy as np
data1 = np.random.rand(16, 100).astype(np.float32)
workspace.FeedBlob("data1", data1)
m = model_helper.ModelHelper(name="my net")
sigmoid1 = m.net.C10Sigmoid_DontUseThisOpYet("data1", "sigmoid1")
sigmoid2 = m.net.Sigmoid("data1", "sigmoid2")
workspace.RunNetOnce(m.param_init_net)
workspace.CreateNet(m.net)
data1 = np.random.rand(16, 100).astype(np.float32)
workspace.FeedBlob("data1", data1)
workspace.RunNet(m.name, 1)
print(workspace.FetchBlob("data1"))
print(workspace.FetchBlob("sigmoid1"))
print(workspace.FetchBlob("sigmoid2"))
(and check that both sigmoid outputs are the same)
Differential Revision: D8814669
fbshipit-source-id: 708de08e2d5d5d8920af2fc8448ab90b0e45b567
Summary: Pull Request resolved: pytorch#9360 This implements a first set of c10 operators, namely the ones needed for the multithread predictor benchmark. All implementations are CPU-only and experimental. They're not meant to be used in production. They can be used, however, to test calling simple c10 MLPs from Caffe2 or PyTorch when working on these integration paths. Differential Revision: D8811698 fbshipit-source-id: 5074df43a08e84a120550dfad57ed8bcc8f660b5
18d487c to
40a1465
Compare
Summary: Pull Request resolved: pytorch#9360 This implements a first set of c10 operators, namely the ones needed for the multithread predictor benchmark. All implementations are CPU-only and experimental. They're not meant to be used in production. They can be used, however, to test calling simple c10 MLPs from Caffe2 or PyTorch when working on these integration paths. Reviewed By: dzhulgakov Differential Revision: D8811698 fbshipit-source-id: 826789c38b2bfdb125a5c0d03c5aebf627785482
Summary:
This implements a first set of c10 operators, namely the ones needed for the multithread predictor benchmark.
All implementations are CPU-only and experimental. They're not meant to be used in production.
They can be used, however, to test calling simple c10 MLPs from Caffe2 or PyTorch when working on these integration paths.
Differential Revision: D8811698