Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#pragma once
 
#include "core/framework/max_shape_override.h"
 
namespace onnxruntime {
 
class Graph;
 
/// Computes estimation-only maximum shapes without changing the executable graph.
///
/// A disposable shadow model is created from `graph`, including model-local functions,
/// generated schemas, initializers, and nested control-flow graphs. `input_overrides`
/// are validated against the source graph's explicit inputs and applied to the
/// corresponding shadow inputs. Values assigned to symbolic dimensions are also
/// propagated to other graph inputs that use the same symbols.
///
/// Resolving the shadow graph runs normal ORT shape inference recursively. Every fully
/// concrete NodeArg shape is then recorded against the identity of its corresponding
/// source graph, including nested subgraphs. `result` is cleared before inference, and
/// the source graph's shape metadata is never modified. The inferred downstream shapes
/// are estimation hints, not proven upper bounds: shape inference does not establish that
/// every operator's output shape is monotonic with respect to its input dimensions.
Status InferMaxShapes(const Graph& graph,
                      const MaxShapeOverrideMap& input_overrides,
                      MaxShapeInferenceResult& result);
 
}  // namespace onnxruntime