Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/models/llama/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ DEFINE_int32(

DEFINE_bool(warmup, false, "Whether to run a warmup run.");

std::vector<std::string> parseStringList(const std::string& input);

// Helper function to parse comma-separated string lists
std::vector<std::string> parseStringList(const std::string& input) {
std::vector<std::string> result;
Expand Down
12 changes: 10 additions & 2 deletions examples/models/llama/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ def define_common_targets():
if not runtime.is_oss or not aten:
aten_suffix = "_aten" if aten else ""

runtime.cxx_binary(
name = "main" + aten_suffix,
runtime.cxx_library(
name = "main" + aten_suffix + "_lib",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "main_lib" + aten_suffix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

srcs = [
"main.cpp",
],
Expand All @@ -25,3 +25,11 @@ def define_common_targets():
],
**get_oss_build_kwargs()
)

runtime.cxx_binary(
name = "main" + aten_suffix,
srcs = [],
deps = [
":main" + aten_suffix + "_lib",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, ":main_lib" + aten_suffix,

],
)
Loading