Skip to content

Commit c2de8d7

Browse files
committed
and just load
1 parent 7e27145 commit c2de8d7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,18 @@ public void testMv2Fp32() throws IOException, URISyntaxException{
5959
assertTrue(results[0].isTensor());
6060
}
6161

62+
@Test
63+
public void testStories() throws IOException, URISyntaxException{
64+
String filePath = "/stories.pte";
65+
File pteFile = new File(getTestFilePath(filePath));
66+
InputStream inputStream = getClass().getResourceAsStream(filePath);
67+
FileUtils.copyInputStreamToFile(inputStream, pteFile);
68+
inputStream.close();
69+
70+
Module module = Module.load(getTestFilePath(filePath));
71+
72+
EValue[] results = module.forward();
73+
}
74+
75+
6276
}

scripts/run_android_emulator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ done &
2525

2626
adb logcat -c
2727
adb shell am instrument -w -r -e \
28-
class org.pytorch.executorch.LlmModuleInstrumentationTest,org.pytorch.executorch.ModuleE2ETest \
28+
class org.pytorch.executorch.ModuleInstrumentationTest,org.pytorch.executorch.ModuleE2ETest \
2929
org.pytorch.executorch.test/androidx.test.runner.AndroidJUnitRunner >result.txt 2>&1
3030
adb logcat -d > logcat.txt
3131
adb shell dumpsys meminfo

0 commit comments

Comments
 (0)