summaryrefslogtreecommitdiff
path: root/binaries
diff options
context:
space:
mode:
authorMaciej Bargiel <maciejbargiel@fb.com>2018-09-25 01:06:19 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-09-25 01:11:14 -0700
commit2cdf98a74df3afa094a7af465004aad128067cf9 (patch)
tree89e65f9e40962330b7b66917220d387630ab8c9f /binaries
parent3417a1e7e4693d76b1a695af22e04c7e5ef89682 (diff)
downloadpytorch-2cdf98a74df3afa094a7af465004aad128067cf9.tar.gz
pytorch-2cdf98a74df3afa094a7af465004aad128067cf9.tar.bz2
pytorch-2cdf98a74df3afa094a7af465004aad128067cf9.zip
Back out "Removing some dependency edges from Blob to other caffe2"
Summary: The controller you requested could not be found. Original commit changeset: 2ea17724e223 Differential Revision: D10026321 Ninja: stable broken fbshipit-source-id: faf87cb7cc0f78c2c10d4aa6fceea279cd27acd6
Diffstat (limited to 'binaries')
-rw-r--r--binaries/benchmark_helper.cc6
-rw-r--r--binaries/speed_benchmark.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/binaries/benchmark_helper.cc b/binaries/benchmark_helper.cc
index f481a6292c..001c8e965f 100644
--- a/binaries/benchmark_helper.cc
+++ b/binaries/benchmark_helper.cc
@@ -163,7 +163,7 @@ void loadInput(
CAFFE_THROW("Not support GPU on mobile.");
#endif
} else {
- caffe2::TensorCPU* tensor = BlobGetMutableTensor(blob, caffe2::CPU);
+ caffe2::TensorCPU* tensor = blob->GetMutableTensor(caffe2::CPU);
CHECK_NOTNULL(tensor);
tensor->Resize(input_dims);
if (input_type_list[i] == "uint8_t") {
@@ -200,7 +200,7 @@ void fillInputBlob(
int protos_size = tensor_kv.second.protos_size();
caffe2::TensorProto* tensor_proto =
tensor_kv.second.mutable_protos(iteration % protos_size);
- caffe2::TensorCPU* tensor = BlobGetMutableTensor(blob, caffe2::CPU);
+ caffe2::TensorCPU* tensor = blob->GetMutableTensor(caffe2::CPU);
if (tensor_proto->data_type() == caffe2::TensorProto::STRING) {
int total_size = tensor_proto->string_data_size();
for (size_t i = 0; i < total_size; i++) {
@@ -298,7 +298,7 @@ void writeOutput(
#endif
} else {
writeTextOutput<caffe2::CPUContext, caffe2::TensorCPU>(
- BlobGetMutableTensor(workspace->GetBlob(name), caffe2::CPU),
+ workspace->GetBlob(name)->GetMutableTensor(caffe2::CPU),
output_prefix,
name);
}
diff --git a/binaries/speed_benchmark.cc b/binaries/speed_benchmark.cc
index fd502cf3c0..5914e3f58b 100644
--- a/binaries/speed_benchmark.cc
+++ b/binaries/speed_benchmark.cc
@@ -137,7 +137,7 @@ int main(int argc, char** argv) {
if (blob == nullptr) {
blob = workspace->CreateBlob(input_names[i]);
}
- caffe2::TensorCPU* tensor = BlobGetMutableTensor(blob, caffe2::CPU);
+ caffe2::TensorCPU* tensor = blob->GetMutableTensor(caffe2::CPU);
CHECK_NOTNULL(tensor);
tensor->Resize(input_dims);
if (input_type_list[i] == "uint8_t") {