Skip to content

Commit a7546df

Browse files
cccclaifacebook-github-bot
authored andcommitted
Add backend runtime context (#209)
Summary: Add backend runtime context. Items to be added there: - Event tracer - temp allocator The signature breaking change will be in D48872100 Reviewed By: tarun292 Differential Revision: D48872102
1 parent 8219bcc commit a7546df

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
11+
namespace torch {
12+
namespace executor {
13+
14+
/**
15+
* BackendExecutionContext will be used to inject run time context.
16+
* The current plan is to add temp allocator and event tracer (for profiling) as
17+
* part of the runtime context.
18+
*/
19+
class BackendExecutionContext final {};
20+
21+
} // namespace executor
22+
} // namespace torch

runtime/backend/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def define_common_targets():
1515
"backend_registry.cpp",
1616
],
1717
exported_headers = [
18+
"backend_execution_context.h",
1819
"backend_registry.h",
1920
],
2021
preprocessor_flags = ["-DUSE_ATEN_LIB"] if aten_mode else [],

0 commit comments

Comments
 (0)