Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions paddle/fluid/inference/tests/api/lite_mul_model_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ int test_predictor_zero_copy(const AnalysisConfig& config_in,
}

std::vector<float> input({1});
auto in_tensor{predictor->GetInputTensor(predictor->GetInputNames().front())};
auto in_tensor =
predictor->GetInputTensor(predictor->GetInputNames().front());
in_tensor->Reshape({1, 1});
in_tensor->copy_from_cpu(input.data());

predictor->ZeroCopyRun();

auto out_tensor{
predictor->GetOutputTensor(predictor->GetOutputNames().front())};
auto out_tensor =
predictor->GetOutputTensor(predictor->GetOutputNames().front());
std::vector<float> data_o(10);
out_tensor->copy_to_cpu(data_o.data());

Expand Down