UniqueSortFusionPass

Description

Splits the Unique or UniqueWithCount operator into a combination of Sort+AdjacentDifference+Cumsum+Scatter+UniqueConsecutive operators to complete the computation.

The Unique or UniqueWithCount operator before splitting is an AI CPU operator, and the five operators (Sort, AdjacentDifference, Cumsum, Scatter, and UniqueConsecutive) after splitting are all AI Core operators.

Scenario 1

Scenario 2

Restrictions

  • The output data types of the idx and count operators are int32 and int64.
  • The output data types of the x operator is int64, int32, int16, int8, uint64, uint32, uint16, uint8, bfloat16, float16, and float32.
  • For Atlas 350 Accelerator Cards, this fusion pattern cannot be disabled.

Availability

Atlas 350 Accelerator Card