tvm
replace_global_vars.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
26 #ifndef TVM_IR_REPLACE_GLOBAL_VARS_H_
27 #define TVM_IR_REPLACE_GLOBAL_VARS_H_
28 
29 #include <tvm/ir/module.h>
30 
31 namespace tvm {
32 namespace transform {
33 
45 
48  TVM_DLL static FType& vtable() {
49  static FType inst;
50  return inst;
51  }
52 };
53 
54 } // namespace transform
55 } // namespace tvm
56 
57 #endif // TVM_IR_REPLACE_GLOBAL_VARS_H_
Managed reference class to IRModuleNode.
Definition: module.h:366
A dynamically dispatched functor on the type of the first argument.
Definition: functor.h:64
Map container of NodeRef->NodeRef in DSL graph. Map implements copy on write semantics,...
Definition: map.h:1271
Base class of all object reference.
Definition: object.h:519
IRModule that holds the functions and type definitions.
tvm::BaseFunc BaseFunc
Definition: expr.h:56
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:290
IRModule ReplaceGlobalVars(IRModule mod, Map< GlobalVar, GlobalVar > replacements)
Replace GlobalVar instances across any IR type.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Definition: replace_global_vars.h:46
static FType & vtable()
Definition: replace_global_vars.h:48