"vscode:/vscode.git/clone" did not exist on "05e8bfde4a5f71d1f8f684b0d896519d8d9f4813"
elem.h 975 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
/*!
 * \file tl/op/elem.h
 * \brief Define elment-wise operators.
 *
 */

#ifndef TVM_TL_OP_ELEM_H_
#define TVM_TL_OP_ELEM_H_

10
#include "operator.h"
11
12
13
14
15
16
17
#include "parallel.h"

namespace tvm {
namespace tl {

using namespace tir;

18
class FillNode : public TileOperatorNode {
19
public:
20
21
22
23
24
25
26
27
  tir::Buffer dst;
  PrimExpr value;
  Array<Range> region;
  static constexpr const char *_type_key = "tl.Fill";
  TVM_DECLARE_FINAL_OBJECT_INFO(FillNode, TileOperatorNode);

  Stmt Lower(const LowerArgs &T, arith::Analyzer *analyzer) const;
  LayoutMap InferLayout(const LayoutInferArgs &T, InferLevel level) const;
28
  static const Op &Get();
29

30
  TileOperator Clone() const;
31

32
33
private:
  For MakeSIMTLoop(arith::Analyzer *analyzer) const;
34
35
36
37
38
39
40
};

class Fill : public TileOperator {
public:
  TVM_DEFINE_OBJECT_REF_METHODS(Fill, TileOperator, FillNode);
  TVM_DLL Fill(Array<PrimExpr> args, BufferMap vmap);
  static const Op &Get();
41
42
};

43
44
} // namespace tl
} // namespace tvm
45

46
#endif //  TVM_TL_OP_ELEM_H_