#loc = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1273:5) #loc1 = loc(unknown) #loc10 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1289:19) #loc33 = loc("X_ptr"(#loc)) #loc34 = loc("Out1_ptr"(#loc)) #loc35 = loc("Out2_ptr"(#loc)) #loc36 = loc("Scale1_ptr"(#loc)) #loc37 = loc("Shift1_ptr"(#loc)) #loc38 = loc("Scale2_ptr"(#loc)) #loc39 = loc("Shift2_ptr"(#loc)) #loc40 = loc("N"(#loc)) #loc41 = loc("scale_n_rows"(#loc)) #loc49 = loc("mean_sq"(#loc10)) #loc66 = loc(callsite(#loc1 at #loc49)) module { tt.func public @_rms_norm_dual_scale_shift_kernel(%X_ptr: !tt.ptr {tt.divisibility = 16 : i32} loc("X_ptr"(#loc)), %Out1_ptr: !tt.ptr {tt.divisibility = 16 : i32} loc("Out1_ptr"(#loc)), %Out2_ptr: !tt.ptr {tt.divisibility = 16 : i32} loc("Out2_ptr"(#loc)), %Scale1_ptr: !tt.ptr {tt.divisibility = 16 : i32} loc("Scale1_ptr"(#loc)), %Shift1_ptr: !tt.ptr {tt.divisibility = 16 : i32} loc("Shift1_ptr"(#loc)), %Scale2_ptr: !tt.ptr {tt.divisibility = 16 : i32} loc("Scale2_ptr"(#loc)), %Shift2_ptr: !tt.ptr {tt.divisibility = 16 : i32} loc("Shift2_ptr"(#loc)), %N: i32 {tt.divisibility = 16 : i32} loc("N"(#loc)), %scale_n_rows: i32 {tt.divisibility = 16 : i32} loc("scale_n_rows"(#loc))) attributes {noinline = false} { %cst = arith.constant dense<0.000000e+00> : tensor<2048xbf16> loc(#loc1) %cst_0 = arith.constant dense<1.000000e+00> : tensor<2048xf32> loc(#loc1) %cst_1 = arith.constant 9.99999997E-7 : f32 loc(#loc1) %row = tt.get_program_id x : i32 loc(#loc42) %cols = tt.make_range {end = 2048 : i32, start = 0 : i32} : tensor<2048xi32> loc(#loc43) %mask = tt.splat %N : i32 -> tensor<2048xi32> loc(#loc44) %mask_2 = arith.cmpi slt, %cols, %mask : tensor<2048xi32> loc(#loc44) %off = arith.muli %row, %N : i32 loc(#loc45) %off_3 = tt.splat %off : i32 -> tensor<2048xi32> loc(#loc45) %off_4 = arith.addi %off_3, %cols : tensor<2048xi32> loc(#loc45) %x = tt.splat %X_ptr : !tt.ptr -> tensor<2048x!tt.ptr> loc(#loc46) %x_5 = tt.addptr %x, %off_4 : tensor<2048x!tt.ptr>, tensor<2048xi32> loc(#loc46) %x_6 = tt.load %x_5, %mask_2, %cst : tensor<2048x!tt.ptr> loc(#loc47) %x_7 = arith.extf %x_6 : tensor<2048xbf16> to tensor<2048xf32> loc(#loc47) %mean_sq = arith.mulf %x_7, %x_7 : tensor<2048xf32> loc(#loc48) %mean_sq_8 = "tt.reduce"(%mean_sq) <{axis = 0 : i32}> ({ ^bb0(%mean_sq_30: f32 loc(callsite(#loc1 at #loc49)), %mean_sq_31: f32 loc(callsite(#loc1 at #loc49))): %mean_sq_32 = arith.addf %mean_sq_30, %mean_sq_31 : f32 loc(#loc67) tt.reduce.return %mean_sq_32 : f32 loc(#loc65) }) : (tensor<2048xf32>) -> f32 loc(#loc65) %mean_sq_9 = arith.sitofp %N : i32 to f32 loc(#loc49) %mean_sq_10 = arith.divf %mean_sq_8, %mean_sq_9 : f32 loc(#loc49) %x_norm = arith.addf %mean_sq_10, %cst_1 : f32 loc(#loc50) %x_norm_11 = math.rsqrt %x_norm : f32 loc(#loc51) %x_norm_12 = tt.splat %x_norm_11 : f32 -> tensor<2048xf32> loc(#loc52) %x_norm_13 = arith.mulf %x_7, %x_norm_12 : tensor<2048xf32> loc(#loc52) %scale1 = tt.splat %Scale1_ptr : !tt.ptr -> tensor<2048x!tt.ptr> loc(#loc53) %scale1_14 = tt.addptr %scale1, %off_4 : tensor<2048x!tt.ptr>, tensor<2048xi32> loc(#loc53) %scale1_15 = tt.load %scale1_14, %mask_2, %cst : tensor<2048x!tt.ptr> loc(#loc54) %scale1_16 = arith.extf %scale1_15 : tensor<2048xbf16> to tensor<2048xf32> loc(#loc54) %shift1 = tt.splat %Shift1_ptr : !tt.ptr -> tensor<2048x!tt.ptr> loc(#loc55) %shift1_17 = tt.addptr %shift1, %off_4 : tensor<2048x!tt.ptr>, tensor<2048xi32> loc(#loc55) %shift1_18 = tt.load %shift1_17, %mask_2, %cst : tensor<2048x!tt.ptr> loc(#loc56) %shift1_19 = arith.extf %shift1_18 : tensor<2048xbf16> to tensor<2048xf32> loc(#loc56) %scale2 = tt.splat %Scale2_ptr : !tt.ptr -> tensor<2048x!tt.ptr> loc(#loc57) %scale2_20 = tt.addptr %scale2, %off_4 : tensor<2048x!tt.ptr>, tensor<2048xi32> loc(#loc57) %scale2_21 = tt.load %scale2_20, %mask_2, %cst : tensor<2048x!tt.ptr> loc(#loc58) %scale2_22 = arith.extf %scale2_21 : tensor<2048xbf16> to tensor<2048xf32> loc(#loc58) %shift2 = tt.splat %Shift2_ptr : !tt.ptr -> tensor<2048x!tt.ptr> loc(#loc59) %shift2_23 = tt.addptr %shift2, %off_4 : tensor<2048x!tt.ptr>, tensor<2048xi32> loc(#loc59) %shift2_24 = tt.load %shift2_23, %mask_2, %cst : tensor<2048x!tt.ptr> loc(#loc60) %shift2_25 = arith.extf %shift2_24 : tensor<2048xbf16> to tensor<2048xf32> loc(#loc60) %out1 = arith.addf %scale1_16, %cst_0 : tensor<2048xf32> loc(#loc61) %out1_26 = arith.mulf %x_norm_13, %out1 : tensor<2048xf32> loc(#loc62) %out1_27 = arith.addf %out1_26, %shift1_19 : tensor<2048xf32> loc(#loc62) %out2 = arith.addf %scale2_22, %cst_0 : tensor<2048xf32> loc(#loc63) %out2_28 = arith.mulf %x_norm_13, %out2 : tensor<2048xf32> loc(#loc64) %out2_29 = arith.addf %out2_28, %shift2_25 : tensor<2048xf32> loc(#loc64) %0 = tt.splat %Out1_ptr : !tt.ptr -> tensor<2048x!tt.ptr> loc(#loc27) %1 = tt.addptr %0, %off_4 : tensor<2048x!tt.ptr>, tensor<2048xi32> loc(#loc27) %2 = arith.truncf %out1_27 : tensor<2048xf32> to tensor<2048xbf16> loc(#loc28) tt.store %1, %2, %mask_2 : tensor<2048x!tt.ptr> loc(#loc29) %3 = tt.splat %Out2_ptr : !tt.ptr -> tensor<2048x!tt.ptr> loc(#loc30) %4 = tt.addptr %3, %off_4 : tensor<2048x!tt.ptr>, tensor<2048xi32> loc(#loc30) %5 = arith.truncf %out2_29 : tensor<2048xf32> to tensor<2048xbf16> loc(#loc31) tt.store %4, %5, %mask_2 : tensor<2048x!tt.ptr> loc(#loc32) tt.return loc(#loc) } loc(#loc) } loc(#loc) #loc2 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1283:15) #loc3 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1284:16) #loc4 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1285:16) #loc5 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1286:15) #loc6 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1288:21) #loc7 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1288:13) #loc8 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1289:26) #loc9 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\python_embeded\\Lib\\site-packages\\triton\\language\\standard.py":293:12) #loc11 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\python_embeded\\Lib\\site-packages\\triton\\language\\standard.py":263:12) #loc12 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1290:36) #loc13 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1290:22) #loc14 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1290:18) #loc15 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1298:26) #loc16 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1298:18) #loc17 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1299:26) #loc18 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1299:18) #loc19 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1300:26) #loc20 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1300:18) #loc21 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1301:26) #loc22 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1301:18) #loc23 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1303:26) #loc24 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1303:16) #loc25 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1304:26) #loc26 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1304:16) #loc27 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1307:22) #loc28 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1307:38) #loc29 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1307:13) #loc30 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1308:22) #loc31 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1308:38) #loc32 = loc("D:\\Comfy\\App\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\comfyui-kjnodes\\nodes\\ltxv_nodes.py":1308:13) #loc42 = loc("row"(#loc2)) #loc43 = loc("cols"(#loc3)) #loc44 = loc("mask"(#loc4)) #loc45 = loc("off"(#loc5)) #loc46 = loc("x"(#loc6)) #loc47 = loc("x"(#loc7)) #loc48 = loc("mean_sq"(#loc8)) #loc50 = loc("x_norm"(#loc12)) #loc51 = loc("x_norm"(#loc13)) #loc52 = loc("x_norm"(#loc14)) #loc53 = loc("scale1"(#loc15)) #loc54 = loc("scale1"(#loc16)) #loc55 = loc("shift1"(#loc17)) #loc56 = loc("shift1"(#loc18)) #loc57 = loc("scale2"(#loc19)) #loc58 = loc("scale2"(#loc20)) #loc59 = loc("shift2"(#loc21)) #loc60 = loc("shift2"(#loc22)) #loc61 = loc("out1"(#loc23)) #loc62 = loc("out1"(#loc24)) #loc63 = loc("out2"(#loc25)) #loc64 = loc("out2"(#loc26)) #loc65 = loc(callsite(#loc9 at #loc49)) #loc67 = loc(callsite(#loc11 at #loc65))