mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[PyTorch] Adopt IValue::toTupleRef() where obvious (#65505)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/65505 Generated with `fastmod -m 'toTuple\(\)(\s*)->' 'toTupleRef()${1}.'` , followed by `fastmod '(std::move\(.*)toTupleRef\(\).' '${1}toTuple()->'` to unbreak 2 callsites. ghstack-source-id: 142065835 Test Plan: CI Reviewed By: gchanan Differential Revision: D31131025 fbshipit-source-id: 54457ae5bbeb38db9c7f196d469b98521c3d3f34
This commit is contained in:
committed by
Facebook GitHub Bot
parent
eb1b8a2160
commit
82f7f8d471
@ -332,7 +332,7 @@ facebook::jni::local_ref<JIValue> JIValue::newJIValueFromAtIValue(
|
||||
JIValue::javaClassStatic(),
|
||||
facebook::jni::make_jstring(ivalue.toStringRef()));
|
||||
} else if (ivalue.isTuple()) {
|
||||
auto elementsVec = ivalue.toTuple()->elements();
|
||||
auto elementsVec = ivalue.toTupleRef().elements();
|
||||
static auto jMethodTupleArr =
|
||||
JIValue::javaClassStatic()
|
||||
->getStaticMethod<facebook::jni::local_ref<JIValue>(
|
||||
|
Reference in New Issue
Block a user