| @@ -127,509 +127,722 @@ extern "C" __global__ __aicore__ void scatter_elements(GM_ADDR x, GM_ADDR indice |
| GET_TILING_DATA(tilingData, tiling); | GET_TILING_DATA(tilingData, tiling); |
| TPipe pipe; | TPipe pipe; |
| KERNEL_TASK_TYPE_DEFAULT(KERNEL_TYPE_MIX_AIV_1_0); | KERNEL_TASK_TYPE_DEFAULT(KERNEL_TYPE_MIX_AIV_1_0); |
| - if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B8)) { | + |
| - if (tilingData.isDeterministic) { | + #if (ORIG_DTYPE_DATA == DT_INT8 || ORIG_DTYPE_DATA == DT_UINT8 || ORIG_DTYPE_DATA == DT_BOOL) && ORIG_DTYPE_INDICES == DT_INT32 |
| - KernelScatterElementsDeterm<int8_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B8); |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B8); |
| - op.Process(); | + |
| - } else { | + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_NONE_B8 |
| - KernelScatterElements<int8_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int8_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int8_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_NONE_B8 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int8_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int8_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if (ORIG_DTYPE_DATA == DT_INT8 || ORIG_DTYPE_DATA == DT_UINT8 || ORIG_DTYPE_DATA == DT_BOOL) && ORIG_DTYPE_INDICES == DT_INT64 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B8); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B8); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_NONE_B8 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int8_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int8_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_NONE_B8 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int8_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int8_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if (ORIG_DTYPE_DATA == DT_INT16 || ORIG_DTYPE_DATA == DT_FLOAT16 || ORIG_DTYPE_DATA == DT_BF16) && ORIG_DTYPE_INDICES == DT_INT32 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B16); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B16); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_NONE_B16 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int16_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int16_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_NONE_B16 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int16_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int16_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if (ORIG_DTYPE_DATA == DT_INT16 || ORIG_DTYPE_DATA == DT_FLOAT16 || ORIG_DTYPE_DATA == DT_BF16) && ORIG_DTYPE_INDICES == DT_INT64 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B16); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B16); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_NONE_B16 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int16_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int16_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_NONE_B16 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int16_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int16_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if (ORIG_DTYPE_DATA == DT_INT32 || ORIG_DTYPE_DATA == DT_FLOAT) && ORIG_DTYPE_INDICES == DT_INT32 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B32); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B32); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_NONE_B32 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int32_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int32_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_NONE_B32 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int32_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int32_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if (ORIG_DTYPE_DATA == DT_INT32 || ORIG_DTYPE_DATA == DT_FLOAT) && ORIG_DTYPE_INDICES == DT_INT64 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B32); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B32); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_NONE_B32 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int32_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int32_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_NONE_B32 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int32_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int32_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if (ORIG_DTYPE_DATA == DT_INT64 || ORIG_DTYPE_DATA == DT_DOUBLE) && ORIG_DTYPE_INDICES == DT_INT32 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B64); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B64); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_NONE_B64 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int64_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int64_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_NONE_B64 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int64_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int64_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if (ORIG_DTYPE_DATA == DT_INT64 || ORIG_DTYPE_DATA == DT_DOUBLE) && ORIG_DTYPE_INDICES == DT_INT64 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B64); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B64); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_NONE_B64 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int64_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int64_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_NONE_B64 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<int64_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<int64_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #endif |
| + #endif |
| + |
| + #if ORIG_DTYPE_DATA == DT_FLOAT && ORIG_DTYPE_INDICES == DT_INT32 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_FP32); |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_FP32); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_FP32); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_FP32); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_FP32 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<float, int32_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<float, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_FP32 |
| + KernelScatterElements<float, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_FP32 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B16)) { | + if (tilingData.isDeterministic) { |
| - if (tilingData.isDeterministic) { | + KernelScatterElementsDeterm<float, int32_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); |
| - KernelScatterElementsDeterm<int16_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | + op.Init(x, indices, updates, y); |
| - op.Init(x, indices, updates, y); | + op.Process(); |
| - op.Process(); | + } else { |
| - } else { | + KernelScatterElements<float, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - KernelScatterElements<int16_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_FP32 |
| + KernelScatterElements<float, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B32)) { | + #endif |
| - if (tilingData.isDeterministic) { | + |
| - KernelScatterElementsDeterm<int32_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | + #if ORIG_DTYPE_DATA == DT_FLOAT && ORIG_DTYPE_INDICES == DT_INT64 |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_FP32); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_FP32); |
| - } else { | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_FP32); |
| - KernelScatterElements<int32_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_FP32); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_FP32 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<float, int64_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<float, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_FP32 |
| + KernelScatterElements<float, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_FP32 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_NONE_B64)) { | + if (tilingData.isDeterministic) { |
| - if (tilingData.isDeterministic) { | + KernelScatterElementsDeterm<float, int64_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); |
| - KernelScatterElementsDeterm<int64_t, int32_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | + op.Init(x, indices, updates, y); |
| - op.Init(x, indices, updates, y); | + op.Process(); |
| - op.Process(); | + } else { |
| - } else { | + KernelScatterElements<float, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - KernelScatterElements<int64_t, int32_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_FP32 |
| + KernelScatterElements<float, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_FP32)) { | + #endif |
| - if (tilingData.isDeterministic) { | + |
| - KernelScatterElementsDeterm<float, int32_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); | + #if ORIG_DTYPE_DATA == DT_FLOAT16 && ORIG_DTYPE_INDICES == DT_INT32 |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_FP16); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_FP16); |
| - } else { | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_FP16); |
| - KernelScatterElements<float, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_FP16); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_FP16 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<half, int32_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<half, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_FP16 |
| + KernelScatterElements<half, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_FP16 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_FP16)) { | + if (tilingData.isDeterministic) { |
| - if (tilingData.isDeterministic) { | + KernelScatterElementsDeterm<half, int32_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); |
| - KernelScatterElementsDeterm<half, int32_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); | + op.Init(x, indices, updates, y); |
| - op.Init(x, indices, updates, y); | + op.Process(); |
| - op.Process(); | + } else { |
| - } else { | + KernelScatterElements<half, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - KernelScatterElements<half, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_FP16 |
| + KernelScatterElements<half, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT8)) { | + #endif |
| - KernelScatterElements<int8_t, int32_t, uint32_t, int32_t, REDU_ADD> op(pipe); | + |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + #if ORIG_DTYPE_DATA == DT_FLOAT16 && ORIG_DTYPE_INDICES == DT_INT64 |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_FP16); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT32)) { | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_FP16); |
| - KernelScatterElements<int32_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_FP16); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_FP16); |
| - op.Process(); | + |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_UINT8)) { | + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_FP16 |
| - KernelScatterElements<uint8_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | + if (tilingData.isDeterministic) { |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + KernelScatterElementsDeterm<half, int64_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); |
| - op.Process(); | + op.Init(x, indices, updates, y); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT16)) { | + op.Process(); |
| - KernelScatterElements<int16_t, int32_t, uint32_t, int32_t, REDU_ADD> op(pipe); | + } else { |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + KernelScatterElements<half, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| - op.Process(); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_BF16)) { | + op.Process(); |
| - if (tilingData.isDeterministic) { | + } |
| - KernelScatterElementsDeterm<bfloat16_t, int32_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); | + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_FP16 |
| - op.Init(x, indices, updates, y); | + KernelScatterElements<half, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<bfloat16_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_FP16 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT64)) { | + if (tilingData.isDeterministic) { |
| - KernelScatterElements<int64_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | + KernelScatterElementsDeterm<half, int64_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + op.Init(x, indices, updates, y); |
| - op.Process(); | + op.Process(); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_BOOL)) { | + } else { |
| - KernelScatterElements<uint8_t, int32_t, uint32_t, half, REDU_ADD> op(pipe); | + KernelScatterElements<half, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - op.Process(); | + op.Process(); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_FP32)) { | + } |
| - KernelScatterElements<float, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_FP16 |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + KernelScatterElements<half, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_FP16)) { | |
| - KernelScatterElements<half, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT8)) { | |
| - KernelScatterElements<int8_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT32)) { | |
| - KernelScatterElements<int32_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_UINT8)) { | |
| - KernelScatterElements<uint8_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT16)) { | |
| - KernelScatterElements<int16_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_BF16)) { | |
| - KernelScatterElements<bfloat16_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT64)) { | |
| - KernelScatterElements<int64_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B8)) { | |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<int8_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<int8_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B16)) { | + #endif |
| - if (tilingData.isDeterministic) { | + |
| - KernelScatterElementsDeterm<int16_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | + #if ORIG_DTYPE_DATA == DT_BF16 && ORIG_DTYPE_INDICES == DT_INT32 |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_BF16); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_BF16); |
| - } else { | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_BF16); |
| - KernelScatterElements<int16_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_BF16); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_BF16 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<bfloat16_t, int32_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<bfloat16_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_BF16 |
| + KernelScatterElements<bfloat16_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_BF16 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B32)) { | + if (tilingData.isDeterministic) { |
| - if (tilingData.isDeterministic) { | + KernelScatterElementsDeterm<bfloat16_t, int32_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); |
| - KernelScatterElementsDeterm<int32_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | + op.Init(x, indices, updates, y); |
| - op.Init(x, indices, updates, y); | + op.Process(); |
| - op.Process(); | + } else { |
| - } else { | + KernelScatterElements<bfloat16_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - KernelScatterElements<int32_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_BF16 |
| + KernelScatterElements<bfloat16_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_NONE_B64)) { | + #endif |
| - if (tilingData.isDeterministic) { | + |
| - KernelScatterElementsDeterm<int64_t, int64_t, uint32_t, REDU_NONE> op(&tilingData, &pipe); | + #if ORIG_DTYPE_DATA == DT_BF16 && ORIG_DTYPE_INDICES == DT_INT64 |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_BF16); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_BF16); |
| - } else { | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_BF16); |
| - KernelScatterElements<int64_t, int64_t, uint32_t, uint32_t, REDU_NONE> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_BF16); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_BF16 |
| + if (tilingData.isDeterministic) { |
| + KernelScatterElementsDeterm<bfloat16_t, int64_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); |
| + op.Init(x, indices, updates, y); |
| + op.Process(); |
| + } else { |
| + KernelScatterElements<bfloat16_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_BF16 |
| + KernelScatterElements<bfloat16_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_BF16 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_FP32)) { | + if (tilingData.isDeterministic) { |
| - if (tilingData.isDeterministic) { | + KernelScatterElementsDeterm<bfloat16_t, int64_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); |
| - KernelScatterElementsDeterm<float, int64_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); | + op.Init(x, indices, updates, y); |
| - op.Init(x, indices, updates, y); | + op.Process(); |
| - op.Process(); | + } else { |
| - } else { | + KernelScatterElements<bfloat16_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - KernelScatterElements<float, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + } |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_BF16 |
| + KernelScatterElements<bfloat16_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_FP16)) { | + #endif |
| - if (tilingData.isDeterministic) { | + |
| - KernelScatterElementsDeterm<half, int64_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); | + #if ORIG_DTYPE_DATA == DT_INT8 && ORIG_DTYPE_INDICES == DT_INT32 |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT8); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT8); |
| - } else { | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT8); |
| - KernelScatterElements<half, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT8); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_INT8 |
| + KernelScatterElements<int8_t, int32_t, uint32_t, int32_t, REDU_ADD> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_INT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT8)) { | + KernelScatterElements<int8_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| - KernelScatterElements<int8_t, int64_t, uint32_t, int32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT32)) { | |
| - KernelScatterElements<int32_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_UINT8)) { | |
| - KernelScatterElements<uint8_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT16)) { | |
| - KernelScatterElements<int16_t, int64_t, uint32_t, int32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_BF16)) { | |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<bfloat16_t, int64_t, uint32_t, REDU_ADD> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<bfloat16_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_INT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT64)) { | + KernelScatterElements<int8_t, int32_t, uint64_t, int32_t, REDU_ADD> op(pipe); |
| - KernelScatterElements<int64_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_BOOL)) { | |
| - KernelScatterElements<uint8_t, int64_t, uint32_t, half, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_FP32)) { | |
| - KernelScatterElements<float, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_FP16)) { | |
| - KernelScatterElements<half, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT8)) { | |
| - KernelScatterElements<int8_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT32)) { | |
| - KernelScatterElements<int32_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_UINT8)) { | |
| - KernelScatterElements<uint8_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT16)) { | |
| - KernelScatterElements<int16_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_BF16)) { | |
| - KernelScatterElements<bfloat16_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT64)) { | |
| - KernelScatterElements<int64_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B8)) { | |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<int8_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<int8_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_INT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B16)) { | + KernelScatterElements<int8_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<int16_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<int16_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B32)) { | + #endif |
| - if (tilingData.isDeterministic) { | + |
| - KernelScatterElementsDeterm<int32_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | + #if ORIG_DTYPE_DATA == DT_INT8 && ORIG_DTYPE_INDICES == DT_INT64 |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT8); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT8); |
| - } else { | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT8); |
| - KernelScatterElements<int32_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT8); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_INT8 |
| + KernelScatterElements<int8_t, int64_t, uint32_t, int32_t, REDU_ADD> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_INT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_NONE_B64)) { | + KernelScatterElements<int8_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<int64_t, int32_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<int64_t, int32_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_INT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_FP32)) { | + KernelScatterElements<int8_t, int64_t, uint64_t, int32_t, REDU_ADD> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<float, int32_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<float, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_INT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_FP16)) { | + KernelScatterElements<int8_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<half, int32_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<half, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT8)) { | + #endif |
| - KernelScatterElements<int8_t, int32_t, uint64_t, int32_t, REDU_ADD> op(pipe); | + |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + #if ORIG_DTYPE_DATA == DT_UINT8 && ORIG_DTYPE_INDICES == DT_INT32 |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_UINT8); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT32)) { | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_UINT8); |
| - KernelScatterElements<int32_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_UINT8); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_UINT8); |
| - op.Process(); | + |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_UINT8)) { | + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_UINT8 |
| - KernelScatterElements<uint8_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | + KernelScatterElements<uint8_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT16)) { | |
| - KernelScatterElements<int16_t, int32_t, uint64_t, int32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_BF16)) { | |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<bfloat16_t, int32_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<bfloat16_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_UINT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT64)) { | + KernelScatterElements<uint8_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| - KernelScatterElements<int64_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_BOOL)) { | |
| - KernelScatterElements<uint8_t, int32_t, uint64_t, half, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_FP32)) { | |
| - KernelScatterElements<float, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_FP16)) { | |
| - KernelScatterElements<half, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT8)) { | |
| - KernelScatterElements<int8_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT32)) { | |
| - KernelScatterElements<int32_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_UINT8)) { | |
| - KernelScatterElements<uint8_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT16)) { | |
| - KernelScatterElements<int16_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_BF16)) { | |
| - KernelScatterElements<bfloat16_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT64)) { | |
| - KernelScatterElements<int64_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B8)) { | |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<int8_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<int8_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_UINT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B16)) { | + KernelScatterElements<uint8_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<int16_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<int16_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_UINT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B32)) { | + KernelScatterElements<uint8_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<int32_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<int32_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_NONE_B64)) { | + #endif |
| - if (tilingData.isDeterministic) { | + |
| - KernelScatterElementsDeterm<int64_t, int64_t, uint64_t, REDU_NONE> op(&tilingData, &pipe); | + #if ORIG_DTYPE_DATA == DT_UINT8 && ORIG_DTYPE_INDICES == DT_INT64 |
| - op.Init(x, indices, updates, y); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_UINT8); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_UINT8); |
| - } else { | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_UINT8); |
| - KernelScatterElements<int64_t, int64_t, uint64_t, uint32_t, REDU_NONE> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_UINT8); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_UINT8 |
| + KernelScatterElements<uint8_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_UINT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_FP32)) { | + KernelScatterElements<uint8_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<float, int64_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<float, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_UINT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_FP16)) { | + KernelScatterElements<uint8_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<half, int64_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<half, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_UINT8 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT8)) { | + KernelScatterElements<uint8_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| - KernelScatterElements<int8_t, int64_t, uint64_t, int32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT32)) { | |
| - KernelScatterElements<int32_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_UINT8)) { | |
| - KernelScatterElements<uint8_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT16)) { | |
| - KernelScatterElements<int16_t, int64_t, uint64_t, int32_t, REDU_ADD> op(pipe); | |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | |
| - op.Process(); | |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_BF16)) { | |
| - if (tilingData.isDeterministic) { | |
| - KernelScatterElementsDeterm<bfloat16_t, int64_t, uint64_t, REDU_ADD> op(&tilingData, &pipe); | |
| - op.Init(x, indices, updates, y); | |
| - op.Process(); | |
| - } else { | |
| - KernelScatterElements<bfloat16_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | |
| op.Init(x, indices, updates, y, userWS, &tilingData); | op.Init(x, indices, updates, y, userWS, &tilingData); |
| op.Process(); | op.Process(); |
| - } | + #endif |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT64)) { | + #endif |
| - KernelScatterElements<int64_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); | + |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + #if ORIG_DTYPE_DATA == DT_INT32 && ORIG_DTYPE_INDICES == DT_INT32 |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT32); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_BOOL)) { | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT32); |
| - KernelScatterElements<uint8_t, int64_t, uint64_t, half, REDU_ADD> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT32); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT32); |
| - op.Process(); | + |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_FP32)) { | + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_INT32 |
| - KernelScatterElements<float, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + KernelScatterElements<int32_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - op.Process(); | + op.Process(); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_FP16)) { | + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_INT32 |
| - KernelScatterElements<half, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + KernelScatterElements<int32_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - op.Process(); | + op.Process(); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT8)) { | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_INT32 |
| - KernelScatterElements<int8_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + KernelScatterElements<int32_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - op.Process(); | + op.Process(); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT32)) { | + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_INT32 |
| - KernelScatterElements<int32_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + KernelScatterElements<int32_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - op.Process(); | + op.Process(); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_UINT8)) { | + #endif |
| - KernelScatterElements<uint8_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + #endif |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + |
| - op.Process(); | + #if ORIG_DTYPE_DATA == DT_INT32 && ORIG_DTYPE_INDICES == DT_INT64 |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT16)) { | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT32); |
| - KernelScatterElements<int16_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT32); |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT32); |
| - op.Process(); | + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT32); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_BF16)) { | + |
| - KernelScatterElements<bfloat16_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_INT32 |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + KernelScatterElements<int32_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| - op.Process(); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - } else if (TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT64)) { | + op.Process(); |
| - KernelScatterElements<int64_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); | + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_INT32 |
| - op.Init(x, indices, updates, y, userWS, &tilingData); | + KernelScatterElements<int32_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| - op.Process(); | + op.Init(x, indices, updates, y, userWS, &tilingData); |
| - } | + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_INT32 |
| + KernelScatterElements<int32_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_INT32 |
| + KernelScatterElements<int32_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #endif |
| + #endif |
| + |
| + #if ORIG_DTYPE_DATA == DT_INT16 && ORIG_DTYPE_INDICES == DT_INT32 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT16); |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT16); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT16); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT16); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_INT16 |
| + KernelScatterElements<int16_t, int32_t, uint32_t, int32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_INT16 |
| + KernelScatterElements<int16_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_INT16 |
| + KernelScatterElements<int16_t, int32_t, uint64_t, int32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_INT16 |
| + KernelScatterElements<int16_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #endif |
| + #endif |
| + |
| + #if ORIG_DTYPE_DATA == DT_INT16 && ORIG_DTYPE_INDICES == DT_INT64 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT16); |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT16); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT16); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT16); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_INT16 |
| + KernelScatterElements<int16_t, int64_t, uint32_t, int32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_INT16 |
| + KernelScatterElements<int16_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_INT16 |
| + KernelScatterElements<int16_t, int64_t, uint64_t, int32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_INT16 |
| + KernelScatterElements<int16_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #endif |
| + #endif |
| + |
| + #if ORIG_DTYPE_DATA == DT_INT64 && ORIG_DTYPE_INDICES == DT_INT32 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_INT64); |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_MUL_INT64); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_INT64); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_MUL_INT64); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_INT64 |
| + KernelScatterElements<int64_t, int32_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_MUL_INT64 |
| + KernelScatterElements<int64_t, int32_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_INT64 |
| + KernelScatterElements<int64_t, int32_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_MUL_INT64 |
| + KernelScatterElements<int64_t, int32_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #endif |
| + #endif |
| + |
| + #if ORIG_DTYPE_DATA == DT_INT64 && ORIG_DTYPE_INDICES == DT_INT64 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_INT64); |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_MUL_INT64); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_INT64); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_MUL_INT64); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_INT64 |
| + KernelScatterElements<int64_t, int64_t, uint32_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_MUL_INT64 |
| + KernelScatterElements<int64_t, int64_t, uint32_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_INT64 |
| + KernelScatterElements<int64_t, int64_t, uint64_t, uint32_t, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_MUL_INT64 |
| + KernelScatterElements<int64_t, int64_t, uint64_t, uint32_t, REDU_MUL> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #endif |
| + #endif |
| + |
| + #if ORIG_DTYPE_DATA == DT_BOOL && ORIG_DTYPE_INDICES == DT_INT32 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX32_REDU_ADD_BOOL); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX32_REDU_ADD_BOOL); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX32_REDU_ADD_BOOL |
| + KernelScatterElements<uint8_t, int32_t, uint32_t, half, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX32_REDU_ADD_BOOL |
| + KernelScatterElements<uint8_t, int32_t, uint64_t, half, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #endif |
| + #endif |
| + |
| + #if ORIG_DTYPE_DATA == DT_BOOL && ORIG_DTYPE_INDICES == DT_INT64 |
| + TILING_KEY_IS(SCAC_ELE_UINT32_IDX64_REDU_ADD_BOOL); |
| + TILING_KEY_IS(SCAC_ELE_UINT64_IDX64_REDU_ADD_BOOL); |
| + |
| + #if TILING_KEY_VAR == SCAC_ELE_UINT32_IDX64_REDU_ADD_BOOL |
| + KernelScatterElements<uint8_t, int64_t, uint32_t, half, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #elif TILING_KEY_VAR == SCAC_ELE_UINT64_IDX64_REDU_ADD_BOOL |
| + KernelScatterElements<uint8_t, int64_t, uint64_t, half, REDU_ADD> op(pipe); |
| + op.Init(x, indices, updates, y, userWS, &tilingData); |
| + op.Process(); |
| + #endif |
| + #endif |
| } | } |
| |