Skip to content
Merged
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
28 changes: 16 additions & 12 deletions extension/llm/runner/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ def define_common_targets():
],
)

runtime.cxx_library(
name = "stats",
exported_headers = [
"stats.h",
"util.h",
],
visibility = [
"@EXECUTORCH_CLIENTS",
],
)

runtime.cxx_library(
name = "constants",
exported_headers = [
Expand All @@ -35,6 +24,21 @@ def define_common_targets():
for aten in get_aten_mode_options():
aten_suffix = "_aten" if aten else ""

runtime.cxx_library(
name = "stats" + aten_suffix,
exported_headers = [
"stats.h",
"util.h",
],
visibility = [
"@EXECUTORCH_CLIENTS",
],
exported_deps = [
":constants",
"//executorch/extension/module:module" + aten_suffix,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does stats need module

Copy link
Contributor

Choose a reason for hiding this comment

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

oh this target name should be renamed to util

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe in another PR

],
)

runtime.cxx_library(
name = "text_decoder_runner" + aten_suffix,
exported_headers = ["text_decoder_runner.h"],
Expand All @@ -43,7 +47,7 @@ def define_common_targets():
"@EXECUTORCH_CLIENTS",
],
exported_deps = [
":stats",
":stats" + aten_suffix,
"//executorch/kernels/portable/cpu/util:arange_util" + aten_suffix,
"//executorch/extension/llm/sampler:sampler" + aten_suffix,
"//executorch/extension/llm/runner/io_manager:io_manager" + aten_suffix,
Expand Down
3 changes: 3 additions & 0 deletions extension/llm/runner/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
*/

#pragma once
#include <executorch/extension/llm/runner/constants.h>
#include <executorch/extension/module/module.h>
#include <executorch/extension/tensor/tensor.h>
#include <executorch/runtime/platform/compiler.h>
#include <stdio.h>
#include <time.h>
#include <cctype>
#include <vector>
#if defined(__linux__) || defined(__ANDROID__) || defined(__unix__)
#include <sys/resource.h>
#endif
Expand Down
Loading