mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[Reland] Move torch::make_unique to std::make_unique (#109780)
We can first try to move torch::make_unique to std::make_unique despite reverting of #108866 . Pull Request resolved: https://github.com/pytorch/pytorch/pull/109780 Approved by: https://github.com/ezyang
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