onnxruntime/include/onnxruntime/core/graph/function.h
Tang, Cheng 4b875e3543
Re-implment the function support in onnxruntime (#11167)
* initial fix

* refactor the function handle

* update the implementation

* fix linux build break

* fix training build

* fix minmal build

* fix gradient checker

* deprecate the local function members in graph. host it in model

* fix changming's comments

* fix comments about inlined containers

* fix a missed inlined container

* fix training build

* avoid const for std string_view

Co-authored-by: Cheng Tang <chenta@microsoft.com>
2022-04-29 10:15:58 -07:00

31 lines
679 B
Objective-C

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/graph/indexed_sub_graph.h"
namespace onnxruntime {
class Graph;
class Node;
} // namespace onnxruntime
namespace onnxruntime {
/**
@class Function
Class representing a Function.
*/
class Function {
public:
virtual ~Function() = default;
/** Gets the Graph instance for the Function body subgraph. */
virtual const onnxruntime::Graph& Body() const = 0;
/** Gets the Mutable Graph instance for the Function body subgraph. */
virtual onnxruntime::Graph& MutableBody() = 0;
};
} // namespace onnxruntime