mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[android][vulkan] Fix model loading for Vulkan backend (#63402)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63402 Test Plan: Imported from OSS Reviewed By: SS-JIA Differential Revision: D30370692 Pulled By: IvanKobzarev fbshipit-source-id: 73311b9b767fe9ed3ae390db59d6aa2c4a98f06d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f70b9ee5de
commit
c982f13a80
@ -121,7 +121,7 @@ class PytorchJni : public facebook::jni::HybridClass<PytorchJni> {
|
||||
}
|
||||
deviceType_ = deviceJniCodeToDeviceType(device);
|
||||
module_ = torch::jit::load(
|
||||
std::move(modelPath->toStdString()), deviceType_, extra_files);
|
||||
std::move(modelPath->toStdString()), c10::nullopt, extra_files);
|
||||
if (has_extra) {
|
||||
static auto putMethod =
|
||||
facebook::jni::JMap<facebook::jni::JString, facebook::jni::JString>::
|
||||
|
@ -83,9 +83,9 @@ class PytorchJni : public facebook::jni::HybridClass<PytorchJni> {
|
||||
}
|
||||
deviceType_ = deviceJniCodeToDeviceType(device);
|
||||
module_ = torch::jit::_load_for_mobile(
|
||||
std::move(modelPath->toStdString()), deviceType_, extra_files);
|
||||
std::move(modelPath->toStdString()), c10::nullopt, extra_files);
|
||||
torch::jit::_load_extra_only_for_mobile(
|
||||
std::move(modelPath->toStdString()), deviceType_, extra_files);
|
||||
std::move(modelPath->toStdString()), c10::nullopt, extra_files);
|
||||
if (has_extra) {
|
||||
static auto putMethod =
|
||||
facebook::jni::JMap<facebook::jni::JString, facebook::jni::JString>::
|
||||
|
Reference in New Issue
Block a user