|
#blocked = #triton_gpu.blocked<{sizePerThread = [1, 1], threadsPerWarp = [1, 32], warpsPerCTA = [1, 2], order = [0, 1], CTAsPerCGA = [1, 1], CTASplitNum = [1, 1], CTAOrder = [1, 0]}> |
|
module attributes {"triton_gpu.compute-capability" = 89 : i32, "triton_gpu.num-ctas" = 1 : i32, "triton_gpu.num-warps" = 2 : i32, "triton_gpu.threads-per-warp" = 32 : i32} { |
|
tt.func public @triton__0d1d2d34e(%arg0: !tt.ptr<f32, 1> {tt.divisibility = 16 : i32}, %arg1: !tt.ptr<f32, 1> {tt.divisibility = 16 : i32}, %arg2: !tt.ptr<i64, 1> {tt.divisibility = 16 : i32}, %arg3: i32, %arg4: i32 {tt.max_divisibility = 8 : i32}) attributes {noinline = false} { |
|
%cst = arith.constant dense<0> : tensor<1x8xi64, #blocked> |
|
%cst_0 = arith.constant dense<0.000000e+00> : tensor<1x8xf32, #blocked> |
|
%cst_1 = arith.constant dense<8> : tensor<1x8xi32, #blocked> |
|
%c0_i32 = arith.constant 0 : i32 |
|
%0 = tt.make_range {end = 8 : i32, start = 0 : i32} : tensor<8xi32, #triton_gpu.slice<{dim = 0, parent = #blocked}>> |
|
%1 = tt.expand_dims %0 {axis = 0 : i32} : (tensor<8xi32, #triton_gpu.slice<{dim = 0, parent = #blocked}>>) -> tensor<1x8xi32, #blocked> |
|
%2 = arith.cmpi slt, %1, %cst_1 : tensor<1x8xi32, #blocked> |
|
%3 = tt.splat %arg1 : (!tt.ptr<f32, 1>) -> tensor<1x8x!tt.ptr<f32, 1>, #blocked> |
|
%4 = tt.addptr %3, %1 : tensor<1x8x!tt.ptr<f32, 1>, #blocked>, tensor<1x8xi32, #blocked> |
|
%5 = tt.load %4, %2, %cst_0 {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : tensor<1x8xf32, #blocked> |
|
%6 = tt.splat %arg2 : (!tt.ptr<i64, 1>) -> tensor<1x8x!tt.ptr<i64, 1>, #blocked> |
|
%7 = tt.addptr %6, %1 : tensor<1x8x!tt.ptr<i64, 1>, #blocked>, tensor<1x8xi32, #blocked> |
|
%8 = tt.load %7, %2, %cst {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : tensor<1x8xi64, #blocked> |
|
%9 = arith.select %2, %5, %cst_0 : tensor<1x8xi1, #blocked>, tensor<1x8xf32, #blocked> |
|
%10 = "tt.reduce"(%9) <{axis = 1 : i32}> ({ |
|
^bb0(%arg5: f32, %arg6: f32): |
|
%19 = arith.addf %arg5, %arg6 : f32 |
|
tt.reduce.return %19 : f32 |
|
}) : (tensor<1x8xf32, #blocked>) -> tensor<1xf32, #triton_gpu.slice<{dim = 1, parent = #blocked}>> |
|
%11 = tt.expand_dims %10 {axis = 1 : i32} : (tensor<1xf32, #triton_gpu.slice<{dim = 1, parent = #blocked}>>) -> tensor<1x1xf32, #blocked> |
|
%12 = arith.select %2, %8, %cst : tensor<1x8xi1, #blocked>, tensor<1x8xi64, #blocked> |
|
%13 = "tt.reduce"(%12) <{axis = 1 : i32}> ({ |
|
^bb0(%arg5: i64, %arg6: i64): |
|
%19 = arith.addi %arg5, %arg6 : i64 |
|
tt.reduce.return %19 : i64 |
|
}) : (tensor<1x8xi64, #blocked>) -> tensor<1xi64, #triton_gpu.slice<{dim = 1, parent = #blocked}>> |
|
%14 = tt.expand_dims %13 {axis = 1 : i32} : (tensor<1xi64, #triton_gpu.slice<{dim = 1, parent = #blocked}>>) -> tensor<1x1xi64, #blocked> |
|
%15 = arith.sitofp %14 : tensor<1x1xi64, #blocked> to tensor<1x1xf32, #blocked> |
|
%16 = arith.divf %11, %15 : tensor<1x1xf32, #blocked> |
|
gpu.barrier |
|
%17 = tt.addptr %arg0, %c0_i32 : !tt.ptr<f32, 1>, i32 |
|
%18 = tt.splat %17 : (!tt.ptr<f32, 1>) -> tensor<1x1x!tt.ptr<f32, 1>, #blocked> |
|
tt.store %18, %16 {cache = 1 : i32, evict = 1 : i32} : tensor<1x1xf32, #blocked> |
|
tt.return |
|
} |
|
} |
|
|