mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
replace torch::make_unique with std::make_unique (#108866)
It should be safe to remove the old torch::make_unique functions. Pull Request resolved: https://github.com/pytorch/pytorch/pull/108866 Approved by: https://github.com/albanD
This commit is contained in:
@ -167,7 +167,7 @@ class PytorchJni : public facebook::jni::HybridClass<PytorchJni> {
|
||||
assetName->toStdString().c_str());
|
||||
}
|
||||
JITCallGuard guard;
|
||||
module_ = torch::jit::load(torch::make_unique<MemoryReadAdapter>(
|
||||
module_ = torch::jit::load(std::make_unique<MemoryReadAdapter>(
|
||||
assetBuffer, AAsset_getLength(asset)));
|
||||
AAsset_close(asset);
|
||||
module_.eval();
|
||||
|
@ -132,7 +132,7 @@ class PytorchJni : public facebook::jni::HybridClass<PytorchJni> {
|
||||
}
|
||||
LiteJITCallGuard guard;
|
||||
module_ =
|
||||
torch::jit::_load_for_mobile(torch::make_unique<MemoryReadAdapter>(
|
||||
torch::jit::_load_for_mobile(std::make_unique<MemoryReadAdapter>(
|
||||
assetBuffer, AAsset_getLength(asset)));
|
||||
AAsset_close(asset);
|
||||
deviceType_ = deviceJniCodeToDeviceType(device);
|
||||
|
Reference in New Issue
Block a user