Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dper_lut_concat_op.h
Go to the documentation of this file.
1 
16 #pragma once
17 
18 #include <string>
19 #include <vector>
20 
21 #include "tc/c2/tc_op.h"
23 
24 namespace caffe2 {
25 
26 template <typename T, class Context, class Engine = caffe2::DefaultEngine>
27 class TcDperLutConcatOp : public TcOp<T, Context, Engine> {
28  public:
29  static constexpr auto description = tc::TC_DPER_LUT_CONCAT;
30 
32  const caffe2::OperatorDef& operator_def,
33  caffe2::Workspace* ws)
34  : TcOp<T, Context, Engine>(operator_def, ws) {
35  this->tc_ = tc::TC_DPER_LUT_CONCAT;
36  this->tcName_ = tc::TC_DPER_LUT_CONCAT_NAME;
37  }
38 
39  ~TcDperLutConcatOp() override {}
40 
41  protected:
42  void setupNaiveMappingOptions() override {
43  this->mappingOptions_.tile({1})
44  .mapToThreads(128)
45  .mapToBlocks(32)
46  .unroll(1)
47  .useSharedMemory(false)
48  .usePrivateMemory(false);
49  }
50 };
51 } // namespace caffe2
void setupNaiveMappingOptions() override
Definition: dper_lut_concat_op.h:42
tc::MappingOptions mappingOptions_
Definition: tc_op.h:133
MappingOptions & usePrivateMemory(bool b)
Definition: mapping_options-inl.h:331
MappingOptions & unroll(uint64_t size)
Definition: mapping_options-inl.h:321
MappingOptions & useSharedMemory(bool b)
Definition: mapping_options-inl.h:326
Definition: tc_op.h:36
MappingOptions & mapToBlocks(std::initializer_list< uint64_t > blocks)
Definition: mapping_options-inl.h:297
std::string tc_
Definition: tc_op.h:128
std::string tcName_
Definition: tc_op.h:130
static constexpr auto description
Definition: dper_lut_concat_op.h:29
MappingOptions & tile(const std::vector< uint64_t > &sizes)
Definition: mapping_options-inl.h:251
~TcDperLutConcatOp() override
Definition: dper_lut_concat_op.h:39
TcDperLutConcatOp(const caffe2::OperatorDef &operator_def, caffe2::Workspace *ws)
Definition: dper_lut_concat_op.h:31
Definition: dper_lut_concat_op.h:27