目录

TilingData Structure Registration

Function Description

Registers the defined TilingData structure and binds it with a custom operator. For details, see Calling Example.

Function Prototype

REGISTER_TILING_DATA_CLASS(op_type, class_name)
#define REGISTER_TILING_DATA_CLASS(op_type, class_name)
  class op_type##class_name##Helper {
  public:
    op_type##class_name##Helper() {
      CTilingDataClassFactory::RegisterTilingData(#op_type, op_type##class_name##Helper::CreateTilingDataInstance);
    }
    static std::shared_ptr<TilingDef> CreateTilingDataInstance() {
      return std::make_shared<class_name>();
    }
  };
  op_type##class_name##Helper g_tilingdata_##op_type##class_name##helper;

Parameters

Table 1 Parameters

Parameter Input/Output Description
op_type Input Registered operator name.
class_name Input Tiling structure name, whose naming rule must be consistent with that of the C++ variable name.

Restrictions

Calling Example