Temporarily switch to absl::make_unique in delegate

TensorFlow Lite build documentation still needs to be updated before
allowing general C++14 usage.

Partially addresses #36177.

PiperOrigin-RevId: 292581159
Change-Id: I19e5bf0e9e933b89055d349d354e66fc27eb0872
This commit is contained in:
Jared Duke 2020-01-31 11:18:53 -08:00 committed by TensorFlower Gardener
parent ac610bdea4
commit 2d1f922fa0
2 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ cc_library(
"//tensorflow/lite:kernel_api",
"//tensorflow/lite:minimal_logging",
"//tensorflow/lite/c:common",
"@com_google_absl//absl/memory",
],
)

View File

@ -18,6 +18,7 @@ limitations under the License.
#include <string>
#include <vector>
#include "absl/memory/memory.h"
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/context_util.h"
#include "tensorflow/lite/experimental/delegates/hexagon/hexagon_delegate_kernel.h"
@ -49,7 +50,7 @@ TfLiteRegistration GetHexagonKernelRegistration() {
size_t length) -> void* {
const TfLiteDelegateParams* params =
reinterpret_cast<const TfLiteDelegateParams*>(buffer);
auto hexagon_kernel = std::make_unique<HexagonDelegateKernel>();
auto hexagon_kernel = absl::make_unique<HexagonDelegateKernel>();
if (hexagon_kernel->Init(context, params) != kTfLiteOk) {
return nullptr;
}