File tree Expand file tree Collapse file tree 3 files changed +19
-15
lines changed
extension/android/executorch_android/src
androidTest/java/org/pytorch/executorch
main/java/org/pytorch/executorch/extension/llm Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 83
83
script : |
84
84
FILES_NEEDS_FORMAT=$(/opt/google-java-format -n \
85
85
extension/android/executorch_android/src/main/java/org/pytorch/executorch/*.java \
86
+ extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/*.java \
87
+ extension/android/executorch_android/src/main/java/org/pytorch/executorch/annotations/*.java \
88
+ extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/*.java \
86
89
examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/*.java \
87
- extension/benchmark/android/benchmark/app/src/main/java/org/pytorch/minibench/*.java)
90
+ examples/demo-apps/android/LlamaDemo/app/src/androidTest/java/com/example/executorchllamademo/*.java \
91
+ extension/benchmark/android/benchmark/app/src/main/java/org/pytorch/minibench/*.java \
92
+ extension/benchmark/android/benchmark/app/src/androidTest/java/org/pytorch/minibench/*.java)
88
93
if [ -n "$FILES_NEEDS_FORMAT" ]; then
89
94
echo "Warning: The following files need formatting. Please use google-java-format."
90
95
echo "Use a binary from https://github.com/google/google-java-format/releases/"
Original file line number Diff line number Diff line change 11
11
import static org .junit .Assert .assertNotNull ;
12
12
13
13
import androidx .test .ext .junit .runners .AndroidJUnit4 ;
14
- import org .junit .runner .RunWith ;
15
14
import org .junit .Test ;
15
+ import org .junit .runner .RunWith ;
16
16
17
17
/** Unit tests for {@link ExecuTorchRuntime}. */
18
18
@ RunWith (AndroidJUnit4 .class )
19
19
public class RuntimeInstrumentationTest {
20
20
21
- @ Test
22
- public void testRuntimeApi () {
23
- String [] ops = ExecuTorchRuntime .getRegisteredOps ();
24
- String [] backends = ExecuTorchRuntime .getRegisteredBackends ();
21
+ @ Test
22
+ public void testRuntimeApi () {
23
+ String [] ops = ExecuTorchRuntime .getRegisteredOps ();
24
+ String [] backends = ExecuTorchRuntime .getRegisteredBackends ();
25
25
26
- assertNotNull (ops );
27
- assertNotNull (backends );
26
+ assertNotNull (ops );
27
+ assertNotNull (backends );
28
28
29
- for (String op : ops ) {
30
- assertNotNull (op );
31
- }
29
+ for (String op : ops ) {
30
+ assertNotNull (op );
31
+ }
32
32
33
- for (String backend : backends ) {
34
- assertNotNull (backend );
35
- }
33
+ for (String backend : backends ) {
34
+ assertNotNull (backend );
36
35
}
36
+ }
37
37
}
Original file line number Diff line number Diff line change 11
11
import com .facebook .jni .HybridData ;
12
12
import com .facebook .jni .annotations .DoNotStrip ;
13
13
import java .io .File ;
14
-
15
14
import org .pytorch .executorch .ExecuTorchRuntime ;
16
15
import org .pytorch .executorch .annotations .Experimental ;
17
16
You can’t perform that action at this time.
0 commit comments