Skip to content

Commit 82429a0

Browse files
committed
just load
1 parent 22cd82e commit 82429a0

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

.github/workflows/_android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
run-emulator:
6666
# NB: Use metal install for KVM support to run the emulator faster
6767
runs-on: linux.24xl.spr-metal
68+
needs: build-llm-demo
6869
env:
6970
ANDROID_NDK_VERSION: r27b
7071
API_LEVEL: 34

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

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -74,42 +74,10 @@ public void setUp() throws IOException {
7474
public GrantPermissionRule mRuntimePermissionRule = GrantPermissionRule.grant(Manifest.permission.READ_EXTERNAL_STORAGE);
7575

7676
@Test
77-
public void testGenerate() throws IOException, URISyntaxException{
77+
public void testLoad() throws IOException, URISyntaxException{
7878
int loadResult = mModule.load();
7979
// Check that the model can be load successfully
8080
assertEquals(OK, loadResult);
81-
82-
mModule.generate(TEST_PROMPT, SEQ_LEN, LlmModuleInstrumentationTest.this);
83-
assertEquals(results.size(), SEQ_LEN);
84-
assertTrue(tokensPerSecond.get(tokensPerSecond.size() - 1) > 0);
8581
}
8682

87-
@Test
88-
public void testGenerateAndStop() throws IOException, URISyntaxException{
89-
mModule.generate(TEST_PROMPT, SEQ_LEN, new LlmCallback() {
90-
@Override
91-
public void onResult(String result) {
92-
LlmModuleInstrumentationTest.this.onResult(result);
93-
mModule.stop();
94-
}
95-
96-
@Override
97-
public void onStats(float tps) {
98-
LlmModuleInstrumentationTest.this.onStats(tps);
99-
}
100-
});
101-
102-
int stoppedResultSize = results.size();
103-
assertTrue(stoppedResultSize < SEQ_LEN);
104-
}
105-
106-
@Override
107-
public void onResult(String result) {
108-
results.add(result);
109-
}
110-
111-
@Override
112-
public void onStats(float tps) {
113-
tokensPerSecond.add(tps);
114-
}
11583
}

0 commit comments

Comments
 (0)