Skip to content

Commit 652de89

Browse files
committed
[2/N] Add option context
Pull Request resolved: #11390 For future needs without breacking API BC, in case we need to pass more information to the update API ghstack-source-id: 290059229 Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)
1 parent 0db3023 commit 652de89

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
#pragma once
10+
#include <executorch/runtime/core/event_tracer.h>
11+
#include <executorch/runtime/core/memory_allocator.h>
12+
#include <executorch/runtime/core/named_data_map.h>
13+
14+
namespace executorch {
15+
namespace ET_RUNTIME_NAMESPACE {
16+
/**
17+
* BackendOptionContext will be used to inject runtime info for to initialize
18+
* delegate.
19+
*/
20+
class BackendOptionContext final {
21+
public:
22+
explicit BackendOptionContext(){}
23+
};
24+
25+
} // namespace ET_RUNTIME_NAMESPACE
26+
} // namespace executorch
27+
28+
namespace torch {
29+
namespace executor {
30+
// TODO(T197294990): Remove these deprecated aliases once all users have moved
31+
// to the new `::executorch` namespaces.
32+
using ::executorch::ET_RUNTIME_NAMESPACE::BackendOptionContext;
33+
} // namespace executor
34+
} // namespace torch

runtime/backend/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def define_common_targets():
1717
exported_headers = [
1818
"backend_execution_context.h",
1919
"backend_init_context.h",
20+
"backend_option_context.h",
2021
"options.h",
2122
"interface.h",
2223
],

0 commit comments

Comments
 (0)