module { tt.func public @triton__0d1d2d3d4d5d6d7de8de(%arg0: !tt.ptr {tt.divisibility = 16 : i32}, %arg1: !tt.ptr {tt.divisibility = 16 : i32}, %arg2: !tt.ptr {tt.divisibility = 16 : i32}, %arg3: !tt.ptr {tt.divisibility = 16 : i32}, %arg4: !tt.ptr {tt.divisibility = 16 : i32}, %arg5: !tt.ptr {tt.divisibility = 16 : i32}, %arg6: !tt.ptr {tt.divisibility = 16 : i32}, %arg7: i32 {tt.divisibility = 16 : i32, tt.max_divisibility = 16 : i32}, %arg8: i32 {tt.divisibility = 16 : i32, tt.max_divisibility = 16 : i32}) attributes {noinline = false} { %c256_i32 = arith.constant 256 : i32 %cst = arith.constant dense<0.000000e+00> : tensor<256xbf16> %cst_0 = arith.constant 0.000000e+00 : f32 %cst_1 = arith.constant dense<0.000000e+00> : tensor<256xf32> %cst_2 = arith.constant dense<2.560000e+02> : tensor<256xf32> %cst_3 = arith.constant dense<2.560000e+02> : tensor<1xf32> %cst_4 = arith.constant dense<256> : tensor<256xi32> %0 = tt.get_program_id x : i32 %1 = tt.make_range {end = 256 : i32, start = 0 : i32} : tensor<256xi32> %2 = arith.cmpi slt, %1, %cst_4 : tensor<256xi32> %3 = arith.muli %0, %c256_i32 : i32 %4 = tt.splat %3 : (i32) -> tensor<256xi32> %5 = arith.addi %1, %4 : tensor<256xi32> %6 = tt.splat %arg1 : (!tt.ptr) -> tensor<256x!tt.ptr> %7 = tt.addptr %6, %5 : tensor<256x!tt.ptr>, tensor<256xi32> %8 = tt.load %7, %2, %cst {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : tensor<256xbf16> %9 = arith.extf %8 : tensor<256xbf16> to tensor<256xf32> %10 = tt.splat %arg2 : (!tt.ptr) -> tensor<256x!tt.ptr> %11 = tt.addptr %10, %1 : tensor<256x!tt.ptr>, tensor<256xi32> %12 = tt.load %11, %2, %cst_1 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<256xf32> %13 = tt.splat %arg3 : (!tt.ptr) -> tensor<256x!tt.ptr> %14 = tt.addptr %13, %5 : tensor<256x!tt.ptr>, tensor<256xi32> %15 = tt.load %14, %2, %cst_1 {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : tensor<256xf32> %16 = tt.addptr %arg4, %0 : !tt.ptr, i32 %17 = tt.splat %16 : (!tt.ptr) -> tensor<1x!tt.ptr> %18 = tt.load %17 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<1xf32> %19 = tt.addptr %arg5, %0 : !tt.ptr, i32 %20 = tt.splat %19 : (!tt.ptr) -> tensor<1x!tt.ptr> %21 = tt.load %20 {cache = 1 : i32, evict = 3 : i32, isVolatile = false} : tensor<1xf32> %22 = tt.splat %arg0 : (!tt.ptr) -> tensor<256x!tt.ptr> %23 = tt.addptr %22, %5 : tensor<256x!tt.ptr>, tensor<256xi32> %24 = tt.load %23, %2, %cst_1 {cache = 1 : i32, evict = 1 : i32, isVolatile = false} : tensor<256xf32> %25 = arith.mulf %9, %12 : tensor<256xf32> %26 = arith.select %2, %25, %cst_1 : tensor<256xi1>, tensor<256xf32> %27 = "tt.reduce"(%26) <{axis = 0 : i32}> ({ ^bb0(%arg9: f32, %arg10: f32): %50 = arith.addf %arg9, %arg10 : f32 tt.reduce.return %50 : f32 }) : (tensor<256xf32>) -> f32 %28 = arith.addf %27, %cst_0 : f32 %29 = tt.broadcast %18 : (tensor<1xf32>) -> tensor<256xf32> %30 = arith.subf %15, %29 : tensor<256xf32> %31 = tt.broadcast %21 : (tensor<1xf32>) -> tensor<256xf32> %32 = arith.mulf %30, %31 : tensor<256xf32> %33 = arith.mulf %25, %32 : tensor<256xf32> %34 = arith.select %2, %33, %cst_1 : tensor<256xi1>, tensor<256xf32> %35 = "tt.reduce"(%34) <{axis = 0 : i32}> ({ ^bb0(%arg9: f32, %arg10: f32): %50 = arith.addf %arg9, %arg10 : f32 tt.reduce.return %50 : f32 }) : (tensor<256xf32>) -> f32 %36 = arith.addf %35, %cst_0 : f32 %37 = arith.divf %21, %cst_3 : tensor<1xf32> %38 = arith.mulf %25, %cst_2 : tensor<256xf32> %39 = tt.splat %28 : (f32) -> tensor<256xf32> %40 = arith.subf %38, %39 : tensor<256xf32> %41 = tt.splat %36 : (f32) -> tensor<256xf32> %42 = arith.mulf %32, %41 : tensor<256xf32> %43 = arith.subf %40, %42 : tensor<256xf32> %44 = tt.broadcast %37 : (tensor<1xf32>) -> tensor<256xf32> %45 = arith.mulf %44, %43 : tensor<256xf32> %46 = arith.addf %24, %45 : tensor<256xf32> tt.store %23, %46, %2 {cache = 1 : i32, evict = 1 : i32} : tensor<256xf32> %47 = tt.splat %arg6 : (!tt.ptr) -> tensor<256x!tt.ptr> %48 = tt.addptr %47, %5 : tensor<256x!tt.ptr>, tensor<256xi32> %49 = arith.truncf %46 : tensor<256xf32> to tensor<256xbf16> tt.store %48, %49, %2 {cache = 1 : i32, evict = 1 : i32} : tensor<256xbf16> tt.return } }