Skip to content

Commit 0de6b2b

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

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+
* BackendUpdateContext will be used to inject runtime info for to initialize
18+
* delegate.
19+
*/
20+
class BackendUpdateContext final {
21+
public:
22+
explicit BackendUpdateContext(){}
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::BackendUpdateContext;
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_update_context.h",
2021
"backend_options.h",
2122
"interface.h",
2223
],

0 commit comments

Comments
 (0)