#blocked = #triton_gpu.blocked<{sizePerThread = [1, 1], threadsPerWarp = [16, 2], warpsPerCTA = [1, 8], order = [0, 1], CTAsPerCGA = [1, 1], CTASplitNum = [1, 1], CTAOrder = [1, 0]}> #blocked1 = #triton_gpu.blocked<{sizePerThread = [4, 1], threadsPerWarp = [4, 8], warpsPerCTA = [1, 8], 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" = 8 : i32, "triton_gpu.threads-per-warp" = 32 : i32} { tt.func public @triton__0d1d2d3de4e(%arg0: !tt.ptr {tt.divisibility = 16 : i32}, %arg1: !tt.ptr {tt.divisibility = 16 : i32}, %arg2: !tt.ptr {tt.divisibility = 16 : i32}, %arg3: i32 {tt.divisibility = 16 : i32, tt.max_divisibility = 16 : i32}, %arg4: i32 {tt.max_divisibility = 8 : i32}) attributes {noinline = false} { %cst = arith.constant dense<256> : tensor<16x1xi64, #blocked> %cst_0 = arith.constant dense<0> : tensor<16x1xi64, #blocked> %cst_1 = arith.constant dense<512> : tensor<16x1xi64, #blocked> %cst_2 = arith.constant dense<256> : tensor<16x1xi32, #blocked> %cst_3 = arith.constant dense<131072> : tensor<1x128xi32, #blocked1> %cst_4 = arith.constant dense<120> : tensor<1x128xi32, #blocked1> %cst_5 = arith.constant dense<0.000000e+00> : tensor<16x128xf32, #blocked1> %cst_6 = arith.constant dense : tensor<16x1xi1, #blocked> %c16_i32 = arith.constant 16 : i32 %0 = tt.get_program_id x : i32 %1 = arith.muli %0, %c16_i32 : i32 %2 = tt.make_range {end = 16 : i32, start = 0 : i32} : tensor<16xi32, #triton_gpu.slice<{dim = 1, parent = #blocked1}>> %3 = tt.make_range {end = 16 : i32, start = 0 : i32} : tensor<16xi32, #triton_gpu.slice<{dim = 1, parent = #blocked}>> %4 = tt.expand_dims %2 {axis = 1 : i32} : (tensor<16xi32, #triton_gpu.slice<{dim = 1, parent = #blocked1}>>) -> tensor<16x1xi32, #blocked1> %5 = tt.expand_dims %3 {axis = 1 : i32} : (tensor<16xi32, #triton_gpu.slice<{dim = 1, parent = #blocked}>>) -> tensor<16x1xi32, #blocked> %6 = tt.splat %1 : (i32) -> tensor<16x1xi32, #blocked1> %7 = tt.splat %1 : (i32) -> tensor<16x1xi32, #blocked> %8 = arith.addi %6, %4 : tensor<16x1xi32, #blocked1> %9 = arith.addi %7, %5 : tensor<16x1xi32, #blocked> %10 = tt.make_range {end = 128 : i32, start = 0 : i32} : tensor<128xi32, #triton_gpu.slice<{dim = 0, parent = #blocked1}>> %11 = tt.expand_dims %10 {axis = 0 : i32} : (tensor<128xi32, #triton_gpu.slice<{dim = 0, parent = #blocked1}>>) -> tensor<1x128xi32, #blocked1> %12 = arith.cmpi slt, %11, %cst_4 : tensor<1x128xi32, #blocked1> %13 = arith.muli %11, %cst_3 : tensor<1x128xi32, #blocked1> %14 = tt.broadcast %8 : (tensor<16x1xi32, #blocked1>) -> tensor<16x128xi32, #blocked1> %15 = tt.broadcast %13 : (tensor<1x128xi32, #blocked1>) -> tensor<16x128xi32, #blocked1> %16 = arith.addi %14, %15 : tensor<16x128xi32, #blocked1> %17 = tt.splat %arg0 : (!tt.ptr) -> tensor<16x128x!tt.ptr, #blocked1> %18 = tt.addptr %17, %16 : tensor<16x128x!tt.ptr, #blocked1>, tensor<16x128xi32, #blocked1> %19 = tt.broadcast %12 : (tensor<1x128xi1, #blocked1>) -> tensor<16x128xi1, #blocked1> %20 = tt.load %18, %19, %cst_5 {cache = 1 : i32, evict = 2 : i32, isVolatile = false} : tensor<16x128xf32, #blocked1> %21 = arith.addf %20, %cst_5 : tensor<16x128xf32, #blocked1> %22 = arith.select %19, %21, %cst_5 : tensor<16x128xi1, #blocked1>, tensor<16x128xf32, #blocked1> %23 = "tt.reduce"(%22) <{axis = 1 : i32}> ({ ^bb0(%arg5: f32, %arg6: f32): %40 = arith.addf %arg5, %arg6 : f32 tt.reduce.return %40 : f32 }) : (tensor<16x128xf32, #blocked1>) -> tensor<16xf32, #triton_gpu.slice<{dim = 1, parent = #blocked1}>> %24 = triton_gpu.convert_layout %23 : (tensor<16xf32, #triton_gpu.slice<{dim = 1, parent = #blocked1}>>) -> tensor<16xf32, #triton_gpu.slice<{dim = 1, parent = #blocked}>> %25 = tt.expand_dims %24 {axis = 1 : i32} : (tensor<16xf32, #triton_gpu.slice<{dim = 1, parent = #blocked}>>) -> tensor<16x1xf32, #blocked> %26 = arith.divsi %9, %cst_2 : tensor<16x1xi32, #blocked> %27 = arith.remsi %9, %cst_2 : tensor<16x1xi32, #blocked> %28 = tt.splat %arg1 : (!tt.ptr) -> tensor<16x1x!tt.ptr, #blocked> %29 = tt.addptr %28, %26 : tensor<16x1x!tt.ptr, #blocked>, tensor<16x1xi32, #blocked> %30 = tt.load %29 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<16x1xi64, #blocked> %31 = arith.addi %30, %cst_1 : tensor<16x1xi64, #blocked> %32 = arith.cmpi slt, %30, %cst_0 : tensor<16x1xi64, #blocked> %33 = arith.select %32, %31, %30 : tensor<16x1xi1, #blocked>, tensor<16x1xi64, #blocked> %34 = arith.muli %33, %cst : tensor<16x1xi64, #blocked> %35 = arith.extsi %27 : tensor<16x1xi32, #blocked> to tensor<16x1xi64, #blocked> %36 = arith.addi %35, %34 : tensor<16x1xi64, #blocked> %37 = tt.splat %arg2 : (!tt.ptr) -> tensor<16x1x!tt.ptr, #blocked> %38 = tt.addptr %37, %36 : tensor<16x1x!tt.ptr, #blocked>, tensor<16x1xi64, #blocked> %39 = "tt.atomic_rmw"(%38, %25, %cst_6) <{atomic_rmw_op = 5 : i32, scope = 1 : i32, sem = 4 : i32}> : (tensor<16x1x!tt.ptr, #blocked>, tensor<16x1xf32, #blocked>, tensor<16x1xi1, #blocked>) -> tensor<16x1xf32, #blocked> tt.return } }