tvm
Loading...
Searching...
No Matches
image.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_RELAX_OP_IMAGE_H_
25#define TVM_RELAX_OP_IMAGE_H_
26
27#include <tvm/relax/expr.h>
28
29namespace tvm {
30namespace relax {
31
33struct Resize2DAttrs : public AttrsNode {
34 ffi::Array<FloatImm> roi;
35 ffi::String layout;
36 ffi::String method;
38 ffi::String rounding_method;
42 ffi::Optional<DLDataType> out_dtype;
43
44 static void RegisterReflection();
46}; // struct Resize2dAttrs
47
49struct Resize3DAttrs : public AttrsNode {
50 ffi::Array<FloatImm> roi;
51 ffi::String layout;
52 ffi::String method;
54 ffi::String rounding_method;
58 ffi::Optional<DLDataType> out_dtype;
59
60 static void RegisterReflection();
62}; // struct Resize3DAttrs
63
65struct GridSampleAttrs : public AttrsNode {
66 ffi::String method;
67 ffi::String layout;
68 ffi::String padding_mode;
70
71 static void RegisterReflection();
73}; // struct GridSampleAttrs
74
76struct AffineGridAttrs : public AttrsNode {
78
79 static void RegisterReflection();
81}; // struct AffineGridAttrs
82
83} // namespace relax
84} // namespace tvm
85
86#endif // TVM_RELAX_OP_IMAGE_H_
Base class of all attribute class.
Definition attrs.h:50
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23
Attributes used in image affine_grid operator.
Definition image.h:76
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.AffineGridAttrs", AffineGridAttrs, AttrsNode)
static void RegisterReflection()
bool align_corners
Definition image.h:77
Attributes used in image grid_sample operator.
Definition image.h:65
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GridSampleAttrs", GridSampleAttrs, AttrsNode)
ffi::String method
Definition image.h:66
bool align_corners
Definition image.h:69
static void RegisterReflection()
ffi::String padding_mode
Definition image.h:68
ffi::String layout
Definition image.h:67
Attributes used in image resize2d operator.
Definition image.h:33
ffi::Array< FloatImm > roi
Definition image.h:34
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.Resize2DAttrs", Resize2DAttrs, AttrsNode)
double extrapolation_value
Definition image.h:41
ffi::String method
Definition image.h:36
ffi::String layout
Definition image.h:35
static void RegisterReflection()
int cubic_exclude
Definition image.h:40
double cubic_alpha
Definition image.h:39
ffi::String rounding_method
Definition image.h:38
ffi::String coordinate_transformation_mode
Definition image.h:37
ffi::Optional< DLDataType > out_dtype
Definition image.h:42
Attributes used in image resize3d operator.
Definition image.h:49
double extrapolation_value
Definition image.h:57
ffi::String method
Definition image.h:52
ffi::String layout
Definition image.h:51
ffi::Array< FloatImm > roi
Definition image.h:50
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.Resize3DAttrs", Resize3DAttrs, AttrsNode)
static void RegisterReflection()
int cubic_exclude
Definition image.h:56
ffi::String coordinate_transformation_mode
Definition image.h:53
ffi::String rounding_method
Definition image.h:54
ffi::Optional< DLDataType > out_dtype
Definition image.h:58
double cubic_alpha
Definition image.h:55