Skip to content

Commit 2f21092

Browse files
authored
Fix buck target for LLM runner util (#14345)
### Summary util.h needs constants.h and module.h ### Test plan CI
1 parent a2d2cb3 commit 2f21092

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

extension/llm/runner/targets.bzl

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@ def define_common_targets():
1111
],
1212
)
1313

14-
runtime.cxx_library(
15-
name = "stats",
16-
exported_headers = [
17-
"stats.h",
18-
"util.h",
19-
],
20-
visibility = [
21-
"@EXECUTORCH_CLIENTS",
22-
],
23-
)
24-
2514
runtime.cxx_library(
2615
name = "constants",
2716
exported_headers = [
@@ -35,6 +24,21 @@ def define_common_targets():
3524
for aten in get_aten_mode_options():
3625
aten_suffix = "_aten" if aten else ""
3726

27+
runtime.cxx_library(
28+
name = "stats" + aten_suffix,
29+
exported_headers = [
30+
"stats.h",
31+
"util.h",
32+
],
33+
visibility = [
34+
"@EXECUTORCH_CLIENTS",
35+
],
36+
exported_deps = [
37+
":constants",
38+
"//executorch/extension/module:module" + aten_suffix,
39+
],
40+
)
41+
3842
runtime.cxx_library(
3943
name = "text_decoder_runner" + aten_suffix,
4044
exported_headers = ["text_decoder_runner.h"],
@@ -43,7 +47,7 @@ def define_common_targets():
4347
"@EXECUTORCH_CLIENTS",
4448
],
4549
exported_deps = [
46-
":stats",
50+
":stats" + aten_suffix,
4751
"//executorch/kernels/portable/cpu/util:arange_util" + aten_suffix,
4852
"//executorch/extension/llm/sampler:sampler" + aten_suffix,
4953
"//executorch/extension/llm/runner/io_manager:io_manager" + aten_suffix,

extension/llm/runner/util.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
*/
88

99
#pragma once
10+
#include <executorch/extension/llm/runner/constants.h>
11+
#include <executorch/extension/module/module.h>
1012
#include <executorch/extension/tensor/tensor.h>
1113
#include <executorch/runtime/platform/compiler.h>
1214
#include <stdio.h>
1315
#include <time.h>
1416
#include <cctype>
17+
#include <vector>
1518
#if defined(__linux__) || defined(__ANDROID__) || defined(__unix__)
1619
#include <sys/resource.h>
1720
#endif

0 commit comments

Comments
 (0)