elem.h 694 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*!
 * \file tl/op/elem.h
 * \brief Define elment-wise operators.
 *
 */

#ifndef TVM_TL_OP_ELEM_H_
#define TVM_TL_OP_ELEM_H_

#include "op.h"
#include "parallel.h"

namespace tvm {
namespace tl {

using namespace tir;

class Fill : public Operator {
19
public:
20
  Fill(Array<PrimExpr> args, BufferMap vmap);
21
22
  Stmt Lower(const LowerArgs &T, arith::Analyzer *analyzer) const final;
  static const Op &Get();
23

24
25
26
27
  std::unique_ptr<Operator> Clone() const final {
    return std::make_unique<Fill>(*this);
  }

28
29
private:
  For MakeSIMTLoop(arith::Analyzer *analyzer) const;
30
31
  tir::Buffer dst;
  PrimExpr value;
32
  Array<Range> region;
33
34
};

35
36
} // namespace tl
} // namespace tvm
37

38
#endif //  TVM_TL_OP_ELEM_H_