tvm
vm.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 
24 #ifndef TVM_RELAY_ATTRS_VM_H_
25 #define TVM_RELAY_ATTRS_VM_H_
26 
27 #include <tvm/ir/attrs.h>
28 
29 namespace tvm {
30 namespace relay {
31 
35 struct ShapeFuncAttrs : public tvm::AttrsNode<ShapeFuncAttrs> {
37 
38  TVM_DECLARE_ATTRS(ShapeFuncAttrs, "relay.attrs.ShapeFuncAttrs") {
39  TVM_ATTR_FIELD(is_input).describe(
40  "A bool indicating whether the shape function should"
41  "expect shape or input in each position.");
42  }
43 };
44 
48 struct ReshapeTensorAttrs : public tvm::AttrsNode<ReshapeTensorAttrs> {
50 
51  TVM_DECLARE_ATTRS(ReshapeTensorAttrs, "relay.attrs.ReshapeTensorAttrs") {
52  TVM_ATTR_FIELD(newshape).describe("The new shape of output tensor");
53  }
54 };
55 
56 } // namespace relay
57 } // namespace tvm
58 #endif // TVM_RELAY_ATTRS_VM_H_
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:870
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Helpers for attribute objects.
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Attributes for VM reshape_tensor operator.
Definition: vm.h:48
Array< PrimExpr > newshape
Definition: vm.h:49
TVM_DECLARE_ATTRS(ReshapeTensorAttrs, "relay.attrs.ReshapeTensorAttrs")
Definition: vm.h:51
Options for the shape function operator.
Definition: vm.h:35
Array< Integer > is_input
Definition: vm.h:36
TVM_DECLARE_ATTRS(ShapeFuncAttrs, "relay.attrs.ShapeFuncAttrs")
Definition: vm.h:38