Skip to content

Commit dc00019

Browse files
authored
Merge branch 'main' into migrate-cadence
2 parents cebe289 + 3083980 commit dc00019

File tree

28 files changed

+1288
-641
lines changed

28 files changed

+1288
-641
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,18 @@ xcuserdata/
4141
*.xcworkspace/
4242
*.xcframework/
4343

44+
# misc
45+
/.vscode/
46+
*.so
47+
*.dylib
48+
/cmake_wrapper.sh
49+
/data/
50+
/devtools/bundled_program/serialize/
51+
/exir/_serialize/program.fbs
52+
/exir/_serialize/scalar_type.fbs
53+
/include/
54+
/share/
55+
/version.py
56+
4457
# Android
4558
*.aar

examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ If you need to use other dependencies (like tokenizer), please build from the lo
183183
### Alternative 2: Command line
184184
Without Android Studio UI, we can run gradle directly to build the app. We need to set up the Android SDK path and invoke gradle.
185185
```
186+
export ANDROID_SDK=<path_to_android_sdk_home>
186187
export ANDROID_HOME=<path_to_android_sdk_home>
187188
pushd examples/demo-apps/android/LlamaDemo
188189
./gradlew :app:installDebug

examples/demo-apps/apple_ios/LLaMA/LLaMARunner/LLaMARunner/Exported/LLaMARunner.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ - (instancetype)initWithModelPath:(NSString*)modelPath
3131
self = [super init];
3232
if (self) {
3333
[ExecuTorchLog.sharedLog addSink:self];
34-
_runner = std::make_unique<example::Runner>(
34+
_runner = example::Runner::create(
3535
modelPath.UTF8String, tokenizerPath.UTF8String);
3636
}
3737
return self;

examples/models/llama/main.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* This source code is licensed under the BSD-style license found in the
66
* LICENSE file in the root directory of this source tree.
7+
* @lint-ignore-every CLANGTIDY facebook-hte-Deprecated
78
*/
89

910
#include <gflags/gflags.h>
@@ -80,18 +81,16 @@ int32_t main(int32_t argc, char** argv) {
8081
}
8182
#endif
8283
// create llama runner
83-
// @lint-ignore CLANGTIDY facebook-hte-Deprecated
84-
example::Runner runner(model_path, tokenizer_path, data_path);
84+
std::unique_ptr<example::Runner> runner =
85+
example::Runner::create(model_path, tokenizer_path, data_path);
8586

8687
if (warmup) {
87-
// @lint-ignore CLANGTIDY facebook-hte-Deprecated
88-
runner.warmup(prompt, /*max_new_tokens=*/seq_len);
88+
runner->warmup(prompt, /*max_new_tokens=*/seq_len);
8989
}
9090
// generate
9191
executorch::extension::llm::GenerationConfig config{
9292
.seq_len = seq_len, .temperature = temperature};
93-
// @lint-ignore CLANGTIDY facebook-hte-Deprecated
94-
runner.generate(prompt, config);
93+
runner->generate(prompt, config);
9594

9695
return 0;
9796
}

0 commit comments

Comments
 (0)