Skip to content

Commit 6fa454c

Browse files
Mark extension/llm examples/llama2 and examples/llava C++ APIs experimental (#6177)
Mark extension/llm examples/llama2 and examples/llava C++ APIs experimental (#6125) Summary: experimental As titled. Pull Request resolved: #6125 Reviewed By: lucylq Differential Revision: D64198599 Pulled By: larryliu0820 fbshipit-source-id: c2540fbebf255347467302a61112784e5b5e5b61 (cherry picked from commit 722bced) Co-authored-by: Mengwei Liu <[email protected]>
1 parent ab12b7c commit 6fa454c

File tree

16 files changed

+26
-18
lines changed

16 files changed

+26
-18
lines changed

examples/models/llama2/runner/runner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace example {
2828

29-
class Runner {
29+
class ET_EXPERIMENTAL Runner {
3030
public:
3131
explicit Runner(
3232
const std::string& model_path,

examples/models/llava/runner/llava_image_prefiller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
namespace example {
1717

18-
class LlavaImagePrefiller
18+
class ET_EXPERIMENTAL LlavaImagePrefiller
1919
: public ::executorch::extension::llm::ImagePrefiller {
2020
public:
2121
LlavaImagePrefiller(::executorch::extension::Module* module)

examples/models/llava/runner/llava_runner.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
namespace example {
2323

24-
class LlavaRunner : public ::executorch::extension::llm::MultimodalRunner {
24+
class ET_EXPERIMENTAL LlavaRunner
25+
: public ::executorch::extension::llm::MultimodalRunner {
2526
public:
2627
explicit LlavaRunner(
2728
const std::string& model_path,

examples/models/llava/runner/llava_text_decoder_runner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
namespace example {
1616

17-
class LlavaTextDecoderRunner
17+
class ET_EXPERIMENTAL LlavaTextDecoderRunner
1818
: public executorch::extension::llm::TextDecoderRunner {
1919
public:
2020
LlavaTextDecoderRunner(

extension/llm/runner/image.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
#pragma once
1212
#include <cstdint>
1313
// patternlint-disable-next-line executorch-cpp-nostdinc
14+
#include <executorch/runtime/platform/compiler.h>
1415
#include <vector>
1516

1617
namespace executorch {
1718
namespace extension {
1819
namespace llm {
1920

20-
struct Image {
21+
struct ET_EXPERIMENTAL Image {
2122
// Assuming NCHW format
2223
std::vector<uint8_t> data;
2324
int32_t width;

extension/llm/runner/image_prefiller.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212

1313
#include <executorch/extension/llm/runner/image.h>
1414
#include <executorch/extension/module/module.h>
15+
#include <executorch/runtime/platform/compiler.h>
1516

1617
namespace executorch {
1718
namespace extension {
1819
namespace llm {
1920

2021
// Assuming kv cache and parallel prefill are enabled.
21-
class ImagePrefiller {
22+
class ET_EXPERIMENTAL ImagePrefiller {
2223
public:
2324
explicit ImagePrefiller(::executorch::extension::Module* module)
2425
: module_(module) {}

extension/llm/runner/multimodal_runner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace executorch {
3636
namespace extension {
3737
namespace llm {
3838

39-
class MultimodalRunner {
39+
class ET_EXPERIMENTAL MultimodalRunner {
4040
public:
4141
explicit MultimodalRunner(
4242
const std::string& model_path,

extension/llm/runner/stats.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace executorch {
1919
namespace extension {
2020
namespace llm {
2121

22-
struct Stats {
22+
struct ET_EXPERIMENTAL Stats {
2323
// Scaling factor for timestamps - in this case, we use ms.
2424
const long SCALING_FACTOR_UNITS_PER_SECOND = 1000;
2525
// Time stamps for the different stages of the execution

extension/llm/runner/text_decoder_runner.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
#include <executorch/extension/llm/sampler/sampler.h>
1414
#include <executorch/extension/module/module.h>
1515
#include <executorch/extension/tensor/tensor.h>
16+
#include <executorch/runtime/platform/compiler.h>
1617
// patternlint-disable-next-line executorch-cpp-nostdinc
1718
#include <functional>
1819

1920
namespace executorch {
2021
namespace extension {
2122
namespace llm {
2223

23-
class TextDecoderRunner {
24+
class ET_EXPERIMENTAL TextDecoderRunner {
2425
public:
2526
TextDecoderRunner(
2627
Module* module,

extension/llm/runner/text_prefiller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace executorch {
2020
namespace extension {
2121
namespace llm {
2222

23-
class TextPrefiller {
23+
class ET_EXPERIMENTAL TextPrefiller {
2424
public:
2525
TextPrefiller(
2626
TextDecoderRunner* text_decoder_runner,

0 commit comments

Comments
 (0)