Change the cpu allocator info used in OptimizerExecutionFrame class (#1036)

* Change the cpu allocator info used in OptimizerExecutionFrame class
This commit is contained in:
Changming Sun 2019-05-15 16:42:51 -07:00 committed by GitHub
parent 5062be612e
commit d3c0cd24fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@ OptimizerExecutionFrame::Info::Info(const std::vector<const Node*>& nodes,
size_t cpu_tensor_length;
ORT_RETURN_IF_ERROR(utils::GetSizeInBytesFromTensorProto<0>(tensor_proto, &cpu_tensor_length));
MLValue mlvalue;
OrtAllocatorInfo info("Cpu", OrtDeviceAllocator, 0, OrtMemTypeDefault);
const OrtAllocatorInfo& info = cpu_execution_provider_->GetAllocator(0, OrtMemTypeDefault)->Info();
std::unique_ptr<char[]> data(new char[cpu_tensor_length]);
std::unique_ptr<Tensor> p_tensor;
OrtCallback d;