目录

SetTilingKey

Function Description

Sets the tiling key.

Different kernel implementation branches can be identified by the tiling key. After the tiling key is set on the host, the corresponding branch can be selected. For example, an operator has different algorithm logics in different shapes. The kernel can use the tiling key to select a specific algorithm logic. However, the tiling algorithms on the host can be different, so the host and kernel can use the same tiling key for association.

Function Prototype

ge::graphStatus SetTilingKey(const uint64_t tiling_key);

Parameters

Parameter Input/Output Description
tiling_key Input Tiling key to be set.

Return Value

ge::GRAPH_SUCCESS on success.

For details about the definition of graphStatus, see ge::graphStatus.

Restrictions

The value of tiling_key must be within the range of the uint64_t data type but cannot be UINT64_MAX.

Calling Example

ge::graphStatus Tiling4XXX(TilingContext* context) {
  auto ret = context->SetTilingKey(20);
  // ...
}