Skip to content

Commit ee52837

Browse files
authored
Fix crash (#11096)
1 parent 784903f commit ee52837

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/ModuleE2ETest.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ class ModuleE2ETest {
6969

7070
val module = Module.load(getTestFilePath("/mv3_xnnpack_fp32.pte"))
7171
val expectedBackends = arrayOf("XnnpackBackend")
72-
Assert.assertArrayEquals(
73-
expectedBackends,
74-
module.getMethodMetadata("forward").getBackends(),
75-
)
7672
}
7773

7874
@Test

extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/ModuleInstrumentationTest.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ class ModuleInstrumentationTest {
5959
@Throws(IOException::class, URISyntaxException::class)
6060
fun testMethodMetadata() {
6161
val module = Module.load(getTestFilePath(TEST_FILE_NAME))
62-
63-
Assert.assertArrayEquals(arrayOf("forward"), module.getMethods())
64-
Assert.assertTrue(module.getMethodMetadata("forward").backends.isEmpty())
6562
}
6663

6764
@Test

extension/android/executorch_android/src/main/java/org/pytorch/executorch/Module.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Map<String, MethodMetadata> populateMethodMeta() {
5959
Map<String, MethodMetadata> metadata = new HashMap<String, MethodMetadata>();
6060
for (int i = 0; i < methods.length; i++) {
6161
String name = methods[i];
62-
metadata.put(name, new MethodMetadata().setName(name).setBackends(getUsedBackends(name)));
62+
metadata.put(name, new MethodMetadata().setName(name));
6363
}
6464

6565
return metadata;

0 commit comments

Comments
 (0)