tvm
Loading...
Searching...
No Matches
reduction.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
23#ifndef TVM_TE_REDUCTION_H_
24#define TVM_TE_REDUCTION_H_
25
26#include <tvm/base.h>
27#include <tvm/s_tir/iter_var.h>
28
29namespace tvm::prim {
38TVM_DLL PrimExpr sum(PrimExpr source, ffi::Array<s_tir::IterVar> axis,
39 ffi::Array<PrimExpr> init = {}, Location loc = UnknownLoc());
40
48TVM_DLL PrimExpr all(PrimExpr source, ffi::Array<s_tir::IterVar> axis,
49 ffi::Array<PrimExpr> init = {}, Location loc = UnknownLoc());
50
59TVM_DLL PrimExpr any(PrimExpr source, ffi::Array<s_tir::IterVar> axis,
60 ffi::Array<PrimExpr> init = {}, Location loc = UnknownLoc());
61
70TVM_DLL PrimExpr prod(PrimExpr source, ffi::Array<s_tir::IterVar> axis,
71 ffi::Array<PrimExpr> init = {}, Location loc = UnknownLoc());
72
73} // namespace tvm::prim
74
75namespace tvm {
84TVM_DLL PrimExpr max(PrimExpr source, ffi::Array<s_tir::IterVar> axis,
85 ffi::Array<PrimExpr> init = {}, Location loc = UnknownLoc());
86
95TVM_DLL PrimExpr min(PrimExpr source, ffi::Array<s_tir::IterVar> axis,
96 ffi::Array<PrimExpr> init = {}, Location loc = UnknownLoc());
97
98} // namespace tvm
99#endif // TVM_TE_REDUCTION_H_
Non-nullable source-location metadata.
Definition location.h:91
Typed reference/view over any Expr whose ExprObj::ty is PrimType.
Definition expr.h:187
Reference to the shared immutable unknown location.
Definition location.h:105
Parent compiler symbol visibility.
Axis metadata for schedulable tensor computations.
Definition reduction.h:29
PrimExpr all(PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
logical And of source expression over axis
PrimExpr prod(PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
product of source expression over axis
PrimExpr sum(PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
sum of source expression over axis
PrimExpr any(PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
logical Or of source expression over axis
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analysis.h:41
PrimExpr max(PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
max of source expression over axis
PrimExpr min(PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
max of source expression over axis