diff --git a/.gitattributes b/.gitattributes index e6588cb8a7702352e263e53f08ed473978d72a80..751f445dc6f2de00d1eabd0deab4047138312a2f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -40,3 +40,32 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text .deepgemm_cache/cache/kernel.sm100_fp8_fp4_gemm_1d1d.90eae1ab237a693a257487aad7842565/kernel.cubin filter=lfs diff=lfs merge=lfs -text .deepgemm_cache/cache/kernel.sm100_fp8_fp4_gemm_1d1d.af12de49d08ff397b1c7554f220e6597/kernel.cubin filter=lfs diff=lfs merge=lfs -text .deepgemm_cache/cache/kernel.sm100_fp8_fp4_gemm_1d1d.c6fd39548efd6fe8a937748812a3e10a/kernel.cubin filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/27/f27o6rx7rg342hrpfcctpozlvg2354yl763qkw33npuhcekxnxvx/pflgmkza6wuxeoggbjr4xfhju3ibc55p5gnpis43uorvrxtlrmh filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/2e/f2e72cs2himbdjdco76jkk3trv55ibzgjmoifvwu7tb34ktssjhh/6gullbj7edgkiktugt2he7mesfwclsy5raw6dglloko3uspiqy2 filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/2p/f2pf3j65kzed74uq5lvpxpfplizuyv6x52wv7qv64wwtincssr3s/t34zgqbous3g4lrapvk3wbanvlmlwpbtm2hi2dmngublqtvxisf filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/2u/f2uhif635vilodxlv35gpth7llbzckhikr3iwsrbg55jpg774kzz/ihyw5jfjjhba4ez3o7v6smsujpqvqkgeqlrf4lfn46hf7ja7goz filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/4c/f4crukekl2q4oj6klh4aefch64yefn72dasfszf24dnjhppejj3l/dw4ib5mfqhplqjzabsma6owfjrcpkyospwgpcet77ljmildo6dg filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/4j/f4jybcn634vohda6titi7rjezc327bgwoltofglm762dzwamzdrk/l4pbixckj6ctoue2a75adlb7u5glqh7bdxwvprzgnzimlpkw6dg filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/4j/f4jz56k7lt5fzkjimb76e2yeurm2tos3ipwhwughnwcua37of4yz/t6bcknkpglo54urosygfl4fkfwoyt4zwq47inpzgybrkszraiii filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/4v/f4v3fpddde5fxc5onden54afaldv44pfinjr3zwpoqshn4dcjdq7/5ekiicitorrjyxvyojy6sabvh7hdecyuayupme4guanzafuebbe filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/4v/f4voaijtwe4rxxqyzibi75obtxemydk6jkevx54gwvuanxfiao2l/nhhp6x3jondquscd7cuzoq52aovdeujbkzmwzudwcxdcw2bgnce filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/5k/f5k5zeqlmtxtd4jwnntyatfxjshxbmsjzmu3ev43krpb2tgi56g5/lu6n3wpw55jalcyxkmnrei6gm7svqf6z6rs2wzbgry2d3tcvvf2 filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/5q/f5qookrxhpxcnygkcsudllc6lzphv7z2bong6ortsxfsitfszgwx/5bn4r3hiosjxui5ozhesnrhxcxfggbs53wqwrwvwvi4iytnnfkf filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/5u/f5udb3yqw6ucuuxytagy7rrjgdadcka26nxm62ljjtnnpde2vnl3/teu2agn5grj5aehuwrr5y4a6g7ha3zuysju7trztwmlpkxzwjye filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/6p/f6psuxovydhqk4xi3b22ojx42wojnf33fwf5drilv6vzbncv7fri/54jtv5thlxj7f4r5473jbalyqcp7h6p7tcyyxxv4rv3k7zpqkjv filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/6u/f6u25xqfyhztf263nqz5vado2ex7gvnlxfuqm66cfnt4z6ieimlp/dywxqfdb2gqp55mpbuvh5pr6qahukheadkm2llelsdohyznoogf filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/7o/f7opkp5cvt3j6ikw2fyouf64oba4fezzcj4r6zk7n4yv6p3m72eu/emfqppmxr4n7c5tbctsig2ga7hn6nclrazq4a3ka5u56bwx734m filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/7t/f7tn2io7ayr7x5tu2gjd3vmrvbyenydz6oc52mxp4hofypxpeee6/qn6klb62v3wxkb4ouqb4najn2hjll3anozmroescfej6utvv4hz filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/a5/fa5wwiv5umznfk2rud2x76gcfkmgriafshohdcyfg7xpldpsluld/v7f4ds3qd7op7qywdbxdzjnnuavkrj5xkrt2vcdpkghya6457ou filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/ag/fagpnbyz6qsj4o4rhzhe2ac2k7hdme2u6dnzzdnwj4w5uolubxql/7nfpyb4zwi4r6z5v2h6muyg7w3fjecn4fagrz3vdgnxwjgj7375 filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/b4/fb4zezob3jxdhc73kfbgtguwug3mmje7nxolr36iz7kx46apw7df/lgvuv2uwxfvnlq3ohnze2firqcj33fihxg7dj6q76qvrx6hkkeu filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/bc/fbc56yg6xd66zhguh2xlywojvovffbq2n7j4hmtuxzzwlbzzbzvk/n2hm7wnehwvy7dcevenu3tyodtyptvj4ky7pheh4nzks3v63ywg filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/bt/fbtavbf4pvujmngczgl6753sfx5lk4upod7lztkf6xn5mfo5ui2i/c3vic4qhyhwi6meuzp6tzqxgmtff45qcyke7ncdavm43jdyfrpi filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/cs/fcsbsthsjevo3pq4hhgfznr43x43vci6svn52fswfmthwp7ceays/f7b6sqkvl6h7rbkrddgbhh2h4amnkd3pjfzcncyozean6m6fnvp filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/d2/fd2odm7ueokhvpawrjqys35tbv2nw6o5yo7bznkfoynzjw77u6o3/ev6rhyy2or2qh5hkq5nfptoibvr454zmvb4fnqxaz742cpovcxw filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/d5/fd5i3x6ajyufaljzozolyk2vvlw5ifeocxk567pxqsldwnkgbzac/cvftq2lyjskfpmqggmfh7rw7wjkiwcodueaxdz7xptb2e5qr4oq filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/db/fdbh2b7mmtbe7t2e3d5aelbwyuq46auimsmou63qd33zl72bvhhz/f4tskhvu6digwxpchylk7r7y74dcom4aww3je6gegxyxlajenek filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/di/fdiqmibwfdhcuuhs6ayweylnfwssarjftn3lqpexzhq2logikdnw/relotiy2jcf55dx27zynszkp5mmgz7enr6yhp24yr7rby3wknnb filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/dm/fdm2vzq6owyuyrvgtsaes3bqjsea7j5opkbrjzp5yvk5eaaie5pl/juvux776sz7j5tpilt2sb75ihyp7tky5qivngzbufmm3tjuqpba filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/do/fdoxsfn5zevmxnouexpdozewmmuesmji2gxbdbzj55iu2kzfirwm/hvjmffewl5g3xzs2qjxlyiinbyyddnb4vdrxjeuae74vp4m2wn6 filter=lfs diff=lfs merge=lfs -text +.inductor_cache/fxgraph/e4/fe45sfef754ayge22g3uuqjzhgodjdocya5lpr2tx6l7i4vkqwit/6ry3bcpdcxz45iibyaetr3ddq2vx2x6ubevfyovvrvlttmmlivr filter=lfs diff=lfs merge=lfs -text diff --git a/.inductor_cache/25/c25l73lomz5i5p2tjttjp4w3njz7barnpiaq2fsgnq3jaafgxdsu.py b/.inductor_cache/25/c25l73lomz5i5p2tjttjp4w3njz7barnpiaq2fsgnq3jaafgxdsu.py new file mode 100644 index 0000000000000000000000000000000000000000..3d2b3fdd66fd76ae5c140be402c6c9daf168c82f --- /dev/null +++ b/.inductor_cache/25/c25l73lomz5i5p2tjttjp4w3njz7barnpiaq2fsgnq3jaafgxdsu.py @@ -0,0 +1,29 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 4096}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) diff --git a/.inductor_cache/25/ee4f2760622c1bc46e4963f5f90e772637bf02dfce9d2c784a23b91a485e6046.best_config b/.inductor_cache/25/ee4f2760622c1bc46e4963f5f90e772637bf02dfce9d2c784a23b91a485e6046.best_config new file mode 100644 index 0000000000000000000000000000000000000000..8ea323f748a9d5acd6377c1908e47a4a24aa3ada --- /dev/null +++ b/.inductor_cache/25/ee4f2760622c1bc46e4963f5f90e772637bf02dfce9d2c784a23b91a485e6046.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 21, "triton_cache_hash": "YG74CS4JHDXVAWUXP7QZ23NAXRAHIYIZ5FUJMRPVXQLZO4XINHZA"} \ No newline at end of file diff --git a/.inductor_cache/2b/c2br4a6gmsccqokjlyz2ntpodyioqvw3ssadyruqv4t5q2h4zfkq.py b/.inductor_cache/2b/c2br4a6gmsccqokjlyz2ntpodyioqvw3ssadyruqv4t5q2h4zfkq.py new file mode 100644 index 0000000000000000000000000000000000000000..78fe9a250829cfba1b204aa9fc6b42cf9b1e7eb8 --- /dev/null +++ b/.inductor_cache/2b/c2br4a6gmsccqokjlyz2ntpodyioqvw3ssadyruqv4t5q2h4zfkq.py @@ -0,0 +1,291 @@ +# AOT ID: ['7_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/xb/cxbfao4txftywezeygrrwtapgjmjuaow6yckdgujtj3ln7ukpbdn.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, 1][1, 1]cuda:0" = PlaceHolder[target=arg2_1] +# %arg4_1 : Tensor "f32[s0, 1][1, 1]cuda:0" = PlaceHolder[target=arg4_1] +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:0" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg4_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:0"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/jk/cjk2l5do5kfebmlafwv2ddtivblyn54wzypw3yv4cn4tgq7w7p46.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg5_1 : Tensor "i64[s0, 1][1, 1]cuda:0" = PlaceHolder[target=arg5_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg5_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/xb/cxbqyqxwwyvdsshstrz3zl343674btixfm5kbidvymejf6qmdoaf.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg7_1 : Tensor "bf16[s0, s87][s87, 1]cuda:0" = PlaceHolder[target=arg7_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s0][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg3_1]), kwargs = {}) +# %div : Tensor "i64[s0][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s0][1]cuda:0"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg3_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s0][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg3_1]), kwargs = {}) +# %add_47 : Tensor "i64[s0][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s0, s87][s87, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg7_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/f5/cf5tdjh7czx76ocdvaqqmpbpt24xihjxufk72ezsjzb26rz66qx3.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s0, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg8_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1 = args + args.clear() + s53 = arg0_1 + s68 = arg1_1 + s0 = arg3_1 + s87 = arg6_1 + s77 = arg8_1 + assert_size_stride(arg2_1, (s0, 1), (1, 1)) + assert_size_stride(arg4_1, (s0, 1), (1, 1)) + assert_size_stride(arg5_1, (s0, 1), (1, 1)) + assert_size_stride(arg7_1, (s0, s87), (s87, 1)) + with torch.cuda._DeviceGuard(0): + torch.cuda.set_device(0) + buf0 = empty_strided_cuda((s0, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s0, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream0 = get_raw_stream(0) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg4_1, buf0, buf1, s0, stream=stream0) + del arg2_1 + del arg4_1 + buf2 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream0 = get_raw_stream(0) + triton_poi_fused_gather_max_view_1.run(arg5_1, buf2, s0, stream=stream0) + buf3 = empty_strided_cuda((s0, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s0*s87 + stream0 = get_raw_stream(0) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg7_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream0) + del arg7_1 + buf4 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream0 = get_raw_stream(0) + triton_poi_fused_add_max_view_3.run(buf4, s77, s0, stream=stream0) + return (reinterpret_tensor(buf2, (s0, ), (1, ), 0), buf3, buf1, buf0, arg5_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 8 + arg2_1 = rand_strided((8, 1), (1, 1), device='cuda:0', dtype=torch.float32) + arg3_1 = 8 + arg4_1 = rand_strided((8, 1), (1, 1), device='cuda:0', dtype=torch.float32) + arg5_1 = rand_strided((8, 1), (1, 1), device='cuda:0', dtype=torch.int64) + arg6_1 = 6144 + arg7_1 = rand_strided((8, 6144), (6144, 1), device='cuda:0', dtype=torch.bfloat16) + arg8_1 = 2 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/2k/0db56ce0255d17e714d6bfefd0830f67b79f31c3cd47fef86e1215e4af155123.best_config b/.inductor_cache/2k/0db56ce0255d17e714d6bfefd0830f67b79f31c3cd47fef86e1215e4af155123.best_config new file mode 100644 index 0000000000000000000000000000000000000000..4f1fcec624fea882aa6424a4be7da1d23bd7115f --- /dev/null +++ b/.inductor_cache/2k/0db56ce0255d17e714d6bfefd0830f67b79f31c3cd47fef86e1215e4af155123.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 21, "triton_cache_hash": "5FUAZKDVQOXOEQJ4ZSRVOWBR6F6PBWI7HIJDQ3SM267VH2IXPT5A"} \ No newline at end of file diff --git a/.inductor_cache/2k/c2kidoyobarbdwts46exm2wpdobdyvsxybtugfjxnxbjmacldvms.py b/.inductor_cache/2k/c2kidoyobarbdwts46exm2wpdobdyvsxybtugfjxnxbjmacldvms.py new file mode 100644 index 0000000000000000000000000000000000000000..9257e72f9e3ac9b5bf4a64441eb78842753724ed --- /dev/null +++ b/.inductor_cache/2k/c2kidoyobarbdwts46exm2wpdobdyvsxybtugfjxnxbjmacldvms.py @@ -0,0 +1,29 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 4096}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) diff --git a/.inductor_cache/2u/c2ushp4u2x3uzdiuj2hcvldtsjtcukrffzblul73u3eczxkoqeiw.py b/.inductor_cache/2u/c2ushp4u2x3uzdiuj2hcvldtsjtcukrffzblul73u3eczxkoqeiw.py new file mode 100644 index 0000000000000000000000000000000000000000..8b68e36e826026abfe93b52af0f9ee95edb37e16 --- /dev/null +++ b/.inductor_cache/2u/c2ushp4u2x3uzdiuj2hcvldtsjtcukrffzblul73u3eczxkoqeiw.py @@ -0,0 +1,293 @@ +# AOT ID: ['13_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/in/cinym3hv7fv6jpjbbmmapeljldm7umzd5htvihr3dlt7qh5h5e5p.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, 1][1, 1]cuda:2" = PlaceHolder[target=arg2_1] +# %arg4_1 : Tensor "f32[s0, 1][1, 1]cuda:2" = PlaceHolder[target=arg4_1] +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:2" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg4_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:2"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/ew/cewhk2e3t5msoqsn3m7nynvzesfjqgc746bztsvg7puyhydc7sr4.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg6_1 : Tensor "i64[s37, 1][1, 1]cuda:2" = PlaceHolder[target=arg6_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg6_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/65/c65lswedy4nxnsl65ku4a6ddu3r55grrzzjaxx6jvoroewo6e2dr.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg8_1 : Tensor "bf16[s0, s87][s87, 1]cuda:2" = PlaceHolder[target=arg8_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s0][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg3_1]), kwargs = {}) +# %div : Tensor "i64[s0][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s0][1]cuda:2"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg3_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:2, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s0][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg3_1]), kwargs = {}) +# %add_47 : Tensor "i64[s0][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s0, s87][s87, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg8_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 16384}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 73728}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/y5/cy5huhsgetyuqpiq72l6lba4jexcwsdpngrz2iwahbpopxclyk44.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s0, 1][1, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg9_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 8}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1 = args + args.clear() + s53 = arg0_1 + s68 = arg1_1 + s0 = arg3_1 + s37 = arg5_1 + s87 = arg7_1 + s77 = arg9_1 + assert_size_stride(arg2_1, (s0, 1), (1, 1)) + assert_size_stride(arg4_1, (s0, 1), (1, 1)) + assert_size_stride(arg6_1, (s37, 1), (1, 1)) + assert_size_stride(arg8_1, (s0, s87), (s87, 1)) + with torch.cuda._DeviceGuard(2): + torch.cuda.set_device(2) + buf0 = empty_strided_cuda((s0, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s0, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream2 = get_raw_stream(2) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg4_1, buf0, buf1, s0, stream=stream2) + del arg2_1 + del arg4_1 + buf2 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream2 = get_raw_stream(2) + triton_poi_fused_gather_max_view_1.run(arg6_1, buf2, s0, stream=stream2) + buf3 = empty_strided_cuda((s0, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s0*s87 + stream2 = get_raw_stream(2) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg8_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream2) + del arg8_1 + buf4 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream2 = get_raw_stream(2) + triton_poi_fused_add_max_view_3.run(buf4, s77, s0, stream=stream2) + return (reinterpret_tensor(buf2, (s0, ), (1, ), 0), buf3, buf1, buf0, arg6_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 2 + arg2_1 = rand_strided((2, 1), (1, 1), device='cuda:2', dtype=torch.float32) + arg3_1 = 2 + arg4_1 = rand_strided((2, 1), (1, 1), device='cuda:2', dtype=torch.float32) + arg5_1 = 2 + arg6_1 = rand_strided((2, 1), (1, 1), device='cuda:2', dtype=torch.int64) + arg7_1 = 6144 + arg8_1 = rand_strided((2, 6144), (6144, 1), device='cuda:2', dtype=torch.bfloat16) + arg9_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/3e/c3exb3qmzq5ev7yyxp6jzpk55mrxicwt5fjnjg72h4blbjqteq3b.py b/.inductor_cache/3e/c3exb3qmzq5ev7yyxp6jzpk55mrxicwt5fjnjg72h4blbjqteq3b.py new file mode 100644 index 0000000000000000000000000000000000000000..59ef379217a8b0793affca0d42c74b27f0c46564 --- /dev/null +++ b/.inductor_cache/3e/c3exb3qmzq5ev7yyxp6jzpk55mrxicwt5fjnjg72h4blbjqteq3b.py @@ -0,0 +1,25 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp1, None) diff --git a/.inductor_cache/3h/c3hjatdysmtczt36qylu5u476tmnxdvxgytr7m6z4na54xrxxoss.py b/.inductor_cache/3h/c3hjatdysmtczt36qylu5u476tmnxdvxgytr7m6z4na54xrxxoss.py new file mode 100644 index 0000000000000000000000000000000000000000..253b645277e8fbbb16413fb860b661f55393c813 --- /dev/null +++ b/.inductor_cache/3h/c3hjatdysmtczt36qylu5u476tmnxdvxgytr7m6z4na54xrxxoss.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/3h/c3hzz247khkgmf7sy4wb5vbaz4z24jsfnh2gf3spavzjd7bow5gg.py b/.inductor_cache/3h/c3hzz247khkgmf7sy4wb5vbaz4z24jsfnh2gf3spavzjd7bow5gg.py new file mode 100644 index 0000000000000000000000000000000000000000..59a16c39f750884145fdf528832c022a8c5563a3 --- /dev/null +++ b/.inductor_cache/3h/c3hzz247khkgmf7sy4wb5vbaz4z24jsfnh2gf3spavzjd7bow5gg.py @@ -0,0 +1,27 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 384}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 32 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) diff --git a/.inductor_cache/3r/c3rryctepqjzosdqqttq5mb7kr5klk4hfq7vyabrmirmlhcabwmo.py b/.inductor_cache/3r/c3rryctepqjzosdqqttq5mb7kr5klk4hfq7vyabrmirmlhcabwmo.py new file mode 100644 index 0000000000000000000000000000000000000000..781b787445d859dc7ba7b2386c428b298da2064f --- /dev/null +++ b/.inductor_cache/3r/c3rryctepqjzosdqqttq5mb7kr5klk4hfq7vyabrmirmlhcabwmo.py @@ -0,0 +1,137 @@ +# AOT ID: ['10_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/r6/cr6a7je7lgurvwxlurfkudvnwwl26htjtvwwjxnv75jffqdxvgwj.py +# Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] +# Source node to ATen node mapping: +# mul => mul_2 +# unsqueeze => unsqueeze +# Graph fragment: +# %arg1_1 : Tensor "f32[1, s3][s3, 1]cuda:5" = PlaceHolder[target=arg1_1] +# %arg2_1 : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:5" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg3_1] +# %unsqueeze : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg1_1, -1), kwargs = {}) +# %mul_2 : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg2_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg3_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_2, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 512}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1 = args + args.clear() + s3 = arg0_1 + assert_size_stride(arg1_1, (1, s3), (s3, 1)) + assert_size_stride(arg2_1, (1, s3, 1), (s3, 1, 1)) + assert_size_stride(arg3_1, (), ()) + with torch.cuda._DeviceGuard(5): + torch.cuda.set_device(5) + buf0 = empty_strided_cuda((1, s3, 1), (s3, 1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] + stream5 = get_raw_stream(5) + triton_poi_fused_mul_unsqueeze_0.run(arg1_1, arg2_1, arg3_1.item(), buf0, s3, stream=stream5) + del arg1_1 + del arg2_1 + del arg3_1 + return (buf0, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 32 + arg1_1 = rand_strided((1, 32), (32, 1), device='cuda:5', dtype=torch.float32) + arg2_1 = rand_strided((1, 32, 1), (32, 1, 1), device='cuda:5', dtype=torch.float32) + arg3_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/3s/c3skh52gob24udbqevuvymapfeanznl6g6yugtw6fyk24ox5ioyb.py b/.inductor_cache/3s/c3skh52gob24udbqevuvymapfeanznl6g6yugtw6fyk24ox5ioyb.py new file mode 100644 index 0000000000000000000000000000000000000000..eed9766a8fecd8bc5aafd9a4bb2b3d5165670db0 --- /dev/null +++ b/.inductor_cache/3s/c3skh52gob24udbqevuvymapfeanznl6g6yugtw6fyk24ox5ioyb.py @@ -0,0 +1,142 @@ +# AOT ID: ['5_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/xd/cxd3xbystwp4gocdmghs5wj2gqmc5bgvjwrd3qc6rcbnrrgpjvtn.py +# Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] +# Source node to ATen node mapping: +# mul => mul_2 +# unsqueeze => unsqueeze +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, s3][s3, 1]cuda:6" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:6" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %unsqueeze : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, -1), kwargs = {}) +# %mul_2 : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_2, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 4096}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s7 = arg0_1 + s3 = arg1_1 + arg2_1_size = arg2_1.size() + s0 = arg2_1_size[0] + assert_size_stride(arg2_1, (s0, s3), (s3, 1)) + assert_size_stride(arg3_1, (s0, s3, 1), (s3, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(6): + torch.cuda.set_device(6) + buf0 = empty_strided_cuda((s0, s3, 1), (s3, 1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] + triton_poi_fused_mul_unsqueeze_0_xnumel = s0*s3 + stream6 = get_raw_stream(6) + triton_poi_fused_mul_unsqueeze_0.run(arg2_1, arg3_1, arg4_1.item(), buf0, triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream6) + del arg2_1 + del arg3_1 + del arg4_1 + return (buf0, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 8 + arg1_1 = 32 + arg2_1 = rand_strided((8, 32), (32, 1), device='cuda:6', dtype=torch.float32) + arg3_1 = rand_strided((8, 32, 1), (32, 1, 1), device='cuda:6', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/3u/c3u6bcbbftmiqp5kte3h55vd5gqx7jl3zql7a2czxn52qwb3z3xt.py b/.inductor_cache/3u/c3u6bcbbftmiqp5kte3h55vd5gqx7jl3zql7a2czxn52qwb3z3xt.py new file mode 100644 index 0000000000000000000000000000000000000000..35fb219035f48269a2c612593e36751ddc39400c --- /dev/null +++ b/.inductor_cache/3u/c3u6bcbbftmiqp5kte3h55vd5gqx7jl3zql7a2czxn52qwb3z3xt.py @@ -0,0 +1,289 @@ +# AOT ID: ['11_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/vx/cvx3kcgx73mdufoqquzcxowf7ugclz7xreckm42p6weslmelfw3l.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_1 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg1_1 : Tensor "f32[1, 1][1, 1]cuda:4" = PlaceHolder[target=arg1_1] +# %arg2_1 : Tensor "f32[1, 1][1, 1]cuda:4" = PlaceHolder[target=arg2_1] +# %mul_1 : Tensor "f32[1, 1, 1][1, 1, 1]cuda:4" = PlaceHolder[target=mul_1] +# %unsqueeze : Tensor "f32[1, 1, 1][1, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg1_1, 2), kwargs = {}) +# %view : Tensor "f32[1, 1, 1][1, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg2_1, [-1, 1, 1]), kwargs = {}) +# %mul_1 : Tensor "f32[1, 1, 1][1, 1, 1]cuda:4"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_1,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = tl.load(in_ptr1 + (0)) + tmp3 = tl.broadcast_to(tmp2, [XBLOCK]) + tmp4 = tmp1 * tmp3 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp4, None) + tl.store(out_ptr1 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp4, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/gp/cgpokyocc7tdinfnb6opabr746t6knz5cgybj5fxyufsucoeojra.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg3_1 : Tensor "i64[1, 1][1, 1]cuda:4" = PlaceHolder[target=arg3_1] +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg3_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp1, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/sl/csl35uebvdbczppjgntgmnutdjrljqewnfhmnvz33m6unz7vdiu7.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add +# Graph fragment: +# %arg5_1 : Tensor "bf16[1, s87][s87, 1]cuda:4" = PlaceHolder[target=arg5_1] +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [1]), kwargs = {}) +# %div : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:4, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [1]), kwargs = {}) +# %add : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[1, s87][s87, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg5_1, [%add]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8192}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 36864}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask).to(tl.float32) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/dn/cdnvk7ketvhjg6i2ggdy5oiyemirjdox3326cagxkaqlxhmh5lpp.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_3 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_3 : Tensor "i64[1, 1][1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg6_1), kwargs = {}) +# return %add_3 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = ks0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32)), tmp0, None) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1 = args + args.clear() + s53 = arg0_1 + s87 = arg4_1 + s77 = arg6_1 + assert_size_stride(arg1_1, (1, 1), (1, 1)) + assert_size_stride(arg2_1, (1, 1), (1, 1)) + assert_size_stride(arg3_1, (1, 1), (1, 1)) + assert_size_stride(arg5_1, (1, s87), (s87, 1)) + with torch.cuda._DeviceGuard(4): + torch.cuda.set_device(4) + buf0 = empty_strided_cuda((1, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((1, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream4 = get_raw_stream(4) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg1_1, arg2_1, buf0, buf1, 1, stream=stream4) + del arg1_1 + del arg2_1 + buf2 = empty_strided_cuda((1, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream4 = get_raw_stream(4) + triton_poi_fused_gather_max_view_1.run(arg3_1, buf2, 1, stream=stream4) + buf3 = empty_strided_cuda((1, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + stream4 = get_raw_stream(4) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg5_1, buf3, s87, stream=stream4) + del arg5_1 + buf4 = empty_strided_cuda((1, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream4 = get_raw_stream(4) + triton_poi_fused_add_max_view_3.run(buf4, s77, 1, stream=stream4) + return (reinterpret_tensor(buf2, (1, ), (1, ), 0), buf3, buf1, buf0, arg3_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = rand_strided((1, 1), (1, 1), device='cuda:4', dtype=torch.float32) + arg2_1 = rand_strided((1, 1), (1, 1), device='cuda:4', dtype=torch.float32) + arg3_1 = rand_strided((1, 1), (1, 1), device='cuda:4', dtype=torch.int64) + arg4_1 = 6144 + arg5_1 = rand_strided((1, 6144), (6144, 1), device='cuda:4', dtype=torch.bfloat16) + arg6_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/3z/c3ztg2btpqdyc3uz4dzswnkglhrmeaszpogpdu23omfz4c6u7zko.py b/.inductor_cache/3z/c3ztg2btpqdyc3uz4dzswnkglhrmeaszpogpdu23omfz4c6u7zko.py new file mode 100644 index 0000000000000000000000000000000000000000..01b18ec942c7ee8acfe2580dd7528e8a90a3b83a --- /dev/null +++ b/.inductor_cache/3z/c3ztg2btpqdyc3uz4dzswnkglhrmeaszpogpdu23omfz4c6u7zko.py @@ -0,0 +1,27 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 384}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 32 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) diff --git a/.inductor_cache/46/9ddaabf0d63fddb6e484df5802c5ab86ddbc3d9b84c46c643b006cc0acf7b995.best_config b/.inductor_cache/46/9ddaabf0d63fddb6e484df5802c5ab86ddbc3d9b84c46c643b006cc0acf7b995.best_config new file mode 100644 index 0000000000000000000000000000000000000000..04c4e250a100aa63c0ff746d4101e0a131c6c012 --- /dev/null +++ b/.inductor_cache/46/9ddaabf0d63fddb6e484df5802c5ab86ddbc3d9b84c46c643b006cc0acf7b995.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 23, "triton_cache_hash": "GIDCKWLVJJFYH72JFJCG4FFIN3BV7CWCQPTZRHJERXHCZJAW4VIA"} \ No newline at end of file diff --git a/.inductor_cache/46/c46gch5kg22oprcsfx3k73s77cdoj5zwmm4trujfwwc4zc7cs72z.py b/.inductor_cache/46/c46gch5kg22oprcsfx3k73s77cdoj5zwmm4trujfwwc4zc7cs72z.py new file mode 100644 index 0000000000000000000000000000000000000000..f482e1df1a03553ddde20822d803206b3f3ef50d --- /dev/null +++ b/.inductor_cache/46/c46gch5kg22oprcsfx3k73s77cdoj5zwmm4trujfwwc4zc7cs72z.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8192}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 36864}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask).to(tl.float32) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/47/c47i4hdzezcx3xndn3biber6sa6rznklzeek5cbpexpomknwaqjt.py b/.inductor_cache/47/c47i4hdzezcx3xndn3biber6sa6rznklzeek5cbpexpomknwaqjt.py new file mode 100644 index 0000000000000000000000000000000000000000..73291c163740bf21dca60be27f24f65160190b07 --- /dev/null +++ b/.inductor_cache/47/c47i4hdzezcx3xndn3biber6sa6rznklzeek5cbpexpomknwaqjt.py @@ -0,0 +1,177 @@ +# AOT ID: ['0_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/jr/cjrkeuk4xjhx774cklsib5ivf4nd32eudc4tub7gpkw5nbrgpf7w.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub, aten.bitwise_not] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# input_ => mul_6 +# invert => bitwise_not +# lt => lt +# lt_1 => lt_1 +# mul => mul +# mul_1 => mul_2 +# org_vocab_mask => bitwise_and +# sub_3 => sub_13 +# valid_offset => add_16 +# vocab_mask => bitwise_or +# Graph fragment: +# %arg1_1 : Tensor "i64[s15][1]cuda:7" = PlaceHolder[target=arg1_1] +# %ge : Tensor "b8[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg1_1, %arg2_1), kwargs = {}) +# %lt : Tensor "b8[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg1_1, %arg3_1), kwargs = {}) +# %bitwise_and : Tensor "b8[s15][1]cuda:7"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg1_1, %arg4_1), kwargs = {}) +# %lt_1 : Tensor "b8[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg1_1, %arg5_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[s15][1]cuda:7"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[s15][1]cuda:7"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %mul : Tensor "i64[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and, %arg2_1), kwargs = {}) +# %mul_2 : Tensor "i64[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and_1, %sub_8), kwargs = {}) +# %add_16 : Tensor "i64[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_2), kwargs = {}) +# %sub_13 : Tensor "i64[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg1_1, %add_16), kwargs = {}) +# %mul_6 : Tensor "i64[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_or, %sub_13), kwargs = {}) +# %bitwise_not : Tensor "b8[s15][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.bitwise_not.default](args = (%bitwise_or,), kwargs = {}) +# return %mul_6,%bitwise_not +triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0 = async_compile.triton('triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1 = args + args.clear() + s15 = arg0_1 + s90 = arg2_1 + s87 = arg3_1 + s68 = arg4_1 + s53 = arg5_1 + s88 = arg6_1 + assert_size_stride(arg1_1, (s15, ), (1, )) + with torch.cuda._DeviceGuard(7): + torch.cuda.set_device(7) + buf0 = empty_strided_cuda((s15, ), (1, ), torch.int64) + buf1 = empty_strided_cuda((s15, ), (1, ), torch.bool) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub, aten.bitwise_not] + stream7 = get_raw_stream(7) + triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0.run(arg1_1, buf0, buf1, s90, s87, s68, s53, s88, s15, stream=stream7) + del arg1_1 + return (buf0, buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 112 + arg1_1 = rand_strided((112, ), (1, ), device='cuda:7', dtype=torch.int64) + arg2_1 = 135520 + arg3_1 = 154880 + arg4_1 = 154880 + arg5_1 = 154880 + arg6_1 = 0 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/4b/c4bzcwru43j45mp2ej3abi6jtvpi4pqeiwedj4gy3vcydr2jkwun.py b/.inductor_cache/4b/c4bzcwru43j45mp2ej3abi6jtvpi4pqeiwedj4gy3vcydr2jkwun.py new file mode 100644 index 0000000000000000000000000000000000000000..00cb17d5d49f859603fb1fdcac7a6538d54cae04 --- /dev/null +++ b/.inductor_cache/4b/c4bzcwru43j45mp2ej3abi6jtvpi4pqeiwedj4gy3vcydr2jkwun.py @@ -0,0 +1,289 @@ +# AOT ID: ['6_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/pq/cpqfafvbzdc4yv5hpjbitcl5zsctcve7hn6ahg66aj4blq3vprf6.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s97, 1][1, 1]cuda:5" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f32[s97, 1][1, 1]cuda:5" = PlaceHolder[target=arg3_1] +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:5" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg3_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:5"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/zb/czbs2fm46j6qhtd2znnofgeavkuhyl72vdcahggz7dhvxp5zvnma.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg4_1 : Tensor "i64[s97, 1][1, 1]cuda:5" = PlaceHolder[target=arg4_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg4_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/zm/czmqgy6soqztyipifu6p2jfwi4je2rv5dgpxsqvvy3vdykavyemd.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg6_1 : Tensor "bf16[s97, s87][s87, 1]cuda:5" = PlaceHolder[target=arg6_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s97][1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg1_1]), kwargs = {}) +# %div : Tensor "i64[s97][1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s97][1]cuda:5"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg1_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:5, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s97][1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg1_1]), kwargs = {}) +# %add_47 : Tensor "i64[s97][1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s97, s87][s87, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg6_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/mz/cmzyybpwh6qmtcq7gwcqgwbieukiskiqslaso7ig7lcotivioxzy.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s97, 1][1, 1]cuda:5"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg7_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1 = args + args.clear() + s53 = arg0_1 + s97 = arg1_1 + s87 = arg5_1 + s77 = arg7_1 + assert_size_stride(arg2_1, (s97, 1), (1, 1)) + assert_size_stride(arg3_1, (s97, 1), (1, 1)) + assert_size_stride(arg4_1, (s97, 1), (1, 1)) + assert_size_stride(arg6_1, (s97, s87), (s87, 1)) + with torch.cuda._DeviceGuard(5): + torch.cuda.set_device(5) + buf0 = empty_strided_cuda((s97, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s97, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream5 = get_raw_stream(5) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg3_1, buf0, buf1, s97, stream=stream5) + del arg2_1 + del arg3_1 + buf2 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream5 = get_raw_stream(5) + triton_poi_fused_gather_max_view_1.run(arg4_1, buf2, s97, stream=stream5) + buf3 = empty_strided_cuda((s97, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s87*s97 + stream5 = get_raw_stream(5) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg6_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream5) + del arg6_1 + buf4 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream5 = get_raw_stream(5) + triton_poi_fused_add_max_view_3.run(buf4, s77, s97, stream=stream5) + return (reinterpret_tensor(buf2, (s97, ), (1, ), 0), buf3, buf1, buf0, arg4_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 8 + arg2_1 = rand_strided((8, 1), (1, 1), device='cuda:5', dtype=torch.float32) + arg3_1 = rand_strided((8, 1), (1, 1), device='cuda:5', dtype=torch.float32) + arg4_1 = rand_strided((8, 1), (1, 1), device='cuda:5', dtype=torch.int64) + arg5_1 = 6144 + arg6_1 = rand_strided((8, 6144), (6144, 1), device='cuda:5', dtype=torch.bfloat16) + arg7_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/4b/c4bzoixvavbv7tbgxpx5sajtax6yl6d6wky5k272ff4wk64t7jd7.py b/.inductor_cache/4b/c4bzoixvavbv7tbgxpx5sajtax6yl6d6wky5k272ff4wk64t7jd7.py new file mode 100644 index 0000000000000000000000000000000000000000..4a6b7d1763736a165f5ab143e8c2adb0049c829f --- /dev/null +++ b/.inductor_cache/4b/c4bzoixvavbv7tbgxpx5sajtax6yl6d6wky5k272ff4wk64t7jd7.py @@ -0,0 +1,25 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp1, None) diff --git a/.inductor_cache/4i/c4iwhfgin6ac7qvqb6fj5msgdftp5qsxjv6sjxyuqbryq4qqwzfg.py b/.inductor_cache/4i/c4iwhfgin6ac7qvqb6fj5msgdftp5qsxjv6sjxyuqbryq4qqwzfg.py new file mode 100644 index 0000000000000000000000000000000000000000..44179d436ab8b8bf9d45d875083c6b8da9a0b291 --- /dev/null +++ b/.inductor_cache/4i/c4iwhfgin6ac7qvqb6fj5msgdftp5qsxjv6sjxyuqbryq4qqwzfg.py @@ -0,0 +1,37 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) diff --git a/.inductor_cache/4l/c4ljp5q37q7ktbyo35672uzle4llt4iwt4be37ikkwlit6j7fnco.py b/.inductor_cache/4l/c4ljp5q37q7ktbyo35672uzle4llt4iwt4be37ikkwlit6j7fnco.py new file mode 100644 index 0000000000000000000000000000000000000000..68b036bd0dcfbe99a30f83a125ddebb5183d3761 --- /dev/null +++ b/.inductor_cache/4l/c4ljp5q37q7ktbyo35672uzle4llt4iwt4be37ikkwlit6j7fnco.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2048}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 28672}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/4l/dccab99d67a1299427a9211bfd01fd3c77aaa44ad59d9ffa12a6d00f48a13c0e.best_config b/.inductor_cache/4l/dccab99d67a1299427a9211bfd01fd3c77aaa44ad59d9ffa12a6d00f48a13c0e.best_config new file mode 100644 index 0000000000000000000000000000000000000000..cbc5adf9227c27576fb8db77eb450090707b6673 --- /dev/null +++ b/.inductor_cache/4l/dccab99d67a1299427a9211bfd01fd3c77aaa44ad59d9ffa12a6d00f48a13c0e.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 48, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/4n/c4nxaenxhyi2kg2uordabgcp5ofkprcosqtxys5klrlaly24kcgm.py b/.inductor_cache/4n/c4nxaenxhyi2kg2uordabgcp5ofkprcosqtxys5klrlaly24kcgm.py new file mode 100644 index 0000000000000000000000000000000000000000..b729ec6daf1a126183806605333dddf0919a2ca9 --- /dev/null +++ b/.inductor_cache/4n/c4nxaenxhyi2kg2uordabgcp5ofkprcosqtxys5klrlaly24kcgm.py @@ -0,0 +1,293 @@ +# AOT ID: ['13_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/qd/cqdull3kwipr33yws7qnj6z4jsiuvue3qmvlqyhxb6q2tawpraqz.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, 1][1, 1]cuda:3" = PlaceHolder[target=arg2_1] +# %arg4_1 : Tensor "f32[s0, 1][1, 1]cuda:3" = PlaceHolder[target=arg4_1] +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:3" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg4_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/sm/csmhkmklmfo5h4gcgl6wazfjapbn6edilhx43by42rcvlwmhrmz6.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg6_1 : Tensor "i64[s37, 1][1, 1]cuda:3" = PlaceHolder[target=arg6_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg6_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/bu/cburtb54dxftz4ovx6wqbvnuvsq4klzrlfgkq2xyomwqr45boyxv.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg8_1 : Tensor "bf16[s0, s87][s87, 1]cuda:3" = PlaceHolder[target=arg8_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s0][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg3_1]), kwargs = {}) +# %div : Tensor "i64[s0][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s0][1]cuda:3"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg3_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:3, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s0][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg3_1]), kwargs = {}) +# %add_47 : Tensor "i64[s0][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s0, s87][s87, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg8_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 16384}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 73728}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/ub/cubrga4p6slgmvpkerkbtbebckik3kdln7y7xyo466mbcclx3vly.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s0, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg9_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 8}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1 = args + args.clear() + s53 = arg0_1 + s68 = arg1_1 + s0 = arg3_1 + s37 = arg5_1 + s87 = arg7_1 + s77 = arg9_1 + assert_size_stride(arg2_1, (s0, 1), (1, 1)) + assert_size_stride(arg4_1, (s0, 1), (1, 1)) + assert_size_stride(arg6_1, (s37, 1), (1, 1)) + assert_size_stride(arg8_1, (s0, s87), (s87, 1)) + with torch.cuda._DeviceGuard(3): + torch.cuda.set_device(3) + buf0 = empty_strided_cuda((s0, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s0, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream3 = get_raw_stream(3) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg4_1, buf0, buf1, s0, stream=stream3) + del arg2_1 + del arg4_1 + buf2 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream3 = get_raw_stream(3) + triton_poi_fused_gather_max_view_1.run(arg6_1, buf2, s0, stream=stream3) + buf3 = empty_strided_cuda((s0, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s0*s87 + stream3 = get_raw_stream(3) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg8_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream3) + del arg8_1 + buf4 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream3 = get_raw_stream(3) + triton_poi_fused_add_max_view_3.run(buf4, s77, s0, stream=stream3) + return (reinterpret_tensor(buf2, (s0, ), (1, ), 0), buf3, buf1, buf0, arg6_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 2 + arg2_1 = rand_strided((2, 1), (1, 1), device='cuda:3', dtype=torch.float32) + arg3_1 = 2 + arg4_1 = rand_strided((2, 1), (1, 1), device='cuda:3', dtype=torch.float32) + arg5_1 = 2 + arg6_1 = rand_strided((2, 1), (1, 1), device='cuda:3', dtype=torch.int64) + arg7_1 = 6144 + arg8_1 = rand_strided((2, 6144), (6144, 1), device='cuda:3', dtype=torch.bfloat16) + arg9_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/4w/88c2a3ee4b3f9188d0485d1f58c19da2936d66802465a9e388f74d179d8ec54e.best_config b/.inductor_cache/4w/88c2a3ee4b3f9188d0485d1f58c19da2936d66802465a9e388f74d179d8ec54e.best_config new file mode 100644 index 0000000000000000000000000000000000000000..0d9829f866a6a3c20fd9c9f1ce6710a05876423a --- /dev/null +++ b/.inductor_cache/4w/88c2a3ee4b3f9188d0485d1f58c19da2936d66802465a9e388f74d179d8ec54e.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 83, "triton_cache_hash": "K7P5VUQTWQ2GR5KCWBMAJUJLJ4ZOKI2HSLQM523UQ5RBJFUB5GQA"} \ No newline at end of file diff --git a/.inductor_cache/4w/c4wbe3nz76vrohi4tguyhvtuuwxq5ot6a6vjcubrww3al5ynrkzg.py b/.inductor_cache/4w/c4wbe3nz76vrohi4tguyhvtuuwxq5ot6a6vjcubrww3al5ynrkzg.py new file mode 100644 index 0000000000000000000000000000000000000000..8f31af6823490efce811077cb90ccca7331474b6 --- /dev/null +++ b/.inductor_cache/4w/c4wbe3nz76vrohi4tguyhvtuuwxq5ot6a6vjcubrww3al5ynrkzg.py @@ -0,0 +1,26 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 3072}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) diff --git a/.inductor_cache/5d/c5dllvj5zhsrbv5yhs4lnnrfdo5t7vsfkgewb73jsq5ipppt5rbn.py b/.inductor_cache/5d/c5dllvj5zhsrbv5yhs4lnnrfdo5t7vsfkgewb73jsq5ipppt5rbn.py new file mode 100644 index 0000000000000000000000000000000000000000..76b8365f04018963abff69f0cf7bf0e69be50fa2 --- /dev/null +++ b/.inductor_cache/5d/c5dllvj5zhsrbv5yhs4lnnrfdo5t7vsfkgewb73jsq5ipppt5rbn.py @@ -0,0 +1,37 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) diff --git a/.inductor_cache/5f/c5fm757ws5k72edgygk6waomo4dh4sqhl7n4rzqsynjfqrzjugov.py b/.inductor_cache/5f/c5fm757ws5k72edgygk6waomo4dh4sqhl7n4rzqsynjfqrzjugov.py new file mode 100644 index 0000000000000000000000000000000000000000..b26e9c8c5924ae60be2ae36e5db2d43b60bdd95d --- /dev/null +++ b/.inductor_cache/5f/c5fm757ws5k72edgygk6waomo4dh4sqhl7n4rzqsynjfqrzjugov.py @@ -0,0 +1,150 @@ +# AOT ID: ['3_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/6d/c6dqripf2w5j4sf6yps4zy7tc4ifqtp2wzcncsdxelw7lhj3o7ou.py +# Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] +# Source node to ATen node mapping: +# mul_1 => mul_7 +# unsqueeze => unsqueeze +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s0, 32][32, 1]cuda:3" = PlaceHolder[target=mm] +# %arg3_1 : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:3" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %mul_2 : Tensor "f32[s0, 32][32, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# %unsqueeze : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%mul_2, -1), kwargs = {}) +# %mul_7 : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_7, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2048}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 28672}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s77 = arg1_1 + arg2_1_size = arg2_1.size() + s0 = arg2_1_size[0] + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s0, 6144), (6144, 1)) + assert_size_stride(arg3_1, (s0, 32, 1), (32, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(3): + torch.cuda.set_device(3) + buf0 = empty_strided_cuda((s0, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = reinterpret_tensor(buf0, (s0, 32, 1), (32, 1, 1), 0); del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] + triton_poi_fused_mul_unsqueeze_0_xnumel = 32*s0 + stream3 = get_raw_stream(3) + triton_poi_fused_mul_unsqueeze_0.run(buf1, arg3_1, arg4_1.item(), triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream3) + del arg3_1 + del arg4_1 + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:3', dtype=torch.bfloat16) + arg1_1 = 56 + arg2_1 = rand_strided((56, 6144), (6144, 1), device='cuda:3', dtype=torch.bfloat16) + arg3_1 = rand_strided((56, 32, 1), (32, 1, 1), device='cuda:3', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/5l/c5lhmqi55bmiwxrtdbnsnvjgutkpxgsd6sl2mrliaofj5ojwc2gs.py b/.inductor_cache/5l/c5lhmqi55bmiwxrtdbnsnvjgutkpxgsd6sl2mrliaofj5ojwc2gs.py new file mode 100644 index 0000000000000000000000000000000000000000..3c82b00d8c6f8518446b8eb530a60e647bb94036 --- /dev/null +++ b/.inductor_cache/5l/c5lhmqi55bmiwxrtdbnsnvjgutkpxgsd6sl2mrliaofj5ojwc2gs.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = ks0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32)), tmp0, None) diff --git a/.inductor_cache/5p/c5pplmatftc6r3hsuhx4skgsikwfs4k4t74mko7xfk7xp2sqleis.py b/.inductor_cache/5p/c5pplmatftc6r3hsuhx4skgsikwfs4k4t74mko7xfk7xp2sqleis.py new file mode 100644 index 0000000000000000000000000000000000000000..9e0f2eb54dbbd8d7e3873240953e0d24bab87614 --- /dev/null +++ b/.inductor_cache/5p/c5pplmatftc6r3hsuhx4skgsikwfs4k4t74mko7xfk7xp2sqleis.py @@ -0,0 +1,46 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) diff --git a/.inductor_cache/5q/c5qdusbmow5b3zrnnn4oh343d7oyptsndbeaenzknk5r4mhn7org.py b/.inductor_cache/5q/c5qdusbmow5b3zrnnn4oh343d7oyptsndbeaenzknk5r4mhn7org.py new file mode 100644 index 0000000000000000000000000000000000000000..962bdba088312c3b8c188f4a0b5d5e55f94267d4 --- /dev/null +++ b/.inductor_cache/5q/c5qdusbmow5b3zrnnn4oh343d7oyptsndbeaenzknk5r4mhn7org.py @@ -0,0 +1,148 @@ +# AOT ID: ['1_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/bk/cbk2gyqxm7qwcf2a3uzdxgrzshzr3heruzlee42ped765ktbbc6f.py +# Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] +# Source node to ATen node mapping: +# mul_1 => mul_7 +# unsqueeze => unsqueeze +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s77, 32][32, 1]cuda:7" = PlaceHolder[target=mm] +# %arg3_1 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:7" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %mul_2 : Tensor "f32[s77, 32][32, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# %unsqueeze : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%mul_2, -1), kwargs = {}) +# %mul_7 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_7, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s77 = arg1_1 + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s77, 6144), (6144, 1)) + assert_size_stride(arg3_1, (s77, 32, 1), (32, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(7): + torch.cuda.set_device(7) + buf0 = empty_strided_cuda((s77, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = reinterpret_tensor(buf0, (s77, 32, 1), (32, 1, 1), 0); del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] + triton_poi_fused_mul_unsqueeze_0_xnumel = 32*s77 + stream7 = get_raw_stream(7) + triton_poi_fused_mul_unsqueeze_0.run(buf1, arg3_1, arg4_1.item(), triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream7) + del arg3_1 + del arg4_1 + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:7', dtype=torch.bfloat16) + arg1_1 = 112 + arg2_1 = rand_strided((112, 6144), (6144, 1), device='cuda:7', dtype=torch.bfloat16) + arg3_1 = rand_strided((112, 32, 1), (32, 1, 1), device='cuda:7', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/5s/c5s4bm2q3gua3tgmxnj3denzqvuhpgrb5kx5rjwxxb4isc7lmqaz.py b/.inductor_cache/5s/c5s4bm2q3gua3tgmxnj3denzqvuhpgrb5kx5rjwxxb4isc7lmqaz.py new file mode 100644 index 0000000000000000000000000000000000000000..e6c96287f33a4c2c0759aeff9153d98a88f463f9 --- /dev/null +++ b/.inductor_cache/5s/c5s4bm2q3gua3tgmxnj3denzqvuhpgrb5kx5rjwxxb4isc7lmqaz.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 8}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/5v/1eb21a9ba8eeb898c12aad6f0c7f6fb253af198de2a96f9596a41157018121fd.best_config b/.inductor_cache/5v/1eb21a9ba8eeb898c12aad6f0c7f6fb253af198de2a96f9596a41157018121fd.best_config new file mode 100644 index 0000000000000000000000000000000000000000..e4ce164e891b6ebef51a608459a5d30d81f88575 --- /dev/null +++ b/.inductor_cache/5v/1eb21a9ba8eeb898c12aad6f0c7f6fb253af198de2a96f9596a41157018121fd.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 49, "triton_cache_hash": "XSMSLG6JQYYM2VVQRQ2PIUDTYEQTGTTF7NZPLRX5QSBQLLXPCRSA"} \ No newline at end of file diff --git a/.inductor_cache/5v/c5vsrxfkmbxmqe35ujjlxyr37blswcxqhqzlv2r6jal54yzc27hf.py b/.inductor_cache/5v/c5vsrxfkmbxmqe35ujjlxyr37blswcxqhqzlv2r6jal54yzc27hf.py new file mode 100644 index 0000000000000000000000000000000000000000..0629a9d79b045e831a924954336dd318e5c5a2ed --- /dev/null +++ b/.inductor_cache/5v/c5vsrxfkmbxmqe35ujjlxyr37blswcxqhqzlv2r6jal54yzc27hf.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/5z/c5ztwyl3hjethlv2ot2kpnvlbaqjstzofdcjttbjwa7nkglx5gan.py b/.inductor_cache/5z/c5ztwyl3hjethlv2ot2kpnvlbaqjstzofdcjttbjwa7nkglx5gan.py new file mode 100644 index 0000000000000000000000000000000000000000..614f1e5e7cb8d66325ef5c36353e1d3abb2cc2db --- /dev/null +++ b/.inductor_cache/5z/c5ztwyl3hjethlv2ot2kpnvlbaqjstzofdcjttbjwa7nkglx5gan.py @@ -0,0 +1,45 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) diff --git a/.inductor_cache/62/c62vhrldvf7yqvelctjx64ts5ifznauctxiqhwo4jrqxe2rtpdgj.py b/.inductor_cache/62/c62vhrldvf7yqvelctjx64ts5ifznauctxiqhwo4jrqxe2rtpdgj.py new file mode 100644 index 0000000000000000000000000000000000000000..55d97fca8b765f5009bed883f2a991160535485c --- /dev/null +++ b/.inductor_cache/62/c62vhrldvf7yqvelctjx64ts5ifznauctxiqhwo4jrqxe2rtpdgj.py @@ -0,0 +1,37 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) diff --git a/.inductor_cache/65/c156cdb4f80a03134d5d44666437b38d33a91660ba036c9600b2b2dad614b347.best_config b/.inductor_cache/65/c156cdb4f80a03134d5d44666437b38d33a91660ba036c9600b2b2dad614b347.best_config new file mode 100644 index 0000000000000000000000000000000000000000..e5d224e9959ee88537632ba5bfc298edacf39725 --- /dev/null +++ b/.inductor_cache/65/c156cdb4f80a03134d5d44666437b38d33a91660ba036c9600b2b2dad614b347.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 21, "triton_cache_hash": "Q2N5PO2YINGSELIO3M4VOOWLWHTNDJUQK2K7ETAZL7ECQK6GFLMA"} \ No newline at end of file diff --git a/.inductor_cache/65/c657qxcjufcctv3zrgtm2r3tsalyqcuqrzgzqct6qvtmivqg7fnt.py b/.inductor_cache/65/c657qxcjufcctv3zrgtm2r3tsalyqcuqrzgzqct6qvtmivqg7fnt.py new file mode 100644 index 0000000000000000000000000000000000000000..57f7f5b47d20b73cfe3bd1329af4801bdbc16a1c --- /dev/null +++ b/.inductor_cache/65/c657qxcjufcctv3zrgtm2r3tsalyqcuqrzgzqct6qvtmivqg7fnt.py @@ -0,0 +1,237 @@ +# AOT ID: ['8_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/6e/c6emtbesfuldnxatnjaketbq4pjgfhpuh5rpsfrb6iagv4wjnfal.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# input_ => mul_2 +# lt => lt +# lt_1 => lt_1 +# mul => mul +# mul_1 => mul_1 +# org_vocab_mask => bitwise_and +# sub_3 => sub_3 +# valid_offset => add +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:4" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:4"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:4"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:4"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %mul : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and, %arg1_1), kwargs = {}) +# %mul_1 : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and_1, %sub_2), kwargs = {}) +# %add : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_1), kwargs = {}) +# %sub_3 : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg0_1, %add), kwargs = {}) +# %mul_2 : Tensor "i64[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_or, %sub_3), kwargs = {}) +# return %mul_2 +triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0 = async_compile.triton('triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/ck/cck7lywyewjkzmkn5tgb3zgvxscxs7idurr7myyeg2z5dguv75br.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# invert => bitwise_not +# lt => lt +# lt_1 => lt_1 +# org_vocab_mask => bitwise_and +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:4" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:4"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:4"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:4"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %bitwise_not : Tensor "b8[1][1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.bitwise_not.default](args = (%bitwise_or,), kwargs = {}) +# return %bitwise_not +triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1 = async_compile.triton('triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1 = args + args.clear() + s90 = arg1_1 + s87 = arg2_1 + s68 = arg3_1 + s53 = arg4_1 + s88 = arg5_1 + assert_size_stride(arg0_1, (1, ), (1, )) + with torch.cuda._DeviceGuard(4): + torch.cuda.set_device(4) + buf0 = empty_strided_cuda((1, ), (1, ), torch.int64) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] + stream4 = get_raw_stream(4) + triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0.run(arg0_1, buf0, s90, s87, s68, s53, s88, 1, stream=stream4) + buf1 = empty_strided_cuda((1, ), (1, ), torch.bool) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] + stream4 = get_raw_stream(4) + triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1.run(arg0_1, buf1, s90, s87, s68, s53, 1, stream=stream4) + del arg0_1 + return (buf0, buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((1, ), (1, ), device='cuda:4', dtype=torch.int64) + arg1_1 = 77440 + arg2_1 = 96800 + arg3_1 = 154880 + arg4_1 = 154880 + arg5_1 = 0 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/65/c65lswedy4nxnsl65ku4a6ddu3r55grrzzjaxx6jvoroewo6e2dr.py b/.inductor_cache/65/c65lswedy4nxnsl65ku4a6ddu3r55grrzzjaxx6jvoroewo6e2dr.py new file mode 100644 index 0000000000000000000000000000000000000000..d73b0dc27a65dbe343f4390d8bed88bd59afc0a4 --- /dev/null +++ b/.inductor_cache/65/c65lswedy4nxnsl65ku4a6ddu3r55grrzzjaxx6jvoroewo6e2dr.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 16384}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 73728}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) diff --git a/.inductor_cache/67/c67bawm35pfjbqa2hnubkrofni4tkbxzyeo5zppu6gsylvqve6eo.py b/.inductor_cache/67/c67bawm35pfjbqa2hnubkrofni4tkbxzyeo5zppu6gsylvqve6eo.py new file mode 100644 index 0000000000000000000000000000000000000000..77736ac2f873e6cdd981ac6eb471ca256634efa4 --- /dev/null +++ b/.inductor_cache/67/c67bawm35pfjbqa2hnubkrofni4tkbxzyeo5zppu6gsylvqve6eo.py @@ -0,0 +1,46 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) diff --git a/.inductor_cache/6d/c6dqripf2w5j4sf6yps4zy7tc4ifqtp2wzcncsdxelw7lhj3o7ou.py b/.inductor_cache/6d/c6dqripf2w5j4sf6yps4zy7tc4ifqtp2wzcncsdxelw7lhj3o7ou.py new file mode 100644 index 0000000000000000000000000000000000000000..5c5fffd26bdcc6b90a5c112764c878875255dad4 --- /dev/null +++ b/.inductor_cache/6d/c6dqripf2w5j4sf6yps4zy7tc4ifqtp2wzcncsdxelw7lhj3o7ou.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2048}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 28672}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/6d/e62944c5f38dab9ccf24b5504699965ed3bab66acfacc866085a1032c963177d.best_config b/.inductor_cache/6d/e62944c5f38dab9ccf24b5504699965ed3bab66acfacc866085a1032c963177d.best_config new file mode 100644 index 0000000000000000000000000000000000000000..c7fff0591f09424ad580cb4827873d8a825dbcf5 --- /dev/null +++ b/.inductor_cache/6d/e62944c5f38dab9ccf24b5504699965ed3bab66acfacc866085a1032c963177d.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 45, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/6e/c6emtbesfuldnxatnjaketbq4pjgfhpuh5rpsfrb6iagv4wjnfal.py b/.inductor_cache/6e/c6emtbesfuldnxatnjaketbq4pjgfhpuh5rpsfrb6iagv4wjnfal.py new file mode 100644 index 0000000000000000000000000000000000000000..56d6f9547de3efeb48a4e5b12fef867d5df56078 --- /dev/null +++ b/.inductor_cache/6e/c6emtbesfuldnxatnjaketbq4pjgfhpuh5rpsfrb6iagv4wjnfal.py @@ -0,0 +1,45 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) diff --git a/.inductor_cache/6j/c6j7f2zfedgsifsvrtdzvprpzw6jujih2uwmzsjrvvfsrmkhcotk.py b/.inductor_cache/6j/c6j7f2zfedgsifsvrtdzvprpzw6jujih2uwmzsjrvvfsrmkhcotk.py new file mode 100644 index 0000000000000000000000000000000000000000..71bff8a7497fd875ae51ee3b611b8b34bbef4591 --- /dev/null +++ b/.inductor_cache/6j/c6j7f2zfedgsifsvrtdzvprpzw6jujih2uwmzsjrvvfsrmkhcotk.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/6p/28650630bd03810b78b7cf75754dfa35da9d5ed77d198e2f0ce9f078547bb750.best_config b/.inductor_cache/6p/28650630bd03810b78b7cf75754dfa35da9d5ed77d198e2f0ce9f078547bb750.best_config new file mode 100644 index 0000000000000000000000000000000000000000..7debf6347db5720350d12655809c5bf511f429e0 --- /dev/null +++ b/.inductor_cache/6p/28650630bd03810b78b7cf75754dfa35da9d5ed77d198e2f0ce9f078547bb750.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 43, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/6p/c6ppnyt6kjnrqeeq3ra4wx4kwkpeerqiq5ftck3hdmvntgpd6wcs.py b/.inductor_cache/6p/c6ppnyt6kjnrqeeq3ra4wx4kwkpeerqiq5ftck3hdmvntgpd6wcs.py new file mode 100644 index 0000000000000000000000000000000000000000..f938ed0738006ad127a37eff7b870b33b5d26cb9 --- /dev/null +++ b/.inductor_cache/6p/c6ppnyt6kjnrqeeq3ra4wx4kwkpeerqiq5ftck3hdmvntgpd6wcs.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/6r/c6rthxci3676wj2mwj62e5zmpmln5m2yrpnp2cb63gsxh4u2zxhz.py b/.inductor_cache/6r/c6rthxci3676wj2mwj62e5zmpmln5m2yrpnp2cb63gsxh4u2zxhz.py new file mode 100644 index 0000000000000000000000000000000000000000..3d66c266509922c7137404451b53d5740efe9368 --- /dev/null +++ b/.inductor_cache/6r/c6rthxci3676wj2mwj62e5zmpmln5m2yrpnp2cb63gsxh4u2zxhz.py @@ -0,0 +1,27 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) diff --git a/.inductor_cache/6u/c6uum37r4isrc4g6cyxmskeeex5jl3phh26m7xujcnuux4ijq3jw.py b/.inductor_cache/6u/c6uum37r4isrc4g6cyxmskeeex5jl3phh26m7xujcnuux4ijq3jw.py new file mode 100644 index 0000000000000000000000000000000000000000..031b292b58ed84db462548ea509ce7a78898ece5 --- /dev/null +++ b/.inductor_cache/6u/c6uum37r4isrc4g6cyxmskeeex5jl3phh26m7xujcnuux4ijq3jw.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = ks0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32)), tmp0, None) diff --git a/.inductor_cache/6y/c6ygrpcdbuohowjvpdfmrangdf56jqj3p4ig3uwlgavr6t5kkb7a.py b/.inductor_cache/6y/c6ygrpcdbuohowjvpdfmrangdf56jqj3p4ig3uwlgavr6t5kkb7a.py new file mode 100644 index 0000000000000000000000000000000000000000..1e92bda4d35ae565bd51c0b36340464150197e4b --- /dev/null +++ b/.inductor_cache/6y/c6ygrpcdbuohowjvpdfmrangdf56jqj3p4ig3uwlgavr6t5kkb7a.py @@ -0,0 +1,289 @@ +# AOT ID: ['6_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/eu/ceujptddvohmrpmi3d35cfzrtagwszsxwklnkpos5z5fi3vn46sj.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s97, 1][1, 1]cuda:3" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f32[s97, 1][1, 1]cuda:3" = PlaceHolder[target=arg3_1] +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:3" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg3_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/jw/cjwnm4nhtti6dx4kp7rcgvjpxw7ab72wy3zgvwtnnqtlbtlmkzlu.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg4_1 : Tensor "i64[s97, 1][1, 1]cuda:3" = PlaceHolder[target=arg4_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg4_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/o6/co6hyomcl3npwceolu64q5bdvrb7h6qa4h3fycnlkntxzzmdzmue.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg6_1 : Tensor "bf16[s97, s87][s87, 1]cuda:3" = PlaceHolder[target=arg6_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s97][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg1_1]), kwargs = {}) +# %div : Tensor "i64[s97][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s97][1]cuda:3"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg1_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:3, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s97][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg1_1]), kwargs = {}) +# %add_47 : Tensor "i64[s97][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s97, s87][s87, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg6_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/dm/cdmvkduxzdqrvvphvyrynpwm77ulv5m44qrmm2izq36cx2yge35l.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s97, 1][1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg7_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1 = args + args.clear() + s53 = arg0_1 + s97 = arg1_1 + s87 = arg5_1 + s77 = arg7_1 + assert_size_stride(arg2_1, (s97, 1), (1, 1)) + assert_size_stride(arg3_1, (s97, 1), (1, 1)) + assert_size_stride(arg4_1, (s97, 1), (1, 1)) + assert_size_stride(arg6_1, (s97, s87), (s87, 1)) + with torch.cuda._DeviceGuard(3): + torch.cuda.set_device(3) + buf0 = empty_strided_cuda((s97, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s97, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream3 = get_raw_stream(3) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg3_1, buf0, buf1, s97, stream=stream3) + del arg2_1 + del arg3_1 + buf2 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream3 = get_raw_stream(3) + triton_poi_fused_gather_max_view_1.run(arg4_1, buf2, s97, stream=stream3) + buf3 = empty_strided_cuda((s97, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s87*s97 + stream3 = get_raw_stream(3) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg6_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream3) + del arg6_1 + buf4 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream3 = get_raw_stream(3) + triton_poi_fused_add_max_view_3.run(buf4, s77, s97, stream=stream3) + return (reinterpret_tensor(buf2, (s97, ), (1, ), 0), buf3, buf1, buf0, arg4_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 8 + arg2_1 = rand_strided((8, 1), (1, 1), device='cuda:3', dtype=torch.float32) + arg3_1 = rand_strided((8, 1), (1, 1), device='cuda:3', dtype=torch.float32) + arg4_1 = rand_strided((8, 1), (1, 1), device='cuda:3', dtype=torch.int64) + arg5_1 = 6144 + arg6_1 = rand_strided((8, 6144), (6144, 1), device='cuda:3', dtype=torch.bfloat16) + arg7_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/6z/c6zyuqh3bo3nxnmo267egfmzuh75yqhd4pdyfrvq5jc5nfexlxsk.py b/.inductor_cache/6z/c6zyuqh3bo3nxnmo267egfmzuh75yqhd4pdyfrvq5jc5nfexlxsk.py new file mode 100644 index 0000000000000000000000000000000000000000..e913bfb47ff732d16b009bf11325e44d1af4f2f7 --- /dev/null +++ b/.inductor_cache/6z/c6zyuqh3bo3nxnmo267egfmzuh75yqhd4pdyfrvq5jc5nfexlxsk.py @@ -0,0 +1,29 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 512}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) diff --git a/.inductor_cache/76/c76y7ge3o24p7dwc6aulba5id74axw62oevitux7yjjlbrbsx66u.py b/.inductor_cache/76/c76y7ge3o24p7dwc6aulba5id74axw62oevitux7yjjlbrbsx66u.py new file mode 100644 index 0000000000000000000000000000000000000000..caf42f8924ce558de7a3dabcb412eb25e0c04f62 --- /dev/null +++ b/.inductor_cache/76/c76y7ge3o24p7dwc6aulba5id74axw62oevitux7yjjlbrbsx66u.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/7e/c7eeblfcfg2xdo34xdor3snhltmuxl4hgqzougfrenohmqtj4r3r.py b/.inductor_cache/7e/c7eeblfcfg2xdo34xdor3snhltmuxl4hgqzougfrenohmqtj4r3r.py new file mode 100644 index 0000000000000000000000000000000000000000..59d9a8939624397a18a91173fa5ca62ca63f7841 --- /dev/null +++ b/.inductor_cache/7e/c7eeblfcfg2xdo34xdor3snhltmuxl4hgqzougfrenohmqtj4r3r.py @@ -0,0 +1,177 @@ +# AOT ID: ['0_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/5p/c5pplmatftc6r3hsuhx4skgsikwfs4k4t74mko7xfk7xp2sqleis.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub, aten.bitwise_not] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# input_ => mul_6 +# invert => bitwise_not +# lt => lt +# lt_1 => lt_1 +# mul => mul +# mul_1 => mul_2 +# org_vocab_mask => bitwise_and +# sub_3 => sub_13 +# valid_offset => add_16 +# vocab_mask => bitwise_or +# Graph fragment: +# %arg1_1 : Tensor "i64[s15][1]cuda:3" = PlaceHolder[target=arg1_1] +# %ge : Tensor "b8[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg1_1, %arg2_1), kwargs = {}) +# %lt : Tensor "b8[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg1_1, %arg3_1), kwargs = {}) +# %bitwise_and : Tensor "b8[s15][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg1_1, %arg4_1), kwargs = {}) +# %lt_1 : Tensor "b8[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg1_1, %arg5_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[s15][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[s15][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %mul : Tensor "i64[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and, %arg2_1), kwargs = {}) +# %mul_2 : Tensor "i64[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and_1, %sub_8), kwargs = {}) +# %add_16 : Tensor "i64[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_2), kwargs = {}) +# %sub_13 : Tensor "i64[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg1_1, %add_16), kwargs = {}) +# %mul_6 : Tensor "i64[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_or, %sub_13), kwargs = {}) +# %bitwise_not : Tensor "b8[s15][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.bitwise_not.default](args = (%bitwise_or,), kwargs = {}) +# return %mul_6,%bitwise_not +triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0 = async_compile.triton('triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1 = args + args.clear() + s15 = arg0_1 + s90 = arg2_1 + s87 = arg3_1 + s68 = arg4_1 + s53 = arg5_1 + s88 = arg6_1 + assert_size_stride(arg1_1, (s15, ), (1, )) + with torch.cuda._DeviceGuard(3): + torch.cuda.set_device(3) + buf0 = empty_strided_cuda((s15, ), (1, ), torch.int64) + buf1 = empty_strided_cuda((s15, ), (1, ), torch.bool) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub, aten.bitwise_not] + stream3 = get_raw_stream(3) + triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0.run(arg1_1, buf0, buf1, s90, s87, s68, s53, s88, s15, stream=stream3) + del arg1_1 + return (buf0, buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 112 + arg1_1 = rand_strided((112, ), (1, ), device='cuda:3', dtype=torch.int64) + arg2_1 = 58080 + arg3_1 = 77440 + arg4_1 = 154880 + arg5_1 = 154880 + arg6_1 = 0 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/7l/c7lh6kx6idvdpavpk2nz6sfugjr7hftxbmoocekz4oiwht2zttg2.py b/.inductor_cache/7l/c7lh6kx6idvdpavpk2nz6sfugjr7hftxbmoocekz4oiwht2zttg2.py new file mode 100644 index 0000000000000000000000000000000000000000..aac664ffd4c029241ddf796f16b16b6e218dd7b7 --- /dev/null +++ b/.inductor_cache/7l/c7lh6kx6idvdpavpk2nz6sfugjr7hftxbmoocekz4oiwht2zttg2.py @@ -0,0 +1,177 @@ +# AOT ID: ['0_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/67/c67bawm35pfjbqa2hnubkrofni4tkbxzyeo5zppu6gsylvqve6eo.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub, aten.bitwise_not] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# input_ => mul_6 +# invert => bitwise_not +# lt => lt +# lt_1 => lt_1 +# mul => mul +# mul_1 => mul_2 +# org_vocab_mask => bitwise_and +# sub_3 => sub_13 +# valid_offset => add_16 +# vocab_mask => bitwise_or +# Graph fragment: +# %arg1_1 : Tensor "i64[s15][1]cuda:0" = PlaceHolder[target=arg1_1] +# %ge : Tensor "b8[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg1_1, %arg2_1), kwargs = {}) +# %lt : Tensor "b8[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg1_1, %arg3_1), kwargs = {}) +# %bitwise_and : Tensor "b8[s15][1]cuda:0"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg1_1, %arg4_1), kwargs = {}) +# %lt_1 : Tensor "b8[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg1_1, %arg5_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[s15][1]cuda:0"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[s15][1]cuda:0"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %mul : Tensor "i64[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and, %arg2_1), kwargs = {}) +# %mul_2 : Tensor "i64[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and_1, %sub_8), kwargs = {}) +# %add_16 : Tensor "i64[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_2), kwargs = {}) +# %sub_13 : Tensor "i64[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg1_1, %add_16), kwargs = {}) +# %mul_6 : Tensor "i64[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_or, %sub_13), kwargs = {}) +# %bitwise_not : Tensor "b8[s15][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.bitwise_not.default](args = (%bitwise_or,), kwargs = {}) +# return %mul_6,%bitwise_not +triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0 = async_compile.triton('triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1 = args + args.clear() + s15 = arg0_1 + s90 = arg2_1 + s87 = arg3_1 + s68 = arg4_1 + s53 = arg5_1 + s88 = arg6_1 + assert_size_stride(arg1_1, (s15, ), (1, )) + with torch.cuda._DeviceGuard(0): + torch.cuda.set_device(0) + buf0 = empty_strided_cuda((s15, ), (1, ), torch.int64) + buf1 = empty_strided_cuda((s15, ), (1, ), torch.bool) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub, aten.bitwise_not] + stream0 = get_raw_stream(0) + triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0.run(arg1_1, buf0, buf1, s90, s87, s68, s53, s88, s15, stream=stream0) + del arg1_1 + return (buf0, buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 112 + arg1_1 = rand_strided((112, ), (1, ), device='cuda:0', dtype=torch.int64) + arg2_1 = 0 + arg3_1 = 19360 + arg4_1 = 154880 + arg5_1 = 154880 + arg6_1 = 0 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/7n/c7nnp7qfhtf3y4yyfqasmfb3utojcibahtzvlfvslld5lvaxaz5j.py b/.inductor_cache/7n/c7nnp7qfhtf3y4yyfqasmfb3utojcibahtzvlfvslld5lvaxaz5j.py new file mode 100644 index 0000000000000000000000000000000000000000..ea5b6013e497e3b6d3ee963e688192738adc281f --- /dev/null +++ b/.inductor_cache/7n/c7nnp7qfhtf3y4yyfqasmfb3utojcibahtzvlfvslld5lvaxaz5j.py @@ -0,0 +1,237 @@ +# AOT ID: ['8_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/hq/chqhkpqqc7ardyuwfanksuowqrkuu5ux5trfbf6fpidqyquo63tr.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# input_ => mul_2 +# lt => lt +# lt_1 => lt_1 +# mul => mul +# mul_1 => mul_1 +# org_vocab_mask => bitwise_and +# sub_3 => sub_3 +# valid_offset => add +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:3" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %mul : Tensor "i64[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and, %arg1_1), kwargs = {}) +# %mul_1 : Tensor "i64[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and_1, %sub_2), kwargs = {}) +# %add : Tensor "i64[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_1), kwargs = {}) +# %sub_3 : Tensor "i64[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg0_1, %add), kwargs = {}) +# %mul_2 : Tensor "i64[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_or, %sub_3), kwargs = {}) +# return %mul_2 +triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0 = async_compile.triton('triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/tx/ctx3ow4rzop4s3fo4njm42lqtjpbxcshr4rccyzdst3z5tpri4xp.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# invert => bitwise_not +# lt => lt +# lt_1 => lt_1 +# org_vocab_mask => bitwise_and +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:3" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:3"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %bitwise_not : Tensor "b8[1][1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.bitwise_not.default](args = (%bitwise_or,), kwargs = {}) +# return %bitwise_not +triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1 = async_compile.triton('triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1 = args + args.clear() + s90 = arg1_1 + s87 = arg2_1 + s68 = arg3_1 + s53 = arg4_1 + s88 = arg5_1 + assert_size_stride(arg0_1, (1, ), (1, )) + with torch.cuda._DeviceGuard(3): + torch.cuda.set_device(3) + buf0 = empty_strided_cuda((1, ), (1, ), torch.int64) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] + stream3 = get_raw_stream(3) + triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0.run(arg0_1, buf0, s90, s87, s68, s53, s88, 1, stream=stream3) + buf1 = empty_strided_cuda((1, ), (1, ), torch.bool) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] + stream3 = get_raw_stream(3) + triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1.run(arg0_1, buf1, s90, s87, s68, s53, 1, stream=stream3) + del arg0_1 + return (buf0, buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((1, ), (1, ), device='cuda:3', dtype=torch.int64) + arg1_1 = 58080 + arg2_1 = 77440 + arg3_1 = 154880 + arg4_1 = 154880 + arg5_1 = 0 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/7y/c6a70be6fdbe0bba300453802f5377ad363e470d258053522fc35588374b4d02.best_config b/.inductor_cache/7y/c6a70be6fdbe0bba300453802f5377ad363e470d258053522fc35588374b4d02.best_config new file mode 100644 index 0000000000000000000000000000000000000000..47ffb19c802f6dd10ea56e7ce8e4457ad907bc62 --- /dev/null +++ b/.inductor_cache/7y/c6a70be6fdbe0bba300453802f5377ad363e470d258053522fc35588374b4d02.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 26, "triton_cache_hash": "JO6EURS6OPPIJNQKRKLRTFGE6YEGGS4IKHEPZFQNLCS72U34VJOQ"} \ No newline at end of file diff --git a/.inductor_cache/7y/c7yzfye2jf2x3hvi4ru7izthwntvroyxkirzlmtpopiyy2t6akxr.py b/.inductor_cache/7y/c7yzfye2jf2x3hvi4ru7izthwntvroyxkirzlmtpopiyy2t6akxr.py new file mode 100644 index 0000000000000000000000000000000000000000..9fa4c3b3d039040b854f14a421d21611d4ed00c0 --- /dev/null +++ b/.inductor_cache/7y/c7yzfye2jf2x3hvi4ru7izthwntvroyxkirzlmtpopiyy2t6akxr.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8192}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 36864}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask).to(tl.float32) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/a4/ca4t2xrbckwo3jwf4x7sm2aq4npxnvsnmdrkhswr6g5hfblq5qym.py b/.inductor_cache/a4/ca4t2xrbckwo3jwf4x7sm2aq4npxnvsnmdrkhswr6g5hfblq5qym.py new file mode 100644 index 0000000000000000000000000000000000000000..b91447fda8086125a9cfb518a14e4fa99122aa72 --- /dev/null +++ b/.inductor_cache/a4/ca4t2xrbckwo3jwf4x7sm2aq4npxnvsnmdrkhswr6g5hfblq5qym.py @@ -0,0 +1,127 @@ +# AOT ID: ['9_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/3z/c3ztg2btpqdyc3uz4dzswnkglhrmeaszpogpdu23omfz4c6u7zko.py +# Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] +# Source node to ATen node mapping: +# weights_1 => mul +# Graph fragment: +# %mm : Tensor "f32[1, 32][32, 1]cuda:4" = PlaceHolder[target=mm] +# %mul : Tensor "f32[1, 32][32, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# return %mul +triton_poi_fused_mul_0 = async_compile.triton('triton_poi_fused_mul_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 384}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 32 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1 = args + args.clear() + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg1_1, (1, 6144), (6144, 1)) + with torch.cuda._DeviceGuard(4): + torch.cuda.set_device(4) + buf0 = empty_strided_cuda((1, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg1_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg1_1 + buf1 = buf0; del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] + stream4 = get_raw_stream(4) + triton_poi_fused_mul_0.run(buf1, 32, stream=stream4) + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:4', dtype=torch.bfloat16) + arg1_1 = rand_strided((1, 6144), (6144, 1), device='cuda:4', dtype=torch.bfloat16) + return [arg0_1, arg1_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/a6/ca6uwbc2bkn5w6nhfj4fu4wddj5vy3xck3kd6szlhbpxghjeqwwz.py b/.inductor_cache/a6/ca6uwbc2bkn5w6nhfj4fu4wddj5vy3xck3kd6szlhbpxghjeqwwz.py new file mode 100644 index 0000000000000000000000000000000000000000..6e8d6d0f1e60c78acca8091b69b838ed8e81b5d9 --- /dev/null +++ b/.inductor_cache/a6/ca6uwbc2bkn5w6nhfj4fu4wddj5vy3xck3kd6szlhbpxghjeqwwz.py @@ -0,0 +1,46 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) diff --git a/.inductor_cache/a6/ca6vwec7mirvudgno353bsbjycoithlk5ltnliqanq4v2ouysa7a.py b/.inductor_cache/a6/ca6vwec7mirvudgno353bsbjycoithlk5ltnliqanq4v2ouysa7a.py new file mode 100644 index 0000000000000000000000000000000000000000..04402fd7369fe785f6f7d8802ecf86b0692cd1fd --- /dev/null +++ b/.inductor_cache/a6/ca6vwec7mirvudgno353bsbjycoithlk5ltnliqanq4v2ouysa7a.py @@ -0,0 +1,289 @@ +# AOT ID: ['11_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/yu/cyulr2ljflwhtei5asluhqjh5vawyptyitwiqbkohzzxhkthatlm.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_1 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg1_1 : Tensor "f32[1, 1][1, 1]cuda:0" = PlaceHolder[target=arg1_1] +# %arg2_1 : Tensor "f32[1, 1][1, 1]cuda:0" = PlaceHolder[target=arg2_1] +# %mul_1 : Tensor "f32[1, 1, 1][1, 1, 1]cuda:0" = PlaceHolder[target=mul_1] +# %unsqueeze : Tensor "f32[1, 1, 1][1, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg1_1, 2), kwargs = {}) +# %view : Tensor "f32[1, 1, 1][1, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg2_1, [-1, 1, 1]), kwargs = {}) +# %mul_1 : Tensor "f32[1, 1, 1][1, 1, 1]cuda:0"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_1,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = tl.load(in_ptr1 + (0)) + tmp3 = tl.broadcast_to(tmp2, [XBLOCK]) + tmp4 = tmp1 * tmp3 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp4, None) + tl.store(out_ptr1 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp4, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/ji/cjixch55bogwekijx7a5djy4i4bejme7e6ialt2qal4iibhwdhel.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg3_1 : Tensor "i64[1, 1][1, 1]cuda:0" = PlaceHolder[target=arg3_1] +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg3_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp1, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/lu/clusdog254vskw2a4djnisaycdvehl2ce7mwvswzfsuvv3v4lxx2.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add +# Graph fragment: +# %arg5_1 : Tensor "bf16[1, s87][s87, 1]cuda:0" = PlaceHolder[target=arg5_1] +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[1][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [1]), kwargs = {}) +# %div : Tensor "i64[1][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[1][1]cuda:0"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[1][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [1]), kwargs = {}) +# %add : Tensor "i64[1][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[1, s87][s87, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg5_1, [%add]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8192}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 36864}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask).to(tl.float32) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/ht/chtvevrrur2mhwksrflye5qrpzyzr3lhyiaedjqm62w5xqlm2qb2.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_3 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_1, [1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_3 : Tensor "i64[1, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg6_1), kwargs = {}) +# return %add_3 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = ks0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32)), tmp0, None) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1 = args + args.clear() + s53 = arg0_1 + s87 = arg4_1 + s77 = arg6_1 + assert_size_stride(arg1_1, (1, 1), (1, 1)) + assert_size_stride(arg2_1, (1, 1), (1, 1)) + assert_size_stride(arg3_1, (1, 1), (1, 1)) + assert_size_stride(arg5_1, (1, s87), (s87, 1)) + with torch.cuda._DeviceGuard(0): + torch.cuda.set_device(0) + buf0 = empty_strided_cuda((1, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((1, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream0 = get_raw_stream(0) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg1_1, arg2_1, buf0, buf1, 1, stream=stream0) + del arg1_1 + del arg2_1 + buf2 = empty_strided_cuda((1, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream0 = get_raw_stream(0) + triton_poi_fused_gather_max_view_1.run(arg3_1, buf2, 1, stream=stream0) + buf3 = empty_strided_cuda((1, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + stream0 = get_raw_stream(0) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg5_1, buf3, s87, stream=stream0) + del arg5_1 + buf4 = empty_strided_cuda((1, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream0 = get_raw_stream(0) + triton_poi_fused_add_max_view_3.run(buf4, s77, 1, stream=stream0) + return (reinterpret_tensor(buf2, (1, ), (1, ), 0), buf3, buf1, buf0, arg3_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = rand_strided((1, 1), (1, 1), device='cuda:0', dtype=torch.float32) + arg2_1 = rand_strided((1, 1), (1, 1), device='cuda:0', dtype=torch.float32) + arg3_1 = rand_strided((1, 1), (1, 1), device='cuda:0', dtype=torch.int64) + arg4_1 = 6144 + arg5_1 = rand_strided((1, 6144), (6144, 1), device='cuda:0', dtype=torch.bfloat16) + arg6_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ab/cabmf57vqt5mwioyfsldvorsufsitoqtkn5nkvjjwshphhhnssje.py b/.inductor_cache/ab/cabmf57vqt5mwioyfsldvorsufsitoqtkn5nkvjjwshphhhnssje.py new file mode 100644 index 0000000000000000000000000000000000000000..6bb6fa82bd89d9401d2f52c0c7beaa385fcf7427 --- /dev/null +++ b/.inductor_cache/ab/cabmf57vqt5mwioyfsldvorsufsitoqtkn5nkvjjwshphhhnssje.py @@ -0,0 +1,150 @@ +# AOT ID: ['3_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/b2/cb26mae35wp4vvjv4ul4dfprqmuzwgew7rcoatwrmuk2gduezlkw.py +# Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] +# Source node to ATen node mapping: +# mul_1 => mul_7 +# unsqueeze => unsqueeze +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s0, 32][32, 1]cuda:4" = PlaceHolder[target=mm] +# %arg3_1 : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:4" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %mul_2 : Tensor "f32[s0, 32][32, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# %unsqueeze : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%mul_2, -1), kwargs = {}) +# %mul_7 : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_7, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2048}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 28672}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s77 = arg1_1 + arg2_1_size = arg2_1.size() + s0 = arg2_1_size[0] + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s0, 6144), (6144, 1)) + assert_size_stride(arg3_1, (s0, 32, 1), (32, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(4): + torch.cuda.set_device(4) + buf0 = empty_strided_cuda((s0, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = reinterpret_tensor(buf0, (s0, 32, 1), (32, 1, 1), 0); del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] + triton_poi_fused_mul_unsqueeze_0_xnumel = 32*s0 + stream4 = get_raw_stream(4) + triton_poi_fused_mul_unsqueeze_0.run(buf1, arg3_1, arg4_1.item(), triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream4) + del arg3_1 + del arg4_1 + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:4', dtype=torch.bfloat16) + arg1_1 = 56 + arg2_1 = rand_strided((56, 6144), (6144, 1), device='cuda:4', dtype=torch.bfloat16) + arg3_1 = rand_strided((56, 32, 1), (32, 1, 1), device='cuda:4', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ad/cadt5bk6ria6bvc4chnssqi7lqwe5cp37lxayvamflvmnohvrwmh.py b/.inductor_cache/ad/cadt5bk6ria6bvc4chnssqi7lqwe5cp37lxayvamflvmnohvrwmh.py new file mode 100644 index 0000000000000000000000000000000000000000..432836424692f8e829a491569a979337029274b1 --- /dev/null +++ b/.inductor_cache/ad/cadt5bk6ria6bvc4chnssqi7lqwe5cp37lxayvamflvmnohvrwmh.py @@ -0,0 +1,142 @@ +# AOT ID: ['5_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/st/cstfh4mhguv7pcjaog3rd3lx4ufqdojruikxhbs6gnn4645kfksi.py +# Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] +# Source node to ATen node mapping: +# mul => mul_2 +# unsqueeze => unsqueeze +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, s3][s3, 1]cuda:0" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:0" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %unsqueeze : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, -1), kwargs = {}) +# %mul_2 : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_2, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 4096}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s7 = arg0_1 + s3 = arg1_1 + arg2_1_size = arg2_1.size() + s0 = arg2_1_size[0] + assert_size_stride(arg2_1, (s0, s3), (s3, 1)) + assert_size_stride(arg3_1, (s0, s3, 1), (s3, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(0): + torch.cuda.set_device(0) + buf0 = empty_strided_cuda((s0, s3, 1), (s3, 1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] + triton_poi_fused_mul_unsqueeze_0_xnumel = s0*s3 + stream0 = get_raw_stream(0) + triton_poi_fused_mul_unsqueeze_0.run(arg2_1, arg3_1, arg4_1.item(), buf0, triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream0) + del arg2_1 + del arg3_1 + del arg4_1 + return (buf0, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 8 + arg1_1 = 32 + arg2_1 = rand_strided((8, 32), (32, 1), device='cuda:0', dtype=torch.float32) + arg3_1 = rand_strided((8, 32, 1), (32, 1, 1), device='cuda:0', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ah/cahr6j4k7wyazhocuhoqqgk6tbdzuuhv2ol4oih2nnegebuyza27.py b/.inductor_cache/ah/cahr6j4k7wyazhocuhoqqgk6tbdzuuhv2ol4oih2nnegebuyza27.py new file mode 100644 index 0000000000000000000000000000000000000000..bf03e7b9c7d16f9e846a5f39d2910271b43cda2e --- /dev/null +++ b/.inductor_cache/ah/cahr6j4k7wyazhocuhoqqgk6tbdzuuhv2ol4oih2nnegebuyza27.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 16384}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 73728}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) diff --git a/.inductor_cache/ah/dadb4f116e1904ace2117afc3f376f250c9166d782ee17a1b49625dbcfa2b9e6.best_config b/.inductor_cache/ah/dadb4f116e1904ace2117afc3f376f250c9166d782ee17a1b49625dbcfa2b9e6.best_config new file mode 100644 index 0000000000000000000000000000000000000000..bf6c6bd3d0e1353b179fc31d10461a5c6d72800a --- /dev/null +++ b/.inductor_cache/ah/dadb4f116e1904ace2117afc3f376f250c9166d782ee17a1b49625dbcfa2b9e6.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 25, "triton_cache_hash": "Q2N5PO2YINGSELIO3M4VOOWLWHTNDJUQK2K7ETAZL7ECQK6GFLMA"} \ No newline at end of file diff --git a/.inductor_cache/aj/cajzakmwptzzzzvbcv2bpcp7q3lgod2olnnbqwxferreoya2vwce.py b/.inductor_cache/aj/cajzakmwptzzzzvbcv2bpcp7q3lgod2olnnbqwxferreoya2vwce.py new file mode 100644 index 0000000000000000000000000000000000000000..cf8c24be49d273c6a5bea3f623044c89f4510cbd --- /dev/null +++ b/.inductor_cache/aj/cajzakmwptzzzzvbcv2bpcp7q3lgod2olnnbqwxferreoya2vwce.py @@ -0,0 +1,293 @@ +# AOT ID: ['13_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/jt/cjtkmsmsmr7qd5ioimpa7bu7jp4mskbficcpsjglg3pwmbsuyoq6.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, 1][1, 1]cuda:6" = PlaceHolder[target=arg2_1] +# %arg4_1 : Tensor "f32[s0, 1][1, 1]cuda:6" = PlaceHolder[target=arg4_1] +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:6" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg4_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:6"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/wm/cwma6jddm2yawcl44p7xd2wd2nwhrno6sm44ae7ztlrw6xwtvoiy.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg6_1 : Tensor "i64[s37, 1][1, 1]cuda:6" = PlaceHolder[target=arg6_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg6_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/kv/ckvsln7ha4pavxiq4tmskyfyfrhjtmmrzmzdvtv3giezgw5zmfeh.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg8_1 : Tensor "bf16[s0, s87][s87, 1]cuda:6" = PlaceHolder[target=arg8_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s0][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg3_1]), kwargs = {}) +# %div : Tensor "i64[s0][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s0][1]cuda:6"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg3_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:6, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s0][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg3_1]), kwargs = {}) +# %add_47 : Tensor "i64[s0][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s0, s87][s87, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg8_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 16384}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 73728}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/wv/cwvoi4ms7ttgnk7xsmilboguzw6q6b5j2pqgucmowavjqsqjesm5.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s0, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg9_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 8}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1 = args + args.clear() + s53 = arg0_1 + s68 = arg1_1 + s0 = arg3_1 + s37 = arg5_1 + s87 = arg7_1 + s77 = arg9_1 + assert_size_stride(arg2_1, (s0, 1), (1, 1)) + assert_size_stride(arg4_1, (s0, 1), (1, 1)) + assert_size_stride(arg6_1, (s37, 1), (1, 1)) + assert_size_stride(arg8_1, (s0, s87), (s87, 1)) + with torch.cuda._DeviceGuard(6): + torch.cuda.set_device(6) + buf0 = empty_strided_cuda((s0, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s0, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream6 = get_raw_stream(6) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg4_1, buf0, buf1, s0, stream=stream6) + del arg2_1 + del arg4_1 + buf2 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream6 = get_raw_stream(6) + triton_poi_fused_gather_max_view_1.run(arg6_1, buf2, s0, stream=stream6) + buf3 = empty_strided_cuda((s0, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s0*s87 + stream6 = get_raw_stream(6) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg8_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream6) + del arg8_1 + buf4 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream6 = get_raw_stream(6) + triton_poi_fused_add_max_view_3.run(buf4, s77, s0, stream=stream6) + return (reinterpret_tensor(buf2, (s0, ), (1, ), 0), buf3, buf1, buf0, arg6_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 2 + arg2_1 = rand_strided((2, 1), (1, 1), device='cuda:6', dtype=torch.float32) + arg3_1 = 2 + arg4_1 = rand_strided((2, 1), (1, 1), device='cuda:6', dtype=torch.float32) + arg5_1 = 2 + arg6_1 = rand_strided((2, 1), (1, 1), device='cuda:6', dtype=torch.int64) + arg7_1 = 6144 + arg8_1 = rand_strided((2, 6144), (6144, 1), device='cuda:6', dtype=torch.bfloat16) + arg9_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1, arg9_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ak/0f162149dbfe75accc9468a978c64b85b2be8c647e0a281a10f6968c39585bf1.best_config b/.inductor_cache/ak/0f162149dbfe75accc9468a978c64b85b2be8c647e0a281a10f6968c39585bf1.best_config new file mode 100644 index 0000000000000000000000000000000000000000..99aa0fb830da51fbf73626185d4e469fcc477ff1 --- /dev/null +++ b/.inductor_cache/ak/0f162149dbfe75accc9468a978c64b85b2be8c647e0a281a10f6968c39585bf1.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 47, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/ak/cak6z2aw4nacwrl2y7z6ridytv56x6u4wfpx6eboacouj6q2iumn.py b/.inductor_cache/ak/cak6z2aw4nacwrl2y7z6ridytv56x6u4wfpx6eboacouj6q2iumn.py new file mode 100644 index 0000000000000000000000000000000000000000..de0b85f49805a4de17f56097f1a69d96298979a1 --- /dev/null +++ b/.inductor_cache/ak/cak6z2aw4nacwrl2y7z6ridytv56x6u4wfpx6eboacouj6q2iumn.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2048}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 28672}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/aotautograd/a2ya6ezu2yru3rwxze3rha6bep62du6deq33hbszy2ugi4xuc3gk/6ulshczjgluqwtpa4t2xzcw6ohwgguptw33eucqifwb2z7kotcz b/.inductor_cache/aotautograd/a2ya6ezu2yru3rwxze3rha6bep62du6deq33hbszy2ugi4xuc3gk/6ulshczjgluqwtpa4t2xzcw6ohwgguptw33eucqifwb2z7kotcz new file mode 100644 index 0000000000000000000000000000000000000000..c36a9a4fbc69ea3b92ce9d1c932002f1e8abd6da Binary files /dev/null and b/.inductor_cache/aotautograd/a2ya6ezu2yru3rwxze3rha6bep62du6deq33hbszy2ugi4xuc3gk/6ulshczjgluqwtpa4t2xzcw6ohwgguptw33eucqifwb2z7kotcz differ diff --git a/.inductor_cache/aotautograd/a32fp6gmhzfhjtl62fx4sqdn64zonwrv6du7n242zkolzqj345rl/kevpyuc2jckitzrt33vgjepfn5y3fbzkofci25jhu3c34rvx476 b/.inductor_cache/aotautograd/a32fp6gmhzfhjtl62fx4sqdn64zonwrv6du7n242zkolzqj345rl/kevpyuc2jckitzrt33vgjepfn5y3fbzkofci25jhu3c34rvx476 new file mode 100644 index 0000000000000000000000000000000000000000..1805062c6e74cef01d37aca80892fb6e3495f63e Binary files /dev/null and b/.inductor_cache/aotautograd/a32fp6gmhzfhjtl62fx4sqdn64zonwrv6du7n242zkolzqj345rl/kevpyuc2jckitzrt33vgjepfn5y3fbzkofci25jhu3c34rvx476 differ diff --git a/.inductor_cache/aotautograd/a4jpmbuwshtnowjzeq5yk3pabrljnqmqbc7nutmqcf3sx2eficcn/tthj46v2cdhtgh2geqdt7ffmnrnrex7rcjwvqrykvf3y42aagte b/.inductor_cache/aotautograd/a4jpmbuwshtnowjzeq5yk3pabrljnqmqbc7nutmqcf3sx2eficcn/tthj46v2cdhtgh2geqdt7ffmnrnrex7rcjwvqrykvf3y42aagte new file mode 100644 index 0000000000000000000000000000000000000000..2e6cf5a453acce4764110d627395c66a650da72b Binary files /dev/null and b/.inductor_cache/aotautograd/a4jpmbuwshtnowjzeq5yk3pabrljnqmqbc7nutmqcf3sx2eficcn/tthj46v2cdhtgh2geqdt7ffmnrnrex7rcjwvqrykvf3y42aagte differ diff --git a/.inductor_cache/aotautograd/a5ge77oeukcbfdvvi6apfvj53lcandt7fc5v7p6srslfdm6hyt4h/kbpl2aoinclfzijxocpconya5xagpv757toserqwalu7uqi7jd2 b/.inductor_cache/aotautograd/a5ge77oeukcbfdvvi6apfvj53lcandt7fc5v7p6srslfdm6hyt4h/kbpl2aoinclfzijxocpconya5xagpv757toserqwalu7uqi7jd2 new file mode 100644 index 0000000000000000000000000000000000000000..c0096759595a7ea41ac2f322260f5653d7d04232 Binary files /dev/null and b/.inductor_cache/aotautograd/a5ge77oeukcbfdvvi6apfvj53lcandt7fc5v7p6srslfdm6hyt4h/kbpl2aoinclfzijxocpconya5xagpv757toserqwalu7uqi7jd2 differ diff --git a/.inductor_cache/aotautograd/a5sgx2mphqkonuxwb44hlmvekvqht2etpgplkzz5bm6btnyj6hwg/xz2u5kjmz45yawweume2r2rujtaoawbiqeumsugvjrqa2hj2x33 b/.inductor_cache/aotautograd/a5sgx2mphqkonuxwb44hlmvekvqht2etpgplkzz5bm6btnyj6hwg/xz2u5kjmz45yawweume2r2rujtaoawbiqeumsugvjrqa2hj2x33 new file mode 100644 index 0000000000000000000000000000000000000000..fc3aa88283f42009194caebbbad5b8a3864a4c26 Binary files /dev/null and b/.inductor_cache/aotautograd/a5sgx2mphqkonuxwb44hlmvekvqht2etpgplkzz5bm6btnyj6hwg/xz2u5kjmz45yawweume2r2rujtaoawbiqeumsugvjrqa2hj2x33 differ diff --git a/.inductor_cache/aotautograd/a5tix3jfam4w2suet6zaq6sovw4rb54dfedzhwdmqn2w6apqfctp/qina547uagmscg3tnor3phrvwxh2yxk7nsekq2dvy3ntrosfvdx b/.inductor_cache/aotautograd/a5tix3jfam4w2suet6zaq6sovw4rb54dfedzhwdmqn2w6apqfctp/qina547uagmscg3tnor3phrvwxh2yxk7nsekq2dvy3ntrosfvdx new file mode 100644 index 0000000000000000000000000000000000000000..84251f3c338de85b01ba9ae316e4e1b4749f9d4e Binary files /dev/null and b/.inductor_cache/aotautograd/a5tix3jfam4w2suet6zaq6sovw4rb54dfedzhwdmqn2w6apqfctp/qina547uagmscg3tnor3phrvwxh2yxk7nsekq2dvy3ntrosfvdx differ diff --git a/.inductor_cache/aotautograd/a5wbm2udaejrvl7b5ng2ahbxvysh2uuwkypuzrivg27bbbrmpyeg/ekw5riqqw6ujs32qvaoi7nzzzg2dh73win3wgnroyxjp6zywbxw b/.inductor_cache/aotautograd/a5wbm2udaejrvl7b5ng2ahbxvysh2uuwkypuzrivg27bbbrmpyeg/ekw5riqqw6ujs32qvaoi7nzzzg2dh73win3wgnroyxjp6zywbxw new file mode 100644 index 0000000000000000000000000000000000000000..84dd92871e832b4904462517675cf59a825a59b3 Binary files /dev/null and b/.inductor_cache/aotautograd/a5wbm2udaejrvl7b5ng2ahbxvysh2uuwkypuzrivg27bbbrmpyeg/ekw5riqqw6ujs32qvaoi7nzzzg2dh73win3wgnroyxjp6zywbxw differ diff --git a/.inductor_cache/aotautograd/a5xckgi33ksmd7xrzo72famtw7satmt4trheornazxhflxi3kag6/e6ak5w53xvlyifwlhguajfgm6o7txytpffoxafjsulqmxen6px2 b/.inductor_cache/aotautograd/a5xckgi33ksmd7xrzo72famtw7satmt4trheornazxhflxi3kag6/e6ak5w53xvlyifwlhguajfgm6o7txytpffoxafjsulqmxen6px2 new file mode 100644 index 0000000000000000000000000000000000000000..c3c555d43c021469bc8eb5a88da0a92e0734e060 Binary files /dev/null and b/.inductor_cache/aotautograd/a5xckgi33ksmd7xrzo72famtw7satmt4trheornazxhflxi3kag6/e6ak5w53xvlyifwlhguajfgm6o7txytpffoxafjsulqmxen6px2 differ diff --git a/.inductor_cache/aotautograd/a5xrx3th2tst4buco4s2m3kw2mc5stjwhmpurwzgsznlfccyunap/i3uivasncx6atrvbtevowosixse3jabqce46txxy5twgfctqeyq b/.inductor_cache/aotautograd/a5xrx3th2tst4buco4s2m3kw2mc5stjwhmpurwzgsznlfccyunap/i3uivasncx6atrvbtevowosixse3jabqce46txxy5twgfctqeyq new file mode 100644 index 0000000000000000000000000000000000000000..fde5d498e6b42c60b9300281bd292b3660d574e6 Binary files /dev/null and b/.inductor_cache/aotautograd/a5xrx3th2tst4buco4s2m3kw2mc5stjwhmpurwzgsznlfccyunap/i3uivasncx6atrvbtevowosixse3jabqce46txxy5twgfctqeyq differ diff --git a/.inductor_cache/aotautograd/a6evskbxnda4e3blxsvleyqbxmwtsggxpl3bm3gw3mxcstrh64ul/vvgqbqmsyd3s3mi4vr77gxyalnwv6xa53rhuuubf3gtipdokyqd b/.inductor_cache/aotautograd/a6evskbxnda4e3blxsvleyqbxmwtsggxpl3bm3gw3mxcstrh64ul/vvgqbqmsyd3s3mi4vr77gxyalnwv6xa53rhuuubf3gtipdokyqd new file mode 100644 index 0000000000000000000000000000000000000000..849006538290edd8143d27104b079c218e849db3 Binary files /dev/null and b/.inductor_cache/aotautograd/a6evskbxnda4e3blxsvleyqbxmwtsggxpl3bm3gw3mxcstrh64ul/vvgqbqmsyd3s3mi4vr77gxyalnwv6xa53rhuuubf3gtipdokyqd differ diff --git a/.inductor_cache/aotautograd/a6jbpkx7pncxxwq4orhtc5xogfkpx727uvwshg2bipdnbotelqns/xsnr63fyawngjzajbxb42lgrjh3ymwr6tupzmv5zksevfkjztsk b/.inductor_cache/aotautograd/a6jbpkx7pncxxwq4orhtc5xogfkpx727uvwshg2bipdnbotelqns/xsnr63fyawngjzajbxb42lgrjh3ymwr6tupzmv5zksevfkjztsk new file mode 100644 index 0000000000000000000000000000000000000000..75a45e9f0c8baa6ba47d361b0509df8c6a941b23 Binary files /dev/null and b/.inductor_cache/aotautograd/a6jbpkx7pncxxwq4orhtc5xogfkpx727uvwshg2bipdnbotelqns/xsnr63fyawngjzajbxb42lgrjh3ymwr6tupzmv5zksevfkjztsk differ diff --git a/.inductor_cache/aotautograd/a6jd6tsikqxzq3paottbixdqf6indfwau4fs4nt4udykc7msdy3t/kbhjp2qinkudhktbwmqgby4jeu5j4ikhrxx7vgyhue4eqq3vfug b/.inductor_cache/aotautograd/a6jd6tsikqxzq3paottbixdqf6indfwau4fs4nt4udykc7msdy3t/kbhjp2qinkudhktbwmqgby4jeu5j4ikhrxx7vgyhue4eqq3vfug new file mode 100644 index 0000000000000000000000000000000000000000..9cce11fa32d21882794aef1c540cd13828736bf4 Binary files /dev/null and b/.inductor_cache/aotautograd/a6jd6tsikqxzq3paottbixdqf6indfwau4fs4nt4udykc7msdy3t/kbhjp2qinkudhktbwmqgby4jeu5j4ikhrxx7vgyhue4eqq3vfug differ diff --git a/.inductor_cache/aotautograd/a6jlrz2fvqgfhjc4bwvti3hybr2arqm7nqle27fu6pdhkpb4cqd6/qg6mqr6tdw5nasjtlwcu6jn4fhzzqq4io3q53rv7ccmybzpgobf b/.inductor_cache/aotautograd/a6jlrz2fvqgfhjc4bwvti3hybr2arqm7nqle27fu6pdhkpb4cqd6/qg6mqr6tdw5nasjtlwcu6jn4fhzzqq4io3q53rv7ccmybzpgobf new file mode 100644 index 0000000000000000000000000000000000000000..38067347d395a52b036febb898b66f115011cc74 Binary files /dev/null and b/.inductor_cache/aotautograd/a6jlrz2fvqgfhjc4bwvti3hybr2arqm7nqle27fu6pdhkpb4cqd6/qg6mqr6tdw5nasjtlwcu6jn4fhzzqq4io3q53rv7ccmybzpgobf differ diff --git a/.inductor_cache/aotautograd/a6zzejwwk4xyxm6czcoyepvdwdmwoufb57e6vc7bpjnnknspiar2/gxrw42npjmlfo5itasuldchw3ud7bl6qmsc2jatnnbvjgguupgl b/.inductor_cache/aotautograd/a6zzejwwk4xyxm6czcoyepvdwdmwoufb57e6vc7bpjnnknspiar2/gxrw42npjmlfo5itasuldchw3ud7bl6qmsc2jatnnbvjgguupgl new file mode 100644 index 0000000000000000000000000000000000000000..775ced5f04bbd72d368570010571f61803737453 Binary files /dev/null and b/.inductor_cache/aotautograd/a6zzejwwk4xyxm6czcoyepvdwdmwoufb57e6vc7bpjnnknspiar2/gxrw42npjmlfo5itasuldchw3ud7bl6qmsc2jatnnbvjgguupgl differ diff --git a/.inductor_cache/aotautograd/a733qfbicikikq7sz5txr7nttkcb7unlstehbn7l5i3vs6gtqzjl/fh47tb4mkuoyxgi4paf7mp2snvzoheg5xhi5cxw6iz4vufvwnv3 b/.inductor_cache/aotautograd/a733qfbicikikq7sz5txr7nttkcb7unlstehbn7l5i3vs6gtqzjl/fh47tb4mkuoyxgi4paf7mp2snvzoheg5xhi5cxw6iz4vufvwnv3 new file mode 100644 index 0000000000000000000000000000000000000000..a260fcfdcb46eca17b7fbc8a79a50cf289af4838 Binary files /dev/null and b/.inductor_cache/aotautograd/a733qfbicikikq7sz5txr7nttkcb7unlstehbn7l5i3vs6gtqzjl/fh47tb4mkuoyxgi4paf7mp2snvzoheg5xhi5cxw6iz4vufvwnv3 differ diff --git a/.inductor_cache/aotautograd/a73cdjhfbyq2zyijtq3b7oadxk3ruauy6i2ldh565izdbmnvchvn/33kszbpz52gsykpssuk33txyjr6zidfxqxmbrgnox5bgjkzn4pe b/.inductor_cache/aotautograd/a73cdjhfbyq2zyijtq3b7oadxk3ruauy6i2ldh565izdbmnvchvn/33kszbpz52gsykpssuk33txyjr6zidfxqxmbrgnox5bgjkzn4pe new file mode 100644 index 0000000000000000000000000000000000000000..5d1b312933e5be14cb64bb1c072bfea961195493 Binary files /dev/null and b/.inductor_cache/aotautograd/a73cdjhfbyq2zyijtq3b7oadxk3ruauy6i2ldh565izdbmnvchvn/33kszbpz52gsykpssuk33txyjr6zidfxqxmbrgnox5bgjkzn4pe differ diff --git a/.inductor_cache/aotautograd/a74z5bomak3dedkvdotw4fnabwbqdkrhsbepz5skffa3vpifid5x/2hlbgrnjhpioc2kq7upxssgum433extqu7shq6qvqd23wdttbec b/.inductor_cache/aotautograd/a74z5bomak3dedkvdotw4fnabwbqdkrhsbepz5skffa3vpifid5x/2hlbgrnjhpioc2kq7upxssgum433extqu7shq6qvqd23wdttbec new file mode 100644 index 0000000000000000000000000000000000000000..af1c1931dcc3edd0b12fd2acd8549c5006bc616e Binary files /dev/null and b/.inductor_cache/aotautograd/a74z5bomak3dedkvdotw4fnabwbqdkrhsbepz5skffa3vpifid5x/2hlbgrnjhpioc2kq7upxssgum433extqu7shq6qvqd23wdttbec differ diff --git a/.inductor_cache/aotautograd/a7hd3yxkptjaefih3ypphelwvl3loizhpjl2lzwmyqwvbkcwixi7/gee2ud3j7psb4uuckymrivlrfplzz5ub3ohmra7yhpi4enkyboi b/.inductor_cache/aotautograd/a7hd3yxkptjaefih3ypphelwvl3loizhpjl2lzwmyqwvbkcwixi7/gee2ud3j7psb4uuckymrivlrfplzz5ub3ohmra7yhpi4enkyboi new file mode 100644 index 0000000000000000000000000000000000000000..2f87ba1ffc6bcf6c248a3656c1ade4934b82b56b Binary files /dev/null and b/.inductor_cache/aotautograd/a7hd3yxkptjaefih3ypphelwvl3loizhpjl2lzwmyqwvbkcwixi7/gee2ud3j7psb4uuckymrivlrfplzz5ub3ohmra7yhpi4enkyboi differ diff --git a/.inductor_cache/aotautograd/a7i2pvzhst5racw22f5q4la7zd57jxhxrwc5l7qlqo2v6gbao7ij/3rxt35jd5udoxkavmdxsjriq2zcgzixnzhoz3zjeholvp7w2a5d b/.inductor_cache/aotautograd/a7i2pvzhst5racw22f5q4la7zd57jxhxrwc5l7qlqo2v6gbao7ij/3rxt35jd5udoxkavmdxsjriq2zcgzixnzhoz3zjeholvp7w2a5d new file mode 100644 index 0000000000000000000000000000000000000000..d31a5f91ed0b2d201fd24365e7a4b0e7bb461601 Binary files /dev/null and b/.inductor_cache/aotautograd/a7i2pvzhst5racw22f5q4la7zd57jxhxrwc5l7qlqo2v6gbao7ij/3rxt35jd5udoxkavmdxsjriq2zcgzixnzhoz3zjeholvp7w2a5d differ diff --git a/.inductor_cache/aotautograd/aaeskmwxskhnowaerrygetnvutneqgm36wpxfcpyr7xxqy2lunty/uq22vm467cvpfw2ghaq6x4o3h5p4yhmqdzq3ar2yk3ctd6gz5sj b/.inductor_cache/aotautograd/aaeskmwxskhnowaerrygetnvutneqgm36wpxfcpyr7xxqy2lunty/uq22vm467cvpfw2ghaq6x4o3h5p4yhmqdzq3ar2yk3ctd6gz5sj new file mode 100644 index 0000000000000000000000000000000000000000..4a568c138780e3d54fa58f64659e913a9fecde37 Binary files /dev/null and b/.inductor_cache/aotautograd/aaeskmwxskhnowaerrygetnvutneqgm36wpxfcpyr7xxqy2lunty/uq22vm467cvpfw2ghaq6x4o3h5p4yhmqdzq3ar2yk3ctd6gz5sj differ diff --git a/.inductor_cache/aotautograd/ab6d7dg7gzbtnp5ceiugapfkcw5cea27dzt2x5joab5psc5owfma/6ctomckr2jnhjynjezibvne5wtrb2v2lsn3uwpiiusinetj3zvv b/.inductor_cache/aotautograd/ab6d7dg7gzbtnp5ceiugapfkcw5cea27dzt2x5joab5psc5owfma/6ctomckr2jnhjynjezibvne5wtrb2v2lsn3uwpiiusinetj3zvv new file mode 100644 index 0000000000000000000000000000000000000000..de7983a979a79eca6ae27658414ee64e338194f2 Binary files /dev/null and b/.inductor_cache/aotautograd/ab6d7dg7gzbtnp5ceiugapfkcw5cea27dzt2x5joab5psc5owfma/6ctomckr2jnhjynjezibvne5wtrb2v2lsn3uwpiiusinetj3zvv differ diff --git a/.inductor_cache/aotautograd/abg2girilapxcsucrd2hkogrcryrbsdqrv3sb6bx2tn2zx6hut6y/f6nbw65kna55ocidf6wtipa4hwt654w3nsbtgfqneulqepgws4l b/.inductor_cache/aotautograd/abg2girilapxcsucrd2hkogrcryrbsdqrv3sb6bx2tn2zx6hut6y/f6nbw65kna55ocidf6wtipa4hwt654w3nsbtgfqneulqepgws4l new file mode 100644 index 0000000000000000000000000000000000000000..02b1dcc053a74bb89d33edbc124c72e908099b1d Binary files /dev/null and b/.inductor_cache/aotautograd/abg2girilapxcsucrd2hkogrcryrbsdqrv3sb6bx2tn2zx6hut6y/f6nbw65kna55ocidf6wtipa4hwt654w3nsbtgfqneulqepgws4l differ diff --git a/.inductor_cache/aotautograd/abicijmiegerlrnimy7ewag36fkwa2k27hyfpq54efdu27uirw6h/kcdqthistcejtihww4w5cqlcqanvopm2tqr4non7itko64tl357 b/.inductor_cache/aotautograd/abicijmiegerlrnimy7ewag36fkwa2k27hyfpq54efdu27uirw6h/kcdqthistcejtihww4w5cqlcqanvopm2tqr4non7itko64tl357 new file mode 100644 index 0000000000000000000000000000000000000000..20ce2aa93dbf15b851555870232e686ab9149ba9 Binary files /dev/null and b/.inductor_cache/aotautograd/abicijmiegerlrnimy7ewag36fkwa2k27hyfpq54efdu27uirw6h/kcdqthistcejtihww4w5cqlcqanvopm2tqr4non7itko64tl357 differ diff --git a/.inductor_cache/aotautograd/abk3cf4fbhvaousholk5etg5s3pfjem6qurvzjsqsmc5b5tx37uw/lo2v2u4kky4ro5hf3piba7skeahdwy3ju76qarogdicfl3zl3lw b/.inductor_cache/aotautograd/abk3cf4fbhvaousholk5etg5s3pfjem6qurvzjsqsmc5b5tx37uw/lo2v2u4kky4ro5hf3piba7skeahdwy3ju76qarogdicfl3zl3lw new file mode 100644 index 0000000000000000000000000000000000000000..b6f2033d54c5f5df26fca504dc35710d6f6d8813 Binary files /dev/null and b/.inductor_cache/aotautograd/abk3cf4fbhvaousholk5etg5s3pfjem6qurvzjsqsmc5b5tx37uw/lo2v2u4kky4ro5hf3piba7skeahdwy3ju76qarogdicfl3zl3lw differ diff --git a/.inductor_cache/aotautograd/abn6b6ho7pqudbi32p6eertz4siqv2g4gcbfbnqo4nyyj2mvbnp2/bhfxpdekmqdfgr3khripgqnaehb3ryvpqmbcdldbzecmr74q7l7 b/.inductor_cache/aotautograd/abn6b6ho7pqudbi32p6eertz4siqv2g4gcbfbnqo4nyyj2mvbnp2/bhfxpdekmqdfgr3khripgqnaehb3ryvpqmbcdldbzecmr74q7l7 new file mode 100644 index 0000000000000000000000000000000000000000..2b205ac470e61134152aa471694326eaf0db3dca Binary files /dev/null and b/.inductor_cache/aotautograd/abn6b6ho7pqudbi32p6eertz4siqv2g4gcbfbnqo4nyyj2mvbnp2/bhfxpdekmqdfgr3khripgqnaehb3ryvpqmbcdldbzecmr74q7l7 differ diff --git a/.inductor_cache/aotautograd/abwyz3ua64u5yhp2ipyydbzmtltxesynl2urvknptct3h7ftfrnc/omsxhak7y6rlezouycmcuiyd5hqmnknqqqva4ouqjp4xxj4gzf6 b/.inductor_cache/aotautograd/abwyz3ua64u5yhp2ipyydbzmtltxesynl2urvknptct3h7ftfrnc/omsxhak7y6rlezouycmcuiyd5hqmnknqqqva4ouqjp4xxj4gzf6 new file mode 100644 index 0000000000000000000000000000000000000000..585be67bd0032528aeae9a28eac92cd05e433007 Binary files /dev/null and b/.inductor_cache/aotautograd/abwyz3ua64u5yhp2ipyydbzmtltxesynl2urvknptct3h7ftfrnc/omsxhak7y6rlezouycmcuiyd5hqmnknqqqva4ouqjp4xxj4gzf6 differ diff --git a/.inductor_cache/aotautograd/adibxg7shl52rg7s6gtlnwgy3btup3o62jmejxdbat4hihibbujq/s6vug5mux2drfx2ge56wrso5l6er6x7fdazhk4qrcvjsntqqxr5 b/.inductor_cache/aotautograd/adibxg7shl52rg7s6gtlnwgy3btup3o62jmejxdbat4hihibbujq/s6vug5mux2drfx2ge56wrso5l6er6x7fdazhk4qrcvjsntqqxr5 new file mode 100644 index 0000000000000000000000000000000000000000..d5d54398ac2f9950bdd01cbb4850533693e14f9d Binary files /dev/null and b/.inductor_cache/aotautograd/adibxg7shl52rg7s6gtlnwgy3btup3o62jmejxdbat4hihibbujq/s6vug5mux2drfx2ge56wrso5l6er6x7fdazhk4qrcvjsntqqxr5 differ diff --git a/.inductor_cache/aotautograd/adltybgxfwet44fxgvxrgh44tbc7yt3e4xhsp7m3f5flx7joml2u/7opxuafino42s6lh5klnmstpbvi2qf3eetdct2ygxeqebuyw6ci b/.inductor_cache/aotautograd/adltybgxfwet44fxgvxrgh44tbc7yt3e4xhsp7m3f5flx7joml2u/7opxuafino42s6lh5klnmstpbvi2qf3eetdct2ygxeqebuyw6ci new file mode 100644 index 0000000000000000000000000000000000000000..61973dcc11429f0e770762454401bfe48b9cf4e0 Binary files /dev/null and b/.inductor_cache/aotautograd/adltybgxfwet44fxgvxrgh44tbc7yt3e4xhsp7m3f5flx7joml2u/7opxuafino42s6lh5klnmstpbvi2qf3eetdct2ygxeqebuyw6ci differ diff --git a/.inductor_cache/aotautograd/admj6o7dj7pkv5bu22ekv2xe6nlzuhrhvjj4zxqbz2yuqbpjud3p/t3nnewk5xzrrl2fgmopwk3fu2qe62l6mtubpns3kynriab3xhf6 b/.inductor_cache/aotautograd/admj6o7dj7pkv5bu22ekv2xe6nlzuhrhvjj4zxqbz2yuqbpjud3p/t3nnewk5xzrrl2fgmopwk3fu2qe62l6mtubpns3kynriab3xhf6 new file mode 100644 index 0000000000000000000000000000000000000000..9ccf4e5b22ca7f0699300a770bc44ae9de4c0e76 Binary files /dev/null and b/.inductor_cache/aotautograd/admj6o7dj7pkv5bu22ekv2xe6nlzuhrhvjj4zxqbz2yuqbpjud3p/t3nnewk5xzrrl2fgmopwk3fu2qe62l6mtubpns3kynriab3xhf6 differ diff --git a/.inductor_cache/aotautograd/adwhs4g6poa4zc4rtmtmyt3zhtynr3scbmiywnmffcv6s4q5rep4/vr5geib4ao2vrxiabexgvssmuhqwcjtpj3c4yw5apmgmzjenn75 b/.inductor_cache/aotautograd/adwhs4g6poa4zc4rtmtmyt3zhtynr3scbmiywnmffcv6s4q5rep4/vr5geib4ao2vrxiabexgvssmuhqwcjtpj3c4yw5apmgmzjenn75 new file mode 100644 index 0000000000000000000000000000000000000000..2fd97b876efb3053b31f03ba744391656f2e9d06 Binary files /dev/null and b/.inductor_cache/aotautograd/adwhs4g6poa4zc4rtmtmyt3zhtynr3scbmiywnmffcv6s4q5rep4/vr5geib4ao2vrxiabexgvssmuhqwcjtpj3c4yw5apmgmzjenn75 differ diff --git a/.inductor_cache/aotautograd/adzzme6yc2xvh5nucdgyx7y3xezw63ki2cls2ter6ium326bdj65/2oea7ru25qpfk27x3d6i72lbkme4bue7g7g5sri2os6kgk37gvb b/.inductor_cache/aotautograd/adzzme6yc2xvh5nucdgyx7y3xezw63ki2cls2ter6ium326bdj65/2oea7ru25qpfk27x3d6i72lbkme4bue7g7g5sri2os6kgk37gvb new file mode 100644 index 0000000000000000000000000000000000000000..f0a7911c7038deb99aa9b3a6e23240aa673c1202 Binary files /dev/null and b/.inductor_cache/aotautograd/adzzme6yc2xvh5nucdgyx7y3xezw63ki2cls2ter6ium326bdj65/2oea7ru25qpfk27x3d6i72lbkme4bue7g7g5sri2os6kgk37gvb differ diff --git a/.inductor_cache/aotautograd/aeawmpwo4iysipacz2bhhuz4q7rlcsxrgwxaw5ocjijkacvynzbg/2wgblpbqnv3rv32fq5z5i5gcm2e2ty7fbbxmuvlpfnxf3oqd6in b/.inductor_cache/aotautograd/aeawmpwo4iysipacz2bhhuz4q7rlcsxrgwxaw5ocjijkacvynzbg/2wgblpbqnv3rv32fq5z5i5gcm2e2ty7fbbxmuvlpfnxf3oqd6in new file mode 100644 index 0000000000000000000000000000000000000000..412cfef1c011ef4006799a178f212e52a666e1be Binary files /dev/null and b/.inductor_cache/aotautograd/aeawmpwo4iysipacz2bhhuz4q7rlcsxrgwxaw5ocjijkacvynzbg/2wgblpbqnv3rv32fq5z5i5gcm2e2ty7fbbxmuvlpfnxf3oqd6in differ diff --git a/.inductor_cache/aotautograd/aephk4qeujcxvmy3cckbzjuddhozwbxayf5ol7xxbp2zvi2l52mx/uu44gqmgnsgl7nk5saibncmolyxmfynhorpaanb67ujbb2arxae b/.inductor_cache/aotautograd/aephk4qeujcxvmy3cckbzjuddhozwbxayf5ol7xxbp2zvi2l52mx/uu44gqmgnsgl7nk5saibncmolyxmfynhorpaanb67ujbb2arxae new file mode 100644 index 0000000000000000000000000000000000000000..4c5ee2036ab880877b05051df2db08e0d3bc4bb7 Binary files /dev/null and b/.inductor_cache/aotautograd/aephk4qeujcxvmy3cckbzjuddhozwbxayf5ol7xxbp2zvi2l52mx/uu44gqmgnsgl7nk5saibncmolyxmfynhorpaanb67ujbb2arxae differ diff --git a/.inductor_cache/aotautograd/aet2xuyt27ektuubwpsohlxt46onio6d4b3sl22q5urr3q54qf62/ntaj77pbbrgkiyy23e2yx5sdd6t3toavzwhjb5ctp5pguqmkzym b/.inductor_cache/aotautograd/aet2xuyt27ektuubwpsohlxt46onio6d4b3sl22q5urr3q54qf62/ntaj77pbbrgkiyy23e2yx5sdd6t3toavzwhjb5ctp5pguqmkzym new file mode 100644 index 0000000000000000000000000000000000000000..fe523c865bdff784a121ff340cf4264504bf28e8 Binary files /dev/null and b/.inductor_cache/aotautograd/aet2xuyt27ektuubwpsohlxt46onio6d4b3sl22q5urr3q54qf62/ntaj77pbbrgkiyy23e2yx5sdd6t3toavzwhjb5ctp5pguqmkzym differ diff --git a/.inductor_cache/aotautograd/afe6goqthg4uy46dka3mvezjg53raalp3ggpu4albne6gdk3ngji/dimxczkc5msptdt4clhgbu7aif73rluj27u7s3i3w3br2gmchqe b/.inductor_cache/aotautograd/afe6goqthg4uy46dka3mvezjg53raalp3ggpu4albne6gdk3ngji/dimxczkc5msptdt4clhgbu7aif73rluj27u7s3i3w3br2gmchqe new file mode 100644 index 0000000000000000000000000000000000000000..1e0d52145af330884766196a5aa4531f686f244b Binary files /dev/null and b/.inductor_cache/aotautograd/afe6goqthg4uy46dka3mvezjg53raalp3ggpu4albne6gdk3ngji/dimxczkc5msptdt4clhgbu7aif73rluj27u7s3i3w3br2gmchqe differ diff --git a/.inductor_cache/aotautograd/ag2npzurigr4bilf4cqswxkwr72edtfebikgvwe75majvmx6gdng/kcgopkgfmjyzcg4tons3ejtnlqqna3tzqd2wfkuyxyrrbv2pll2 b/.inductor_cache/aotautograd/ag2npzurigr4bilf4cqswxkwr72edtfebikgvwe75majvmx6gdng/kcgopkgfmjyzcg4tons3ejtnlqqna3tzqd2wfkuyxyrrbv2pll2 new file mode 100644 index 0000000000000000000000000000000000000000..ae1fb29856602f000a87b1a497e10eba733b129a Binary files /dev/null and b/.inductor_cache/aotautograd/ag2npzurigr4bilf4cqswxkwr72edtfebikgvwe75majvmx6gdng/kcgopkgfmjyzcg4tons3ejtnlqqna3tzqd2wfkuyxyrrbv2pll2 differ diff --git a/.inductor_cache/aotautograd/agddqnjmimpkgp5qgq6rmnngrebbd6fgpcjdt5q2gg266ssobjws/ieuze2uylzvroccgdls2yorgpmxdhf5tsryirazvzayzlw5qqhs b/.inductor_cache/aotautograd/agddqnjmimpkgp5qgq6rmnngrebbd6fgpcjdt5q2gg266ssobjws/ieuze2uylzvroccgdls2yorgpmxdhf5tsryirazvzayzlw5qqhs new file mode 100644 index 0000000000000000000000000000000000000000..a5eaf7087464283baf5f2b90c3a4abd9c2f7b029 Binary files /dev/null and b/.inductor_cache/aotautograd/agddqnjmimpkgp5qgq6rmnngrebbd6fgpcjdt5q2gg266ssobjws/ieuze2uylzvroccgdls2yorgpmxdhf5tsryirazvzayzlw5qqhs differ diff --git a/.inductor_cache/aotautograd/ageyztbgqnrmxaax3zrqcyxdoxtg5dgjxn4v5mjruevcg3awf5pz/s3szxb5lq6ckd7hcpfmafnsxx5c6ob6gmclltroxb2jn4lh76hi b/.inductor_cache/aotautograd/ageyztbgqnrmxaax3zrqcyxdoxtg5dgjxn4v5mjruevcg3awf5pz/s3szxb5lq6ckd7hcpfmafnsxx5c6ob6gmclltroxb2jn4lh76hi new file mode 100644 index 0000000000000000000000000000000000000000..256e71698a54c4f5feff7f0e2ae0f48d10cbdb6c Binary files /dev/null and b/.inductor_cache/aotautograd/ageyztbgqnrmxaax3zrqcyxdoxtg5dgjxn4v5mjruevcg3awf5pz/s3szxb5lq6ckd7hcpfmafnsxx5c6ob6gmclltroxb2jn4lh76hi differ diff --git a/.inductor_cache/aotautograd/agmfpptzzksse5vp6wpbsjqbammnmdkkppfzrkpqz7djdvvclrlo/2rlevqvdzsp4ca2wpnwkniwl4jjdhequtjaxeisgn2kfrtl4pi4 b/.inductor_cache/aotautograd/agmfpptzzksse5vp6wpbsjqbammnmdkkppfzrkpqz7djdvvclrlo/2rlevqvdzsp4ca2wpnwkniwl4jjdhequtjaxeisgn2kfrtl4pi4 new file mode 100644 index 0000000000000000000000000000000000000000..21231505fe0b81b80274abde1d4a1ee6e87745cf Binary files /dev/null and b/.inductor_cache/aotautograd/agmfpptzzksse5vp6wpbsjqbammnmdkkppfzrkpqz7djdvvclrlo/2rlevqvdzsp4ca2wpnwkniwl4jjdhequtjaxeisgn2kfrtl4pi4 differ diff --git a/.inductor_cache/aotautograd/aguuargxxuwbofwmgp7yts7slpviv6gkmiy4hoq2t5rrwjxtr4nw/bquwagyzccok5eg65bdkxy6plhgka6fgy2n4okloqm4vudxqill b/.inductor_cache/aotautograd/aguuargxxuwbofwmgp7yts7slpviv6gkmiy4hoq2t5rrwjxtr4nw/bquwagyzccok5eg65bdkxy6plhgka6fgy2n4okloqm4vudxqill new file mode 100644 index 0000000000000000000000000000000000000000..b50fee4ce04447b0b6967752f79d11382081b282 Binary files /dev/null and b/.inductor_cache/aotautograd/aguuargxxuwbofwmgp7yts7slpviv6gkmiy4hoq2t5rrwjxtr4nw/bquwagyzccok5eg65bdkxy6plhgka6fgy2n4okloqm4vudxqill differ diff --git a/.inductor_cache/aotautograd/ah7sda7uiu7gnua7vihdb6pqwq7lorfyn6jgwtkp4gjdyakxxuo2/utsvwwkdkxxwqha6witfhysjq7ci6bhcbk4gyzlvdoawbchf7l4 b/.inductor_cache/aotautograd/ah7sda7uiu7gnua7vihdb6pqwq7lorfyn6jgwtkp4gjdyakxxuo2/utsvwwkdkxxwqha6witfhysjq7ci6bhcbk4gyzlvdoawbchf7l4 new file mode 100644 index 0000000000000000000000000000000000000000..893438bc6f38919d769bbbadb4ed8984a4aad586 Binary files /dev/null and b/.inductor_cache/aotautograd/ah7sda7uiu7gnua7vihdb6pqwq7lorfyn6jgwtkp4gjdyakxxuo2/utsvwwkdkxxwqha6witfhysjq7ci6bhcbk4gyzlvdoawbchf7l4 differ diff --git a/.inductor_cache/aotautograd/ahfaizzyz3kwbujg626wdexmehddetiih4kygk6zr4lc6bbacsq5/k3w4wcuxq6fnlt4cq62rphzg3xe43tkt2wr4bjcem26ya2papx2 b/.inductor_cache/aotautograd/ahfaizzyz3kwbujg626wdexmehddetiih4kygk6zr4lc6bbacsq5/k3w4wcuxq6fnlt4cq62rphzg3xe43tkt2wr4bjcem26ya2papx2 new file mode 100644 index 0000000000000000000000000000000000000000..4fde4ff688bafc19ceb9a7a755df680ee6b1ee2b Binary files /dev/null and b/.inductor_cache/aotautograd/ahfaizzyz3kwbujg626wdexmehddetiih4kygk6zr4lc6bbacsq5/k3w4wcuxq6fnlt4cq62rphzg3xe43tkt2wr4bjcem26ya2papx2 differ diff --git a/.inductor_cache/aotautograd/ahgdm3aeg3pocwfevrooxetemcxedc7zdcy72g3ui3jinlmmaqm7/7r2egtrvugrttu4xlx6nx3f3o5g2l327skz25prxucydpezd2km b/.inductor_cache/aotautograd/ahgdm3aeg3pocwfevrooxetemcxedc7zdcy72g3ui3jinlmmaqm7/7r2egtrvugrttu4xlx6nx3f3o5g2l327skz25prxucydpezd2km new file mode 100644 index 0000000000000000000000000000000000000000..1050616b85740d06880cec2ac2308fa11ac4e6c8 Binary files /dev/null and b/.inductor_cache/aotautograd/ahgdm3aeg3pocwfevrooxetemcxedc7zdcy72g3ui3jinlmmaqm7/7r2egtrvugrttu4xlx6nx3f3o5g2l327skz25prxucydpezd2km differ diff --git a/.inductor_cache/aotautograd/ahgxzyd57hx5hlrndelfpp6aomhb2yem2ththdi2j7eabiwkna4m/acittqubwwylz6f7puoasuvdrcrwfqkcyuym2p6x4jl6ay6zdrg b/.inductor_cache/aotautograd/ahgxzyd57hx5hlrndelfpp6aomhb2yem2ththdi2j7eabiwkna4m/acittqubwwylz6f7puoasuvdrcrwfqkcyuym2p6x4jl6ay6zdrg new file mode 100644 index 0000000000000000000000000000000000000000..325803315e4380317b301bf1a40db8bd4e6758ed Binary files /dev/null and b/.inductor_cache/aotautograd/ahgxzyd57hx5hlrndelfpp6aomhb2yem2ththdi2j7eabiwkna4m/acittqubwwylz6f7puoasuvdrcrwfqkcyuym2p6x4jl6ay6zdrg differ diff --git a/.inductor_cache/aotautograd/ahn6mo3b2t5zin3yyxalord3xyavvlkang75zg3zk2lpfoos6xl2/ptdyytrviy75c7yu6h77llpyl4cy6xpgs3mu4ixncvrcjkbxgi7 b/.inductor_cache/aotautograd/ahn6mo3b2t5zin3yyxalord3xyavvlkang75zg3zk2lpfoos6xl2/ptdyytrviy75c7yu6h77llpyl4cy6xpgs3mu4ixncvrcjkbxgi7 new file mode 100644 index 0000000000000000000000000000000000000000..2a2b3b2a62804a828dfbf60179ef2201b55fd288 Binary files /dev/null and b/.inductor_cache/aotautograd/ahn6mo3b2t5zin3yyxalord3xyavvlkang75zg3zk2lpfoos6xl2/ptdyytrviy75c7yu6h77llpyl4cy6xpgs3mu4ixncvrcjkbxgi7 differ diff --git a/.inductor_cache/aotautograd/ahncmhlbokmtrp66tup3bgwkrqsfti7lxqqskasnbpkql43cfcds/nzcq2mfnyubkvtarg2ze24otrbvv3wgmog7jzewf3dsp32opp3y b/.inductor_cache/aotautograd/ahncmhlbokmtrp66tup3bgwkrqsfti7lxqqskasnbpkql43cfcds/nzcq2mfnyubkvtarg2ze24otrbvv3wgmog7jzewf3dsp32opp3y new file mode 100644 index 0000000000000000000000000000000000000000..a2445c5038f51413db4af25c90ebc85ebdb4dd0c Binary files /dev/null and b/.inductor_cache/aotautograd/ahncmhlbokmtrp66tup3bgwkrqsfti7lxqqskasnbpkql43cfcds/nzcq2mfnyubkvtarg2ze24otrbvv3wgmog7jzewf3dsp32opp3y differ diff --git a/.inductor_cache/aotautograd/aigbynqwdelv7ewghahieyvd2xm2jodawdcnbwkbrl2rbwulkklm/qdiyabuow25ls4afrsogk3uigwketljc6lovt2aye7sswuwkdp2 b/.inductor_cache/aotautograd/aigbynqwdelv7ewghahieyvd2xm2jodawdcnbwkbrl2rbwulkklm/qdiyabuow25ls4afrsogk3uigwketljc6lovt2aye7sswuwkdp2 new file mode 100644 index 0000000000000000000000000000000000000000..5db0b1b2c8c62566cfdc906bafb35d5b1b0b3ff6 Binary files /dev/null and b/.inductor_cache/aotautograd/aigbynqwdelv7ewghahieyvd2xm2jodawdcnbwkbrl2rbwulkklm/qdiyabuow25ls4afrsogk3uigwketljc6lovt2aye7sswuwkdp2 differ diff --git a/.inductor_cache/aotautograd/aitt3dofl4xnbch7dkue3zj6locqeoyndwbjzczmmc7sva5tb3gc/voblyktrbag6fu32wgu7ybc5khse2wl4g4s6zs47ad26fal2mfn b/.inductor_cache/aotautograd/aitt3dofl4xnbch7dkue3zj6locqeoyndwbjzczmmc7sva5tb3gc/voblyktrbag6fu32wgu7ybc5khse2wl4g4s6zs47ad26fal2mfn new file mode 100644 index 0000000000000000000000000000000000000000..2297749663c9f627336e0cdd405dbad716c8fea7 Binary files /dev/null and b/.inductor_cache/aotautograd/aitt3dofl4xnbch7dkue3zj6locqeoyndwbjzczmmc7sva5tb3gc/voblyktrbag6fu32wgu7ybc5khse2wl4g4s6zs47ad26fal2mfn differ diff --git a/.inductor_cache/aotautograd/aj4eih2k7vbynedy36xtggjgbtexrlc7cr3kovvn2iyj453ld5o3/hi7n5m2v7luhpvlxeq5bxm5e5kijgyvfai2jsrmmsjw2g4qucbz b/.inductor_cache/aotautograd/aj4eih2k7vbynedy36xtggjgbtexrlc7cr3kovvn2iyj453ld5o3/hi7n5m2v7luhpvlxeq5bxm5e5kijgyvfai2jsrmmsjw2g4qucbz new file mode 100644 index 0000000000000000000000000000000000000000..13c54a250aef11d8dfaf75107b486a22097cfd62 Binary files /dev/null and b/.inductor_cache/aotautograd/aj4eih2k7vbynedy36xtggjgbtexrlc7cr3kovvn2iyj453ld5o3/hi7n5m2v7luhpvlxeq5bxm5e5kijgyvfai2jsrmmsjw2g4qucbz differ diff --git a/.inductor_cache/aotautograd/ajclnkujlzdyomgyc775m42cn5gn5jtoeekq5z4d5ednr5houjgc/i2dfsmpfu37uvcxg4f22ew6okdh6cdsdip5yt73xjun2ajzlflx b/.inductor_cache/aotautograd/ajclnkujlzdyomgyc775m42cn5gn5jtoeekq5z4d5ednr5houjgc/i2dfsmpfu37uvcxg4f22ew6okdh6cdsdip5yt73xjun2ajzlflx new file mode 100644 index 0000000000000000000000000000000000000000..014d845fdc09d1e39dc8ae64a086fd8d26e645d5 Binary files /dev/null and b/.inductor_cache/aotautograd/ajclnkujlzdyomgyc775m42cn5gn5jtoeekq5z4d5ednr5houjgc/i2dfsmpfu37uvcxg4f22ew6okdh6cdsdip5yt73xjun2ajzlflx differ diff --git a/.inductor_cache/aotautograd/ajcoqwu6ave6qj2i5pyok4f562kkx2bsstt7id5kfxuggeayq3h7/3bnprybwxsyp7rpcvsvdlbzcsvwmzacdcroub2xssyyheacjrfh b/.inductor_cache/aotautograd/ajcoqwu6ave6qj2i5pyok4f562kkx2bsstt7id5kfxuggeayq3h7/3bnprybwxsyp7rpcvsvdlbzcsvwmzacdcroub2xssyyheacjrfh new file mode 100644 index 0000000000000000000000000000000000000000..334e085578aee43964c47d7bab53032c5e1c31f7 Binary files /dev/null and b/.inductor_cache/aotautograd/ajcoqwu6ave6qj2i5pyok4f562kkx2bsstt7id5kfxuggeayq3h7/3bnprybwxsyp7rpcvsvdlbzcsvwmzacdcroub2xssyyheacjrfh differ diff --git a/.inductor_cache/aotautograd/ajlfi4qvxgfcdtvm7f3qf6lo3gosod3c2cmtthbz4guj4jadfm5v/4fqbaanq5ztj2embiu3oj5rqlqdq3w75cynsotzohejalkjhcrt b/.inductor_cache/aotautograd/ajlfi4qvxgfcdtvm7f3qf6lo3gosod3c2cmtthbz4guj4jadfm5v/4fqbaanq5ztj2embiu3oj5rqlqdq3w75cynsotzohejalkjhcrt new file mode 100644 index 0000000000000000000000000000000000000000..e8eceed3785ea7c31bcc8190f5340ead0b0f1549 Binary files /dev/null and b/.inductor_cache/aotautograd/ajlfi4qvxgfcdtvm7f3qf6lo3gosod3c2cmtthbz4guj4jadfm5v/4fqbaanq5ztj2embiu3oj5rqlqdq3w75cynsotzohejalkjhcrt differ diff --git a/.inductor_cache/aotautograd/akgnqvnyttsy4cdusvzmdahbcglbihtu3w7yyejswvpsqae2j75y/c3gd3kez5lcdcacymjrerd43cebmorkqgitjykspu5fkcdhm37q b/.inductor_cache/aotautograd/akgnqvnyttsy4cdusvzmdahbcglbihtu3w7yyejswvpsqae2j75y/c3gd3kez5lcdcacymjrerd43cebmorkqgitjykspu5fkcdhm37q new file mode 100644 index 0000000000000000000000000000000000000000..88eab2c53f6759ab99c3399eb0fa74c1e5f46a3a Binary files /dev/null and b/.inductor_cache/aotautograd/akgnqvnyttsy4cdusvzmdahbcglbihtu3w7yyejswvpsqae2j75y/c3gd3kez5lcdcacymjrerd43cebmorkqgitjykspu5fkcdhm37q differ diff --git a/.inductor_cache/aotautograd/albg4wmxhdknokqta367vxe6amciionzscfj64nsxlfaj3ac6lgb/2sbf56eedjpppbeocxfp3k2c4exjoeskybot4d6hun3z7cbmnn3 b/.inductor_cache/aotautograd/albg4wmxhdknokqta367vxe6amciionzscfj64nsxlfaj3ac6lgb/2sbf56eedjpppbeocxfp3k2c4exjoeskybot4d6hun3z7cbmnn3 new file mode 100644 index 0000000000000000000000000000000000000000..7be5525d465a0b6b67338e1a92226fe70c5b45c0 Binary files /dev/null and b/.inductor_cache/aotautograd/albg4wmxhdknokqta367vxe6amciionzscfj64nsxlfaj3ac6lgb/2sbf56eedjpppbeocxfp3k2c4exjoeskybot4d6hun3z7cbmnn3 differ diff --git a/.inductor_cache/aotautograd/algfbtlytwsmynz4ctumiwv6thtpoudqquykivqtxceeelgabi53/thfvuc5cpzd7sr752ikayhwzpqmkrmk2bqynny42xickwnadqjh b/.inductor_cache/aotautograd/algfbtlytwsmynz4ctumiwv6thtpoudqquykivqtxceeelgabi53/thfvuc5cpzd7sr752ikayhwzpqmkrmk2bqynny42xickwnadqjh new file mode 100644 index 0000000000000000000000000000000000000000..8b396d1558b634a0ed3f2df5f8e2f07a7a96e701 Binary files /dev/null and b/.inductor_cache/aotautograd/algfbtlytwsmynz4ctumiwv6thtpoudqquykivqtxceeelgabi53/thfvuc5cpzd7sr752ikayhwzpqmkrmk2bqynny42xickwnadqjh differ diff --git a/.inductor_cache/aotautograd/allazf6tlftooofx57t62xf3zb6rl3mdpqi6d5az23e3htdz62a2/sv7xnhhgyf7yn3vvmkyw7oijiuobtms4aohelmmcay7xsxm7wvw b/.inductor_cache/aotautograd/allazf6tlftooofx57t62xf3zb6rl3mdpqi6d5az23e3htdz62a2/sv7xnhhgyf7yn3vvmkyw7oijiuobtms4aohelmmcay7xsxm7wvw new file mode 100644 index 0000000000000000000000000000000000000000..ce4ce0415c3a55804851125a3b0d0078eaf3fe46 Binary files /dev/null and b/.inductor_cache/aotautograd/allazf6tlftooofx57t62xf3zb6rl3mdpqi6d5az23e3htdz62a2/sv7xnhhgyf7yn3vvmkyw7oijiuobtms4aohelmmcay7xsxm7wvw differ diff --git a/.inductor_cache/aotautograd/amdcubev36ybwfyheyxdacbgqinxfww2layscom4v4fk2tcnoeke/lfwtyumyc3miy3imjqbteqkh34iexll5j5chmgdnc5vdkmxlwge b/.inductor_cache/aotautograd/amdcubev36ybwfyheyxdacbgqinxfww2layscom4v4fk2tcnoeke/lfwtyumyc3miy3imjqbteqkh34iexll5j5chmgdnc5vdkmxlwge new file mode 100644 index 0000000000000000000000000000000000000000..9df2e022202058aaf389bd8c8673861592f60a26 Binary files /dev/null and b/.inductor_cache/aotautograd/amdcubev36ybwfyheyxdacbgqinxfww2layscom4v4fk2tcnoeke/lfwtyumyc3miy3imjqbteqkh34iexll5j5chmgdnc5vdkmxlwge differ diff --git a/.inductor_cache/aotautograd/amjd76pgdtngaitx54zlasv4ox4nczf7pqz5tfv77nhw3u32ctxz/k23lev42arkh4j2vdtygjafk4fljl4rsjhwb3fi4hwp3rswrd7j b/.inductor_cache/aotautograd/amjd76pgdtngaitx54zlasv4ox4nczf7pqz5tfv77nhw3u32ctxz/k23lev42arkh4j2vdtygjafk4fljl4rsjhwb3fi4hwp3rswrd7j new file mode 100644 index 0000000000000000000000000000000000000000..74a35afce11f4debb120de6740bb939b38909bf8 Binary files /dev/null and b/.inductor_cache/aotautograd/amjd76pgdtngaitx54zlasv4ox4nczf7pqz5tfv77nhw3u32ctxz/k23lev42arkh4j2vdtygjafk4fljl4rsjhwb3fi4hwp3rswrd7j differ diff --git a/.inductor_cache/aotautograd/anmxriuiagkresccftf27cjw7pxfjxmmbtlmgpb4rfvbkdrs3gqx/bqcbxt2yncj4yxblspfiz24iqnq3y2qmgfjauzb546lzke2js3p b/.inductor_cache/aotautograd/anmxriuiagkresccftf27cjw7pxfjxmmbtlmgpb4rfvbkdrs3gqx/bqcbxt2yncj4yxblspfiz24iqnq3y2qmgfjauzb546lzke2js3p new file mode 100644 index 0000000000000000000000000000000000000000..46e4e87cd027d87284b8cebe84899293bf20d24f Binary files /dev/null and b/.inductor_cache/aotautograd/anmxriuiagkresccftf27cjw7pxfjxmmbtlmgpb4rfvbkdrs3gqx/bqcbxt2yncj4yxblspfiz24iqnq3y2qmgfjauzb546lzke2js3p differ diff --git a/.inductor_cache/aotautograd/anx2oiptnpfthrwo6rj5fhgspsiarayzojvescxdxgfudcj2mcod/uesaqhghg2ewacf24axekr42u5zwch6f6unw5z3xpvyus25z632 b/.inductor_cache/aotautograd/anx2oiptnpfthrwo6rj5fhgspsiarayzojvescxdxgfudcj2mcod/uesaqhghg2ewacf24axekr42u5zwch6f6unw5z3xpvyus25z632 new file mode 100644 index 0000000000000000000000000000000000000000..bf42aac11a68ed15037ce322b56bf93fd5603dbf Binary files /dev/null and b/.inductor_cache/aotautograd/anx2oiptnpfthrwo6rj5fhgspsiarayzojvescxdxgfudcj2mcod/uesaqhghg2ewacf24axekr42u5zwch6f6unw5z3xpvyus25z632 differ diff --git a/.inductor_cache/aotautograd/anxypy3mnmh3gh3pyz4saegohkhmytv45vfgffkq5ks4mfclyxwf/phglnqghbwjmpuzpez3lfyp76kog5jukrj4newg7j5m6pqhjl4m b/.inductor_cache/aotautograd/anxypy3mnmh3gh3pyz4saegohkhmytv45vfgffkq5ks4mfclyxwf/phglnqghbwjmpuzpez3lfyp76kog5jukrj4newg7j5m6pqhjl4m new file mode 100644 index 0000000000000000000000000000000000000000..fd96e84a3b852f3ffc23e7aeff21c81d2bac2908 Binary files /dev/null and b/.inductor_cache/aotautograd/anxypy3mnmh3gh3pyz4saegohkhmytv45vfgffkq5ks4mfclyxwf/phglnqghbwjmpuzpez3lfyp76kog5jukrj4newg7j5m6pqhjl4m differ diff --git a/.inductor_cache/aotautograd/ao3dmsbiwzuepfk7zwcuqp7qiuipjmikiflwmcieyba4pqnoczh2/hij4bgsshqm6njqveeky65rdbkzdu2wjgve5r73qqqyzbs45gox b/.inductor_cache/aotautograd/ao3dmsbiwzuepfk7zwcuqp7qiuipjmikiflwmcieyba4pqnoczh2/hij4bgsshqm6njqveeky65rdbkzdu2wjgve5r73qqqyzbs45gox new file mode 100644 index 0000000000000000000000000000000000000000..af9772ca3b61db16944066b34067aa04d31a84c7 Binary files /dev/null and b/.inductor_cache/aotautograd/ao3dmsbiwzuepfk7zwcuqp7qiuipjmikiflwmcieyba4pqnoczh2/hij4bgsshqm6njqveeky65rdbkzdu2wjgve5r73qqqyzbs45gox differ diff --git a/.inductor_cache/aotautograd/ao6f3rwkabjhxisdomjviqiixkc2gcl7gdu4bcaa36cfbjcmzfho/uzck36jxwrlpodnekd7oz5zedt74wifi2thno2jc4zn3ofgzdpr b/.inductor_cache/aotautograd/ao6f3rwkabjhxisdomjviqiixkc2gcl7gdu4bcaa36cfbjcmzfho/uzck36jxwrlpodnekd7oz5zedt74wifi2thno2jc4zn3ofgzdpr new file mode 100644 index 0000000000000000000000000000000000000000..017f2be807a9e4e7d223195ca9b2513ebceacf10 Binary files /dev/null and b/.inductor_cache/aotautograd/ao6f3rwkabjhxisdomjviqiixkc2gcl7gdu4bcaa36cfbjcmzfho/uzck36jxwrlpodnekd7oz5zedt74wifi2thno2jc4zn3ofgzdpr differ diff --git a/.inductor_cache/aotautograd/ao7ppoxzhyohxwppe6erzzu7rhb6jggwuwirubehua46pzrw6hil/xs7gvkad7hhugqgpj4qmpfm7ehx4jcbz4xrtbw22tzcvn6a6smu b/.inductor_cache/aotautograd/ao7ppoxzhyohxwppe6erzzu7rhb6jggwuwirubehua46pzrw6hil/xs7gvkad7hhugqgpj4qmpfm7ehx4jcbz4xrtbw22tzcvn6a6smu new file mode 100644 index 0000000000000000000000000000000000000000..2a6b409818bc0ac4ae539d144902ada20a619c89 Binary files /dev/null and b/.inductor_cache/aotautograd/ao7ppoxzhyohxwppe6erzzu7rhb6jggwuwirubehua46pzrw6hil/xs7gvkad7hhugqgpj4qmpfm7ehx4jcbz4xrtbw22tzcvn6a6smu differ diff --git a/.inductor_cache/aotautograd/aoiboo57jha6mudztaliiatv3wrvhtoewf35cd34qjzobdfokdgp/zrkvaghzawpt52ghsvzyiowtwb4xzb4v2tk7dbqqqx3mc3dalm6 b/.inductor_cache/aotautograd/aoiboo57jha6mudztaliiatv3wrvhtoewf35cd34qjzobdfokdgp/zrkvaghzawpt52ghsvzyiowtwb4xzb4v2tk7dbqqqx3mc3dalm6 new file mode 100644 index 0000000000000000000000000000000000000000..eca1fbedccf1913e3f9d9d860a931ac11c2fed58 Binary files /dev/null and b/.inductor_cache/aotautograd/aoiboo57jha6mudztaliiatv3wrvhtoewf35cd34qjzobdfokdgp/zrkvaghzawpt52ghsvzyiowtwb4xzb4v2tk7dbqqqx3mc3dalm6 differ diff --git a/.inductor_cache/aotautograd/aoixwodfewjth2kbhspq5m5ii2rbmzgi4vxsdyvcggqnuj7b2u6e/3sa6p6rc7rqp2zhai4sz723pv4arfyhgiodbu6v5cl37zw3culh b/.inductor_cache/aotautograd/aoixwodfewjth2kbhspq5m5ii2rbmzgi4vxsdyvcggqnuj7b2u6e/3sa6p6rc7rqp2zhai4sz723pv4arfyhgiodbu6v5cl37zw3culh new file mode 100644 index 0000000000000000000000000000000000000000..44af586a6f86542a3537543ed9d9da683396efe6 Binary files /dev/null and b/.inductor_cache/aotautograd/aoixwodfewjth2kbhspq5m5ii2rbmzgi4vxsdyvcggqnuj7b2u6e/3sa6p6rc7rqp2zhai4sz723pv4arfyhgiodbu6v5cl37zw3culh differ diff --git a/.inductor_cache/aotautograd/aom3svejm3fliirqwfug5w6m7noj3tkfjr4qc326vbrdlc2p3eyk/h6esqkfkunpvppghrouhgh4gcgz2jxk2lwe42yxwb47ykfnneu2 b/.inductor_cache/aotautograd/aom3svejm3fliirqwfug5w6m7noj3tkfjr4qc326vbrdlc2p3eyk/h6esqkfkunpvppghrouhgh4gcgz2jxk2lwe42yxwb47ykfnneu2 new file mode 100644 index 0000000000000000000000000000000000000000..c7d3ae50d49647331825e9284cfb31bd42d36d01 Binary files /dev/null and b/.inductor_cache/aotautograd/aom3svejm3fliirqwfug5w6m7noj3tkfjr4qc326vbrdlc2p3eyk/h6esqkfkunpvppghrouhgh4gcgz2jxk2lwe42yxwb47ykfnneu2 differ diff --git a/.inductor_cache/aotautograd/ap3qoz7owvgs37mhtx5zusnz5ggbbq4oipuugdtdqdzq5pvj2ybm/yfzcfg473p25r2oknxignc6somwo2bafz4u4ect22vpfr2ef7g2 b/.inductor_cache/aotautograd/ap3qoz7owvgs37mhtx5zusnz5ggbbq4oipuugdtdqdzq5pvj2ybm/yfzcfg473p25r2oknxignc6somwo2bafz4u4ect22vpfr2ef7g2 new file mode 100644 index 0000000000000000000000000000000000000000..c4224c32dc7c1922843237e587464dc83aa76af4 Binary files /dev/null and b/.inductor_cache/aotautograd/ap3qoz7owvgs37mhtx5zusnz5ggbbq4oipuugdtdqdzq5pvj2ybm/yfzcfg473p25r2oknxignc6somwo2bafz4u4ect22vpfr2ef7g2 differ diff --git a/.inductor_cache/aotautograd/apafqczb4fhaxhmol3cq6izs5d3b6ubgk5hed4rh6shsujq5zxfr/w377plgvldro23fyqftybv3clz72jnuhc5ouwtpsfwjiuyw6fgw b/.inductor_cache/aotautograd/apafqczb4fhaxhmol3cq6izs5d3b6ubgk5hed4rh6shsujq5zxfr/w377plgvldro23fyqftybv3clz72jnuhc5ouwtpsfwjiuyw6fgw new file mode 100644 index 0000000000000000000000000000000000000000..6a907db3251e961a672b6d9c3907a851f3cce251 Binary files /dev/null and b/.inductor_cache/aotautograd/apafqczb4fhaxhmol3cq6izs5d3b6ubgk5hed4rh6shsujq5zxfr/w377plgvldro23fyqftybv3clz72jnuhc5ouwtpsfwjiuyw6fgw differ diff --git a/.inductor_cache/aotautograd/apokxpd4tdr4fe6l3u6hpcykvqkrxqunawbpfw5glk3dvj336wmb/t4xkjiwbyzswsrvjomczcmh3tri2gihu4txokdreopkgxmmhzla b/.inductor_cache/aotautograd/apokxpd4tdr4fe6l3u6hpcykvqkrxqunawbpfw5glk3dvj336wmb/t4xkjiwbyzswsrvjomczcmh3tri2gihu4txokdreopkgxmmhzla new file mode 100644 index 0000000000000000000000000000000000000000..27068b5b67735ab028f72bbfab2e3b737950503c Binary files /dev/null and b/.inductor_cache/aotautograd/apokxpd4tdr4fe6l3u6hpcykvqkrxqunawbpfw5glk3dvj336wmb/t4xkjiwbyzswsrvjomczcmh3tri2gihu4txokdreopkgxmmhzla differ diff --git a/.inductor_cache/aotautograd/apzbkbwaap6ti4egbtmwkplqlw3wexqgmo6dzef5zs3qhyaxxjqw/cqdmfhqen4t77wygizolw75tnyjztqiib5bmrsja7dniqqf7lrl b/.inductor_cache/aotautograd/apzbkbwaap6ti4egbtmwkplqlw3wexqgmo6dzef5zs3qhyaxxjqw/cqdmfhqen4t77wygizolw75tnyjztqiib5bmrsja7dniqqf7lrl new file mode 100644 index 0000000000000000000000000000000000000000..8073a6c10066abe1cc23f33ea99c488dc7d9bf35 Binary files /dev/null and b/.inductor_cache/aotautograd/apzbkbwaap6ti4egbtmwkplqlw3wexqgmo6dzef5zs3qhyaxxjqw/cqdmfhqen4t77wygizolw75tnyjztqiib5bmrsja7dniqqf7lrl differ diff --git a/.inductor_cache/aotautograd/apzzchjt4rjfegc2yfyqw6ccvjn3pnhpr2pipuzni2wkl6pwt72b/sn6nbps3q6ppw5zxdgbzj2lwvb5fzxce5k5obbo5xpw5p5bbk7k b/.inductor_cache/aotautograd/apzzchjt4rjfegc2yfyqw6ccvjn3pnhpr2pipuzni2wkl6pwt72b/sn6nbps3q6ppw5zxdgbzj2lwvb5fzxce5k5obbo5xpw5p5bbk7k new file mode 100644 index 0000000000000000000000000000000000000000..2d2fa49e1788b7cd5160ab4e71d698cdf235d7c1 Binary files /dev/null and b/.inductor_cache/aotautograd/apzzchjt4rjfegc2yfyqw6ccvjn3pnhpr2pipuzni2wkl6pwt72b/sn6nbps3q6ppw5zxdgbzj2lwvb5fzxce5k5obbo5xpw5p5bbk7k differ diff --git a/.inductor_cache/aotautograd/aq5ia7mprtn7b2oj7scjovcd423klxkbbtm7i5skfd2b4ld2j7fg/h42xgsxcxespqrsj3jvp3yrmjvgihje5hetpwtt254zgs22jg63 b/.inductor_cache/aotautograd/aq5ia7mprtn7b2oj7scjovcd423klxkbbtm7i5skfd2b4ld2j7fg/h42xgsxcxespqrsj3jvp3yrmjvgihje5hetpwtt254zgs22jg63 new file mode 100644 index 0000000000000000000000000000000000000000..a0660cccf44df09e31095bb2e41616d2f5e1c347 Binary files /dev/null and b/.inductor_cache/aotautograd/aq5ia7mprtn7b2oj7scjovcd423klxkbbtm7i5skfd2b4ld2j7fg/h42xgsxcxespqrsj3jvp3yrmjvgihje5hetpwtt254zgs22jg63 differ diff --git a/.inductor_cache/aotautograd/aqgjnscfqzxgr3bncsgtfdv3aeehkdyivffzvc7xxddzbpdtzpu6/mezfg34xgwf2skdhogxsqg4v55c2xc663dopsgisvcuvypbh3ph b/.inductor_cache/aotautograd/aqgjnscfqzxgr3bncsgtfdv3aeehkdyivffzvc7xxddzbpdtzpu6/mezfg34xgwf2skdhogxsqg4v55c2xc663dopsgisvcuvypbh3ph new file mode 100644 index 0000000000000000000000000000000000000000..fceb8d7736845ece6dee97a795f26be5604abccc Binary files /dev/null and b/.inductor_cache/aotautograd/aqgjnscfqzxgr3bncsgtfdv3aeehkdyivffzvc7xxddzbpdtzpu6/mezfg34xgwf2skdhogxsqg4v55c2xc663dopsgisvcuvypbh3ph differ diff --git a/.inductor_cache/aotautograd/aqk7cbbomxu5zlhwyeitgn2gitykzmt7nh33eoswvslckhvbuczx/4h3hmaijs5m2ba6cuot52wdslbtsvqj4j2n2d53s4opt23va26a b/.inductor_cache/aotautograd/aqk7cbbomxu5zlhwyeitgn2gitykzmt7nh33eoswvslckhvbuczx/4h3hmaijs5m2ba6cuot52wdslbtsvqj4j2n2d53s4opt23va26a new file mode 100644 index 0000000000000000000000000000000000000000..6eca671707f04ea217f66255c6db054ca12126c4 Binary files /dev/null and b/.inductor_cache/aotautograd/aqk7cbbomxu5zlhwyeitgn2gitykzmt7nh33eoswvslckhvbuczx/4h3hmaijs5m2ba6cuot52wdslbtsvqj4j2n2d53s4opt23va26a differ diff --git a/.inductor_cache/aotautograd/ar6htc4dfklaetox3crsmkdu3zboes4geex5etnqjuby5tgy6bw3/zudn6iqjtja35lkugtgpyyrqpg3oahmkmtnvyctu3h5b76kr4sx b/.inductor_cache/aotautograd/ar6htc4dfklaetox3crsmkdu3zboes4geex5etnqjuby5tgy6bw3/zudn6iqjtja35lkugtgpyyrqpg3oahmkmtnvyctu3h5b76kr4sx new file mode 100644 index 0000000000000000000000000000000000000000..892f98860f54b8a3c4bf01bcee42cc735c5aed0f Binary files /dev/null and b/.inductor_cache/aotautograd/ar6htc4dfklaetox3crsmkdu3zboes4geex5etnqjuby5tgy6bw3/zudn6iqjtja35lkugtgpyyrqpg3oahmkmtnvyctu3h5b76kr4sx differ diff --git a/.inductor_cache/aotautograd/as32mbn5einivah32si46ohb3jph6eplz4kjqzkyox45apyrgxe5/dkyztp7uzizggsprnbqfoi2wxddzxc5prp37xx7hq4uepwp3pxn b/.inductor_cache/aotautograd/as32mbn5einivah32si46ohb3jph6eplz4kjqzkyox45apyrgxe5/dkyztp7uzizggsprnbqfoi2wxddzxc5prp37xx7hq4uepwp3pxn new file mode 100644 index 0000000000000000000000000000000000000000..24efa27479708112cb7ff8797755bf8a1af37bed Binary files /dev/null and b/.inductor_cache/aotautograd/as32mbn5einivah32si46ohb3jph6eplz4kjqzkyox45apyrgxe5/dkyztp7uzizggsprnbqfoi2wxddzxc5prp37xx7hq4uepwp3pxn differ diff --git a/.inductor_cache/aotautograd/assek6cffqkuup4xlrpj6l4qow5uuri5dhtbwrphppf765etjyti/n5r2m2ktmlwc5fmxu4wcxsaz5rqnffmeqim7mqvk6sidh5y72t7 b/.inductor_cache/aotautograd/assek6cffqkuup4xlrpj6l4qow5uuri5dhtbwrphppf765etjyti/n5r2m2ktmlwc5fmxu4wcxsaz5rqnffmeqim7mqvk6sidh5y72t7 new file mode 100644 index 0000000000000000000000000000000000000000..3395bd8c28300eb1cc9153450cccb6fc7acf0ba2 Binary files /dev/null and b/.inductor_cache/aotautograd/assek6cffqkuup4xlrpj6l4qow5uuri5dhtbwrphppf765etjyti/n5r2m2ktmlwc5fmxu4wcxsaz5rqnffmeqim7mqvk6sidh5y72t7 differ diff --git a/.inductor_cache/aotautograd/asxdr3gyw3kdmjyfrsqubeg5yuum4qlbeu3vg6kue2gfxtkyo26q/tp5wh3lcnemd2laucwubtoibhyq6w7go5g4ve4puzavn3tzxvmx b/.inductor_cache/aotautograd/asxdr3gyw3kdmjyfrsqubeg5yuum4qlbeu3vg6kue2gfxtkyo26q/tp5wh3lcnemd2laucwubtoibhyq6w7go5g4ve4puzavn3tzxvmx new file mode 100644 index 0000000000000000000000000000000000000000..d8b699068f6241b98af223322b4b43e1d88f727d Binary files /dev/null and b/.inductor_cache/aotautograd/asxdr3gyw3kdmjyfrsqubeg5yuum4qlbeu3vg6kue2gfxtkyo26q/tp5wh3lcnemd2laucwubtoibhyq6w7go5g4ve4puzavn3tzxvmx differ diff --git a/.inductor_cache/aotautograd/athxlfcpedktb3kkdz6lr7xuckkp2pqsqg3eibbagu2e2mlmbx7c/7l7hxq4qswq5yc3h5rwgllnyrqprmm2cdkctsn37darzwdl3753 b/.inductor_cache/aotautograd/athxlfcpedktb3kkdz6lr7xuckkp2pqsqg3eibbagu2e2mlmbx7c/7l7hxq4qswq5yc3h5rwgllnyrqprmm2cdkctsn37darzwdl3753 new file mode 100644 index 0000000000000000000000000000000000000000..270b899bc0d3705bc08c24b4c4f5193f4e4cbf0f Binary files /dev/null and b/.inductor_cache/aotautograd/athxlfcpedktb3kkdz6lr7xuckkp2pqsqg3eibbagu2e2mlmbx7c/7l7hxq4qswq5yc3h5rwgllnyrqprmm2cdkctsn37darzwdl3753 differ diff --git a/.inductor_cache/aotautograd/atnifkehamslo2zwpmr4u6fvonpdikwf6svuukhxoxajd5tyrw6d/eqxkh64y3w6bvrpffruud5bkde3diriagsxljgzh5vc4imvncy3 b/.inductor_cache/aotautograd/atnifkehamslo2zwpmr4u6fvonpdikwf6svuukhxoxajd5tyrw6d/eqxkh64y3w6bvrpffruud5bkde3diriagsxljgzh5vc4imvncy3 new file mode 100644 index 0000000000000000000000000000000000000000..977abf0fea5d0523e1abc31fa0f425c3ebf5cee4 Binary files /dev/null and b/.inductor_cache/aotautograd/atnifkehamslo2zwpmr4u6fvonpdikwf6svuukhxoxajd5tyrw6d/eqxkh64y3w6bvrpffruud5bkde3diriagsxljgzh5vc4imvncy3 differ diff --git a/.inductor_cache/aotautograd/auusymgkktdtiu4ew22mv46h3jahc5wwqb4m7vgmpzlw24fyktru/b5cabo57ghvfif7g6uefsemmrw5ija667r45fabhpdciegxo2si b/.inductor_cache/aotautograd/auusymgkktdtiu4ew22mv46h3jahc5wwqb4m7vgmpzlw24fyktru/b5cabo57ghvfif7g6uefsemmrw5ija667r45fabhpdciegxo2si new file mode 100644 index 0000000000000000000000000000000000000000..f71f9af1290d7b1157d672a7461b4d5f2dfbd70e Binary files /dev/null and b/.inductor_cache/aotautograd/auusymgkktdtiu4ew22mv46h3jahc5wwqb4m7vgmpzlw24fyktru/b5cabo57ghvfif7g6uefsemmrw5ija667r45fabhpdciegxo2si differ diff --git a/.inductor_cache/aotautograd/auv7gmnijfferkjzie6fy6aludwszkvp2lcimzjrznwusrqxpugx/xkh4zpmaezigxzw6teuzvrceejfiktp2f33dy663kh6boumo43n b/.inductor_cache/aotautograd/auv7gmnijfferkjzie6fy6aludwszkvp2lcimzjrznwusrqxpugx/xkh4zpmaezigxzw6teuzvrceejfiktp2f33dy663kh6boumo43n new file mode 100644 index 0000000000000000000000000000000000000000..4bf080db32dc9db8dc605895504a86aefe4a736d Binary files /dev/null and b/.inductor_cache/aotautograd/auv7gmnijfferkjzie6fy6aludwszkvp2lcimzjrznwusrqxpugx/xkh4zpmaezigxzw6teuzvrceejfiktp2f33dy663kh6boumo43n differ diff --git a/.inductor_cache/aotautograd/auw7adea2dki3wmnpmtn3jngjbroxmgq2hdhpmszcaxft6wb6h2s/4sskudvhb4mp66ltq7txarzdz6zwojcmwodg3ijwxo3numgosj4 b/.inductor_cache/aotautograd/auw7adea2dki3wmnpmtn3jngjbroxmgq2hdhpmszcaxft6wb6h2s/4sskudvhb4mp66ltq7txarzdz6zwojcmwodg3ijwxo3numgosj4 new file mode 100644 index 0000000000000000000000000000000000000000..dd9afd471a601bc67f6a717002b6a3b6c346c83e Binary files /dev/null and b/.inductor_cache/aotautograd/auw7adea2dki3wmnpmtn3jngjbroxmgq2hdhpmszcaxft6wb6h2s/4sskudvhb4mp66ltq7txarzdz6zwojcmwodg3ijwxo3numgosj4 differ diff --git a/.inductor_cache/aotautograd/av24fvn3bqi2zxcrueqbay6ensjnquyjcqropaee62sn2zqynwsr/lnkfi5u2szofv6tqd6wnbphol3pvel7e4aby7gxyhlguiek3nva b/.inductor_cache/aotautograd/av24fvn3bqi2zxcrueqbay6ensjnquyjcqropaee62sn2zqynwsr/lnkfi5u2szofv6tqd6wnbphol3pvel7e4aby7gxyhlguiek3nva new file mode 100644 index 0000000000000000000000000000000000000000..a7fca712ad79d33d024d12cdf0aa22c1db4a34e0 Binary files /dev/null and b/.inductor_cache/aotautograd/av24fvn3bqi2zxcrueqbay6ensjnquyjcqropaee62sn2zqynwsr/lnkfi5u2szofv6tqd6wnbphol3pvel7e4aby7gxyhlguiek3nva differ diff --git a/.inductor_cache/aotautograd/avjfiehmlslccai23yrirmixvxysjxy7pf7lxpsgltwlmol7ilpk/zxnyqrartz6wvlglv4mznfkwhmulijwkgvoxcz26aayziobldms b/.inductor_cache/aotautograd/avjfiehmlslccai23yrirmixvxysjxy7pf7lxpsgltwlmol7ilpk/zxnyqrartz6wvlglv4mznfkwhmulijwkgvoxcz26aayziobldms new file mode 100644 index 0000000000000000000000000000000000000000..3d25c0fffeba82c90576ccbb25a240fcaadd48c6 Binary files /dev/null and b/.inductor_cache/aotautograd/avjfiehmlslccai23yrirmixvxysjxy7pf7lxpsgltwlmol7ilpk/zxnyqrartz6wvlglv4mznfkwhmulijwkgvoxcz26aayziobldms differ diff --git a/.inductor_cache/aotautograd/avv5fetmk4r76afkkmzlktc24qve7qw6q5yvldgfi4morcrq4aut/3gm6hoby3o5uz3fpniu57ixi3wfxbnm5ksyxf43i23rilnz4yeg b/.inductor_cache/aotautograd/avv5fetmk4r76afkkmzlktc24qve7qw6q5yvldgfi4morcrq4aut/3gm6hoby3o5uz3fpniu57ixi3wfxbnm5ksyxf43i23rilnz4yeg new file mode 100644 index 0000000000000000000000000000000000000000..b63bc0203eb500816f9ddf10c3f3537b3113b127 Binary files /dev/null and b/.inductor_cache/aotautograd/avv5fetmk4r76afkkmzlktc24qve7qw6q5yvldgfi4morcrq4aut/3gm6hoby3o5uz3fpniu57ixi3wfxbnm5ksyxf43i23rilnz4yeg differ diff --git a/.inductor_cache/aotautograd/avwxglzhll4f6tbf2lkyaqchmxuaafdjaiq3xgupnfpwozm6s7ey/jvlbu7cukoxqoeznt6efvicmgxfzzskf2h44j2btiyvqbfyouit b/.inductor_cache/aotautograd/avwxglzhll4f6tbf2lkyaqchmxuaafdjaiq3xgupnfpwozm6s7ey/jvlbu7cukoxqoeznt6efvicmgxfzzskf2h44j2btiyvqbfyouit new file mode 100644 index 0000000000000000000000000000000000000000..235b8162c3a6677d6c9b2a01985f8a702777e962 Binary files /dev/null and b/.inductor_cache/aotautograd/avwxglzhll4f6tbf2lkyaqchmxuaafdjaiq3xgupnfpwozm6s7ey/jvlbu7cukoxqoeznt6efvicmgxfzzskf2h44j2btiyvqbfyouit differ diff --git a/.inductor_cache/aotautograd/awgqfzjloewa2472fsdf2plpcsnp2zq4rn35d2nbzwn3ekx3v55h/6nh6mf7xwem3b5lvsoan3i2yshfb5ftne3icaeaahytlv4pojff b/.inductor_cache/aotautograd/awgqfzjloewa2472fsdf2plpcsnp2zq4rn35d2nbzwn3ekx3v55h/6nh6mf7xwem3b5lvsoan3i2yshfb5ftne3icaeaahytlv4pojff new file mode 100644 index 0000000000000000000000000000000000000000..960564e6ca26b455b4694e691a88e4285448899c Binary files /dev/null and b/.inductor_cache/aotautograd/awgqfzjloewa2472fsdf2plpcsnp2zq4rn35d2nbzwn3ekx3v55h/6nh6mf7xwem3b5lvsoan3i2yshfb5ftne3icaeaahytlv4pojff differ diff --git a/.inductor_cache/aotautograd/awpkgypokrbmdj3vbcl5tkeqxnmqotrwfiimiu4vjvkt5vpz4kta/d2mkj5lvqloiw6yfg7reu3xkvtrjbtbxmni4taxsdrblrtyxp4z b/.inductor_cache/aotautograd/awpkgypokrbmdj3vbcl5tkeqxnmqotrwfiimiu4vjvkt5vpz4kta/d2mkj5lvqloiw6yfg7reu3xkvtrjbtbxmni4taxsdrblrtyxp4z new file mode 100644 index 0000000000000000000000000000000000000000..b3a4c6c2fc28ee541dc541117f627b159ce29f9a Binary files /dev/null and b/.inductor_cache/aotautograd/awpkgypokrbmdj3vbcl5tkeqxnmqotrwfiimiu4vjvkt5vpz4kta/d2mkj5lvqloiw6yfg7reu3xkvtrjbtbxmni4taxsdrblrtyxp4z differ diff --git a/.inductor_cache/aotautograd/awzvtfvnf2yzumtmfvnfsd4ioksuabff3pxbvwembofv33l7pl54/qcqkvpwbtafevm3icrgsf24lt33axxumjx6vr23sovrtlgcrusc b/.inductor_cache/aotautograd/awzvtfvnf2yzumtmfvnfsd4ioksuabff3pxbvwembofv33l7pl54/qcqkvpwbtafevm3icrgsf24lt33axxumjx6vr23sovrtlgcrusc new file mode 100644 index 0000000000000000000000000000000000000000..da255bf3b1d9b3ca2ded9ac3db6db2f262cc775b Binary files /dev/null and b/.inductor_cache/aotautograd/awzvtfvnf2yzumtmfvnfsd4ioksuabff3pxbvwembofv33l7pl54/qcqkvpwbtafevm3icrgsf24lt33axxumjx6vr23sovrtlgcrusc differ diff --git a/.inductor_cache/aotautograd/ax6zixc6qhsthhprazzb3j2krzmr5k2ex3rdwsjuke52kub3p242/itjh3l2hoywj3yfpwaa76hrgianlv23raducufhcmzemd3qchov b/.inductor_cache/aotautograd/ax6zixc6qhsthhprazzb3j2krzmr5k2ex3rdwsjuke52kub3p242/itjh3l2hoywj3yfpwaa76hrgianlv23raducufhcmzemd3qchov new file mode 100644 index 0000000000000000000000000000000000000000..be1a2853905081de6e07a422688181d6fdc994c7 Binary files /dev/null and b/.inductor_cache/aotautograd/ax6zixc6qhsthhprazzb3j2krzmr5k2ex3rdwsjuke52kub3p242/itjh3l2hoywj3yfpwaa76hrgianlv23raducufhcmzemd3qchov differ diff --git a/.inductor_cache/aotautograd/axdvpvnh37l44zo2vxtyidnoa5jkvhb5r5rqvk3tbj2dqdf5ejrx/vybcdwyi2fy7ktuo67hhwsstlxlhhssadf72o4xxhbnmnvwqvir b/.inductor_cache/aotautograd/axdvpvnh37l44zo2vxtyidnoa5jkvhb5r5rqvk3tbj2dqdf5ejrx/vybcdwyi2fy7ktuo67hhwsstlxlhhssadf72o4xxhbnmnvwqvir new file mode 100644 index 0000000000000000000000000000000000000000..14a12f73b2f66b36bff4691930427a1af46faf35 Binary files /dev/null and b/.inductor_cache/aotautograd/axdvpvnh37l44zo2vxtyidnoa5jkvhb5r5rqvk3tbj2dqdf5ejrx/vybcdwyi2fy7ktuo67hhwsstlxlhhssadf72o4xxhbnmnvwqvir differ diff --git a/.inductor_cache/aotautograd/axoevn2rphdjsgwopctwfp2ymggc7dz4fxx3fgy3ryyxj5orh4ce/sqy3hy4mlss5zqhamyukz5pv3ltlskszmaxhe3z74zaldvghcf4 b/.inductor_cache/aotautograd/axoevn2rphdjsgwopctwfp2ymggc7dz4fxx3fgy3ryyxj5orh4ce/sqy3hy4mlss5zqhamyukz5pv3ltlskszmaxhe3z74zaldvghcf4 new file mode 100644 index 0000000000000000000000000000000000000000..42ae0a38ac4a01483382ea079311e44ca62bd452 Binary files /dev/null and b/.inductor_cache/aotautograd/axoevn2rphdjsgwopctwfp2ymggc7dz4fxx3fgy3ryyxj5orh4ce/sqy3hy4mlss5zqhamyukz5pv3ltlskszmaxhe3z74zaldvghcf4 differ diff --git a/.inductor_cache/aotautograd/az2xalayiwqv2475qcxrazkqu4lrdgecvv6kscpuurukjnmlpoec/6ztny6fw3hthdex2vpsogbrxutoo2b6rkijv44lhl6nxn4map5y b/.inductor_cache/aotautograd/az2xalayiwqv2475qcxrazkqu4lrdgecvv6kscpuurukjnmlpoec/6ztny6fw3hthdex2vpsogbrxutoo2b6rkijv44lhl6nxn4map5y new file mode 100644 index 0000000000000000000000000000000000000000..c7dfa64f62c39f0ab1a343f1039b28845e69428c Binary files /dev/null and b/.inductor_cache/aotautograd/az2xalayiwqv2475qcxrazkqu4lrdgecvv6kscpuurukjnmlpoec/6ztny6fw3hthdex2vpsogbrxutoo2b6rkijv44lhl6nxn4map5y differ diff --git a/.inductor_cache/aotautograd/az6p6nvmlru2wqbltqvtw535zoyak3ikhcpr3szd2dq2ytaeu5om/yamamob6im223oqem5yhvd5ks7tmbtvgpo4e2hv4foi23yupnvt b/.inductor_cache/aotautograd/az6p6nvmlru2wqbltqvtw535zoyak3ikhcpr3szd2dq2ytaeu5om/yamamob6im223oqem5yhvd5ks7tmbtvgpo4e2hv4foi23yupnvt new file mode 100644 index 0000000000000000000000000000000000000000..53d48a36961b1f05dd2a03408e98072af2c39dd5 Binary files /dev/null and b/.inductor_cache/aotautograd/az6p6nvmlru2wqbltqvtw535zoyak3ikhcpr3szd2dq2ytaeu5om/yamamob6im223oqem5yhvd5ks7tmbtvgpo4e2hv4foi23yupnvt differ diff --git a/.inductor_cache/aq/bc5bdcba57c6e4491ac2d145e16c3e80bedafa2957f88287e143bdf33256c5f4.best_config b/.inductor_cache/aq/bc5bdcba57c6e4491ac2d145e16c3e80bedafa2957f88287e143bdf33256c5f4.best_config new file mode 100644 index 0000000000000000000000000000000000000000..e558339c4f98efe880663e0d38a40a0b26663664 --- /dev/null +++ b/.inductor_cache/aq/bc5bdcba57c6e4491ac2d145e16c3e80bedafa2957f88287e143bdf33256c5f4.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 44, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/aq/caqnw5wwjljr4ngacjnllpjdtwyypbrec5ajoqmf7kvy5vp7xtap.py b/.inductor_cache/aq/caqnw5wwjljr4ngacjnllpjdtwyypbrec5ajoqmf7kvy5vp7xtap.py new file mode 100644 index 0000000000000000000000000000000000000000..e41d1d0b1f4732bff82d79cb72f5b76dd33d90ea --- /dev/null +++ b/.inductor_cache/aq/caqnw5wwjljr4ngacjnllpjdtwyypbrec5ajoqmf7kvy5vp7xtap.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/au/cau6vi5aabrewtrihlehyopwe5sren7faqm7qila2g46bypj6mps.py b/.inductor_cache/au/cau6vi5aabrewtrihlehyopwe5sren7faqm7qila2g46bypj6mps.py new file mode 100644 index 0000000000000000000000000000000000000000..92bcd547fc249275476e625200c3264579fa5b1c --- /dev/null +++ b/.inductor_cache/au/cau6vi5aabrewtrihlehyopwe5sren7faqm7qila2g46bypj6mps.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/aw/cawqu6nsgau2wzqirai6cxj4q3gc5eyl2kxiyfeqbnqdowgaudl5.py b/.inductor_cache/aw/cawqu6nsgau2wzqirai6cxj4q3gc5eyl2kxiyfeqbnqdowgaudl5.py new file mode 100644 index 0000000000000000000000000000000000000000..aaed6e513270b3707ce95f69bab2c305ecf96652 --- /dev/null +++ b/.inductor_cache/aw/cawqu6nsgau2wzqirai6cxj4q3gc5eyl2kxiyfeqbnqdowgaudl5.py @@ -0,0 +1,137 @@ +# AOT ID: ['10_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/zi/czi2gebq2ez4fkm4twycyxki3nxsr5q5asfo44xgpsj5txniaoey.py +# Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] +# Source node to ATen node mapping: +# mul => mul_2 +# unsqueeze => unsqueeze +# Graph fragment: +# %arg1_1 : Tensor "f32[1, s3][s3, 1]cuda:3" = PlaceHolder[target=arg1_1] +# %arg2_1 : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:3" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg3_1] +# %unsqueeze : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg1_1, -1), kwargs = {}) +# %mul_2 : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg2_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg3_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[1, s3, 1][s3, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_2, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 512}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1 = args + args.clear() + s3 = arg0_1 + assert_size_stride(arg1_1, (1, s3), (s3, 1)) + assert_size_stride(arg2_1, (1, s3, 1), (s3, 1, 1)) + assert_size_stride(arg3_1, (), ()) + with torch.cuda._DeviceGuard(3): + torch.cuda.set_device(3) + buf0 = empty_strided_cuda((1, s3, 1), (s3, 1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] + stream3 = get_raw_stream(3) + triton_poi_fused_mul_unsqueeze_0.run(arg1_1, arg2_1, arg3_1.item(), buf0, s3, stream=stream3) + del arg1_1 + del arg2_1 + del arg3_1 + return (buf0, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 32 + arg1_1 = rand_strided((1, 32), (32, 1), device='cuda:3', dtype=torch.float32) + arg2_1 = rand_strided((1, 32, 1), (32, 1, 1), device='cuda:3', dtype=torch.float32) + arg3_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/b2/cb26mae35wp4vvjv4ul4dfprqmuzwgew7rcoatwrmuk2gduezlkw.py b/.inductor_cache/b2/cb26mae35wp4vvjv4ul4dfprqmuzwgew7rcoatwrmuk2gduezlkw.py new file mode 100644 index 0000000000000000000000000000000000000000..9da7181ea96282e9d59f247d64667faeec0f2511 --- /dev/null +++ b/.inductor_cache/b2/cb26mae35wp4vvjv4ul4dfprqmuzwgew7rcoatwrmuk2gduezlkw.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2048}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 28672}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/b2/fee6b53807665b560270ea0b14717067997dd9446b0bea69079a20c8833b68c3.best_config b/.inductor_cache/b2/fee6b53807665b560270ea0b14717067997dd9446b0bea69079a20c8833b68c3.best_config new file mode 100644 index 0000000000000000000000000000000000000000..e558339c4f98efe880663e0d38a40a0b26663664 --- /dev/null +++ b/.inductor_cache/b2/fee6b53807665b560270ea0b14717067997dd9446b0bea69079a20c8833b68c3.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 44, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/bk/93cff2e26fced1a08bf21fc197d4c620323a27cd1dff2269151de585c9536e26.best_config b/.inductor_cache/bk/93cff2e26fced1a08bf21fc197d4c620323a27cd1dff2269151de585c9536e26.best_config new file mode 100644 index 0000000000000000000000000000000000000000..c7c21b9a6ae7295164fe7d572997aec051a80fe2 --- /dev/null +++ b/.inductor_cache/bk/93cff2e26fced1a08bf21fc197d4c620323a27cd1dff2269151de585c9536e26.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 46, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/bk/cbk2gyqxm7qwcf2a3uzdxgrzshzr3heruzlee42ped765ktbbc6f.py b/.inductor_cache/bk/cbk2gyqxm7qwcf2a3uzdxgrzshzr3heruzlee42ped765ktbbc6f.py new file mode 100644 index 0000000000000000000000000000000000000000..ed196c84bfc9c5ab88b6d2c072ed765e70c7ab66 --- /dev/null +++ b/.inductor_cache/bk/cbk2gyqxm7qwcf2a3uzdxgrzshzr3heruzlee42ped765ktbbc6f.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/bk/cbkfzqeg7hdufkppbhjnaeh6u3koghqsbszylqypgpg5j4upbw2x.py b/.inductor_cache/bk/cbkfzqeg7hdufkppbhjnaeh6u3koghqsbszylqypgpg5j4upbw2x.py new file mode 100644 index 0000000000000000000000000000000000000000..8da2618728a57d8d38404e1824efee7a9395cdad --- /dev/null +++ b/.inductor_cache/bk/cbkfzqeg7hdufkppbhjnaeh6u3koghqsbszylqypgpg5j4upbw2x.py @@ -0,0 +1,27 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) diff --git a/.inductor_cache/bm/cbm42ze4ug2fdwztejjykx3hr6afph6fl33kksrldc6xarefqiy7.py b/.inductor_cache/bm/cbm42ze4ug2fdwztejjykx3hr6afph6fl33kksrldc6xarefqiy7.py new file mode 100644 index 0000000000000000000000000000000000000000..a56a2329116753f7cc92bb6a2c8e18accf6f21e5 --- /dev/null +++ b/.inductor_cache/bm/cbm42ze4ug2fdwztejjykx3hr6afph6fl33kksrldc6xarefqiy7.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/bm/f72d2f2e76315faaec60ba56fd1192831dcbcce36baad308c7b17d3f50e0038e.best_config b/.inductor_cache/bm/f72d2f2e76315faaec60ba56fd1192831dcbcce36baad308c7b17d3f50e0038e.best_config new file mode 100644 index 0000000000000000000000000000000000000000..e558339c4f98efe880663e0d38a40a0b26663664 --- /dev/null +++ b/.inductor_cache/bm/f72d2f2e76315faaec60ba56fd1192831dcbcce36baad308c7b17d3f50e0038e.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 44, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/bq/cbqrbuxfav76d45dukkxmnz6za4zr4kddcvpodgbq4lzgiotjhag.py b/.inductor_cache/bq/cbqrbuxfav76d45dukkxmnz6za4zr4kddcvpodgbq4lzgiotjhag.py new file mode 100644 index 0000000000000000000000000000000000000000..7510f72275b8fbe30cd6af0d2c0732fdc0ff21b0 --- /dev/null +++ b/.inductor_cache/bq/cbqrbuxfav76d45dukkxmnz6za4zr4kddcvpodgbq4lzgiotjhag.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/bs/38c04915d9bdee1ecd897053f0e324c7a9f29d93517af37a4f66589fac069a4d.best_config b/.inductor_cache/bs/38c04915d9bdee1ecd897053f0e324c7a9f29d93517af37a4f66589fac069a4d.best_config new file mode 100644 index 0000000000000000000000000000000000000000..8ea323f748a9d5acd6377c1908e47a4a24aa3ada --- /dev/null +++ b/.inductor_cache/bs/38c04915d9bdee1ecd897053f0e324c7a9f29d93517af37a4f66589fac069a4d.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 21, "triton_cache_hash": "YG74CS4JHDXVAWUXP7QZ23NAXRAHIYIZ5FUJMRPVXQLZO4XINHZA"} \ No newline at end of file diff --git a/.inductor_cache/bs/cbsoghspbphq6mjn2zcqfdcax42m3a5siu3evh5xfqpdxn6sm6t6.py b/.inductor_cache/bs/cbsoghspbphq6mjn2zcqfdcax42m3a5siu3evh5xfqpdxn6sm6t6.py new file mode 100644 index 0000000000000000000000000000000000000000..e9882e94bc8d6644114136e8ad715b8d6ec55871 --- /dev/null +++ b/.inductor_cache/bs/cbsoghspbphq6mjn2zcqfdcax42m3a5siu3evh5xfqpdxn6sm6t6.py @@ -0,0 +1,29 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 4096}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) diff --git a/.inductor_cache/bu/cburtb54dxftz4ovx6wqbvnuvsq4klzrlfgkq2xyomwqr45boyxv.py b/.inductor_cache/bu/cburtb54dxftz4ovx6wqbvnuvsq4klzrlfgkq2xyomwqr45boyxv.py new file mode 100644 index 0000000000000000000000000000000000000000..2332b7902704be532f962b23470aa2ce2ea6a820 --- /dev/null +++ b/.inductor_cache/bu/cburtb54dxftz4ovx6wqbvnuvsq4klzrlfgkq2xyomwqr45boyxv.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 16384}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 73728}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) diff --git a/.inductor_cache/bu/e1809360cd2abe644a7afad2e8e68e79ae951bc9ff9d999432bae747545cf4f1.best_config b/.inductor_cache/bu/e1809360cd2abe644a7afad2e8e68e79ae951bc9ff9d999432bae747545cf4f1.best_config new file mode 100644 index 0000000000000000000000000000000000000000..ceb8ef25d450884e0fedce18ea088043d16dcf7f --- /dev/null +++ b/.inductor_cache/bu/e1809360cd2abe644a7afad2e8e68e79ae951bc9ff9d999432bae747545cf4f1.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 22, "triton_cache_hash": "Q2N5PO2YINGSELIO3M4VOOWLWHTNDJUQK2K7ETAZL7ECQK6GFLMA"} \ No newline at end of file diff --git a/.inductor_cache/bz/cbzzqys3m7e3fezpt6s47xyjuhnxe5ckvl7zn6swjd64ovsqzy3u.py b/.inductor_cache/bz/cbzzqys3m7e3fezpt6s47xyjuhnxe5ckvl7zn6swjd64ovsqzy3u.py new file mode 100644 index 0000000000000000000000000000000000000000..8fae988accddcc4bae36bb469b1edb2d3b2ce0f7 --- /dev/null +++ b/.inductor_cache/bz/cbzzqys3m7e3fezpt6s47xyjuhnxe5ckvl7zn6swjd64ovsqzy3u.py @@ -0,0 +1,46 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) diff --git a/.inductor_cache/c2/cc25fewy4m4iyagkjflqeky33l6wn3onp7fgvcukt55mhimrmasg.py b/.inductor_cache/c2/cc25fewy4m4iyagkjflqeky33l6wn3onp7fgvcukt55mhimrmasg.py new file mode 100644 index 0000000000000000000000000000000000000000..92706e41803350b4cb827ee7ca32e9132f935d84 --- /dev/null +++ b/.inductor_cache/c2/cc25fewy4m4iyagkjflqeky33l6wn3onp7fgvcukt55mhimrmasg.py @@ -0,0 +1,27 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) diff --git a/.inductor_cache/c4/cc4kjg5krmn6esssjq66r7lkkogbd4eyeo2h3sin2ovfmdvqlxah.py b/.inductor_cache/c4/cc4kjg5krmn6esssjq66r7lkkogbd4eyeo2h3sin2ovfmdvqlxah.py new file mode 100644 index 0000000000000000000000000000000000000000..74398903e5f93a5310f2983cd2cfc2e80f0dc462 --- /dev/null +++ b/.inductor_cache/c4/cc4kjg5krmn6esssjq66r7lkkogbd4eyeo2h3sin2ovfmdvqlxah.py @@ -0,0 +1,291 @@ +# AOT ID: ['7_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/xh/cxh7sezmoqxcccmmupak5i6lq3msgfodcae6rcxakp76aq3atfnr.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, 1][1, 1]cuda:7" = PlaceHolder[target=arg2_1] +# %arg4_1 : Tensor "f32[s0, 1][1, 1]cuda:7" = PlaceHolder[target=arg4_1] +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:7" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg4_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:7"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/3h/c3hjatdysmtczt36qylu5u476tmnxdvxgytr7m6z4na54xrxxoss.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg5_1 : Tensor "i64[s0, 1][1, 1]cuda:7" = PlaceHolder[target=arg5_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg5_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/ro/cround23pf4qaktlwffp3qcbjyrgot7o6kfowlbg2y4yepoaour2.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg7_1 : Tensor "bf16[s0, s87][s87, 1]cuda:7" = PlaceHolder[target=arg7_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s0][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg3_1]), kwargs = {}) +# %div : Tensor "i64[s0][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s0][1]cuda:7"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg3_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:7, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s0][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg3_1]), kwargs = {}) +# %add_47 : Tensor "i64[s0][1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s0, s87][s87, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg7_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/76/c76y7ge3o24p7dwc6aulba5id74axw62oevitux7yjjlbrbsx66u.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s0, 1][1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg8_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1 = args + args.clear() + s53 = arg0_1 + s68 = arg1_1 + s0 = arg3_1 + s87 = arg6_1 + s77 = arg8_1 + assert_size_stride(arg2_1, (s0, 1), (1, 1)) + assert_size_stride(arg4_1, (s0, 1), (1, 1)) + assert_size_stride(arg5_1, (s0, 1), (1, 1)) + assert_size_stride(arg7_1, (s0, s87), (s87, 1)) + with torch.cuda._DeviceGuard(7): + torch.cuda.set_device(7) + buf0 = empty_strided_cuda((s0, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s0, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream7 = get_raw_stream(7) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg4_1, buf0, buf1, s0, stream=stream7) + del arg2_1 + del arg4_1 + buf2 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream7 = get_raw_stream(7) + triton_poi_fused_gather_max_view_1.run(arg5_1, buf2, s0, stream=stream7) + buf3 = empty_strided_cuda((s0, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s0*s87 + stream7 = get_raw_stream(7) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg7_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream7) + del arg7_1 + buf4 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream7 = get_raw_stream(7) + triton_poi_fused_add_max_view_3.run(buf4, s77, s0, stream=stream7) + return (reinterpret_tensor(buf2, (s0, ), (1, ), 0), buf3, buf1, buf0, arg5_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 8 + arg2_1 = rand_strided((8, 1), (1, 1), device='cuda:7', dtype=torch.float32) + arg3_1 = 8 + arg4_1 = rand_strided((8, 1), (1, 1), device='cuda:7', dtype=torch.float32) + arg5_1 = rand_strided((8, 1), (1, 1), device='cuda:7', dtype=torch.int64) + arg6_1 = 6144 + arg7_1 = rand_strided((8, 6144), (6144, 1), device='cuda:7', dtype=torch.bfloat16) + arg8_1 = 2 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/cc/cccy6j4lcrgplfier4mcwsik2sptp3ofef4jicd3eqwppx43v256.py b/.inductor_cache/cc/cccy6j4lcrgplfier4mcwsik2sptp3ofef4jicd3eqwppx43v256.py new file mode 100644 index 0000000000000000000000000000000000000000..5d7fcaeb08f26516d5c6d4982689f75bf7f9e420 --- /dev/null +++ b/.inductor_cache/cc/cccy6j4lcrgplfier4mcwsik2sptp3ofef4jicd3eqwppx43v256.py @@ -0,0 +1,289 @@ +# AOT ID: ['6_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/xb/cxbfao4txftywezeygrrwtapgjmjuaow6yckdgujtj3ln7ukpbdn.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s97, 1][1, 1]cuda:0" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f32[s97, 1][1, 1]cuda:0" = PlaceHolder[target=arg3_1] +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:0" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg3_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:0"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/jk/cjk2l5do5kfebmlafwv2ddtivblyn54wzypw3yv4cn4tgq7w7p46.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg4_1 : Tensor "i64[s97, 1][1, 1]cuda:0" = PlaceHolder[target=arg4_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg4_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/xb/cxbqyqxwwyvdsshstrz3zl343674btixfm5kbidvymejf6qmdoaf.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg6_1 : Tensor "bf16[s97, s87][s87, 1]cuda:0" = PlaceHolder[target=arg6_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s97][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg1_1]), kwargs = {}) +# %div : Tensor "i64[s97][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s97][1]cuda:0"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg1_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:0, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s97][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg1_1]), kwargs = {}) +# %add_47 : Tensor "i64[s97][1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s97, s87][s87, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg6_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/f5/cf5tdjh7czx76ocdvaqqmpbpt24xihjxufk72ezsjzb26rz66qx3.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s97, 1][1, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg7_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1 = args + args.clear() + s53 = arg0_1 + s97 = arg1_1 + s87 = arg5_1 + s77 = arg7_1 + assert_size_stride(arg2_1, (s97, 1), (1, 1)) + assert_size_stride(arg3_1, (s97, 1), (1, 1)) + assert_size_stride(arg4_1, (s97, 1), (1, 1)) + assert_size_stride(arg6_1, (s97, s87), (s87, 1)) + with torch.cuda._DeviceGuard(0): + torch.cuda.set_device(0) + buf0 = empty_strided_cuda((s97, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s97, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream0 = get_raw_stream(0) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg3_1, buf0, buf1, s97, stream=stream0) + del arg2_1 + del arg3_1 + buf2 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream0 = get_raw_stream(0) + triton_poi_fused_gather_max_view_1.run(arg4_1, buf2, s97, stream=stream0) + buf3 = empty_strided_cuda((s97, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s87*s97 + stream0 = get_raw_stream(0) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg6_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream0) + del arg6_1 + buf4 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream0 = get_raw_stream(0) + triton_poi_fused_add_max_view_3.run(buf4, s77, s97, stream=stream0) + return (reinterpret_tensor(buf2, (s97, ), (1, ), 0), buf3, buf1, buf0, arg4_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 8 + arg2_1 = rand_strided((8, 1), (1, 1), device='cuda:0', dtype=torch.float32) + arg3_1 = rand_strided((8, 1), (1, 1), device='cuda:0', dtype=torch.float32) + arg4_1 = rand_strided((8, 1), (1, 1), device='cuda:0', dtype=torch.int64) + arg5_1 = 6144 + arg6_1 = rand_strided((8, 6144), (6144, 1), device='cuda:0', dtype=torch.bfloat16) + arg7_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ch/cchdj77jkafr4nkztheaodplwx6i4iwh4fb5clcqsavtgm5lj27t.py b/.inductor_cache/ch/cchdj77jkafr4nkztheaodplwx6i4iwh4fb5clcqsavtgm5lj27t.py new file mode 100644 index 0000000000000000000000000000000000000000..4d1480b9d4ae64461b9e017a7b174da225e7e3ad --- /dev/null +++ b/.inductor_cache/ch/cchdj77jkafr4nkztheaodplwx6i4iwh4fb5clcqsavtgm5lj27t.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 8}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/ck/cck7lywyewjkzmkn5tgb3zgvxscxs7idurr7myyeg2z5dguv75br.py b/.inductor_cache/ck/cck7lywyewjkzmkn5tgb3zgvxscxs7idurr7myyeg2z5dguv75br.py new file mode 100644 index 0000000000000000000000000000000000000000..d2d2dd0bd538e9a474eed5c02e1309f23cd9910f --- /dev/null +++ b/.inductor_cache/ck/cck7lywyewjkzmkn5tgb3zgvxscxs7idurr7myyeg2z5dguv75br.py @@ -0,0 +1,37 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) diff --git a/.inductor_cache/cm/35858b99617f035d8ad4698b14a78ec9af47d5585266a2767d31d4c8a087c129.best_config b/.inductor_cache/cm/35858b99617f035d8ad4698b14a78ec9af47d5585266a2767d31d4c8a087c129.best_config new file mode 100644 index 0000000000000000000000000000000000000000..e558339c4f98efe880663e0d38a40a0b26663664 --- /dev/null +++ b/.inductor_cache/cm/35858b99617f035d8ad4698b14a78ec9af47d5585266a2767d31d4c8a087c129.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 44, "triton_cache_hash": "KGGY5WAIFCN23ENKRQFNT2OZB6CJLZGZIIMD5KHX6XAEJ3DEY7VA"} \ No newline at end of file diff --git a/.inductor_cache/cm/ccmxrppaur3r2v4vbbprap3agtftgchtfuanrvc42n4aqej57jy6.py b/.inductor_cache/cm/ccmxrppaur3r2v4vbbprap3agtftgchtfuanrvc42n4aqej57jy6.py new file mode 100644 index 0000000000000000000000000000000000000000..9ed4a18c6248cc264b2d5a3f52e17ec6a1fab7d6 --- /dev/null +++ b/.inductor_cache/cm/ccmxrppaur3r2v4vbbprap3agtftgchtfuanrvc42n4aqej57jy6.py @@ -0,0 +1,31 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) diff --git a/.inductor_cache/cv/ccvyvleabp5fpzrngpmfslbvg2l3duszy7jgnrfoy5wxfynxngvg.py b/.inductor_cache/cv/ccvyvleabp5fpzrngpmfslbvg2l3duszy7jgnrfoy5wxfynxngvg.py new file mode 100644 index 0000000000000000000000000000000000000000..895c6da790dde780ee38e1f2d0738587eff28f6f --- /dev/null +++ b/.inductor_cache/cv/ccvyvleabp5fpzrngpmfslbvg2l3duszy7jgnrfoy5wxfynxngvg.py @@ -0,0 +1,46 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 128}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'out_ptr1': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 2912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_not_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, out_ptr1, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = ks0 + tmp2 = tmp0 >= tmp1 + tmp3 = ks1 + tmp4 = tmp0 < tmp3 + tmp5 = tmp2 & tmp4 + tmp6 = ks2 + tmp7 = tmp0 >= tmp6 + tmp8 = ks3 + tmp9 = tmp0 < tmp8 + tmp10 = tmp7 & tmp9 + tmp11 = tmp5 | tmp10 + tmp12 = tmp11.to(tl.int64) + tmp13 = tmp5.to(tl.int64) + tmp14 = tmp13 * tmp1 + tmp15 = tmp10.to(tl.int64) + tmp16 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp17 = tmp15 * tmp16 + tmp18 = tmp14 + tmp17 + tmp19 = tmp0 - tmp18 + tmp20 = tmp12 * tmp19 + tmp21 = tmp11 == 0 + tl.store(out_ptr0 + (x0), tmp20, xmask) + tl.store(out_ptr1 + (x0), tmp21, xmask) diff --git a/.inductor_cache/cy/ccyai6xoohss2tdtkhkzb4ptt3lnk3kuujqkubfabtlz6qyduh6e.py b/.inductor_cache/cy/ccyai6xoohss2tdtkhkzb4ptt3lnk3kuujqkubfabtlz6qyduh6e.py new file mode 100644 index 0000000000000000000000000000000000000000..aea22bd5392dfe49969a1113be500930a872b73a --- /dev/null +++ b/.inductor_cache/cy/ccyai6xoohss2tdtkhkzb4ptt3lnk3kuujqkubfabtlz6qyduh6e.py @@ -0,0 +1,148 @@ +# AOT ID: ['1_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/rg/crg7nbmlqri3lyvws3zjp42an7bgasr6wnkl43z4dqhn2e22cdza.py +# Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] +# Source node to ATen node mapping: +# mul_1 => mul_7 +# unsqueeze => unsqueeze +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s77, 32][32, 1]cuda:6" = PlaceHolder[target=mm] +# %arg3_1 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:6" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %mul_2 : Tensor "f32[s77, 32][32, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# %unsqueeze : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%mul_2, -1), kwargs = {}) +# %mul_7 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_7, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s77 = arg1_1 + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s77, 6144), (6144, 1)) + assert_size_stride(arg3_1, (s77, 32, 1), (32, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(6): + torch.cuda.set_device(6) + buf0 = empty_strided_cuda((s77, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = reinterpret_tensor(buf0, (s77, 32, 1), (32, 1, 1), 0); del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] + triton_poi_fused_mul_unsqueeze_0_xnumel = 32*s77 + stream6 = get_raw_stream(6) + triton_poi_fused_mul_unsqueeze_0.run(buf1, arg3_1, arg4_1.item(), triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream6) + del arg3_1 + del arg4_1 + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:6', dtype=torch.bfloat16) + arg1_1 = 112 + arg2_1 = rand_strided((112, 6144), (6144, 1), device='cuda:6', dtype=torch.bfloat16) + arg3_1 = rand_strided((112, 32, 1), (32, 1, 1), device='cuda:6', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/cy/ccynoxcuupwftgm6s5jendp46t45hc376h3dxf5etumtyzwwzikf.py b/.inductor_cache/cy/ccynoxcuupwftgm6s5jendp46t45hc376h3dxf5etumtyzwwzikf.py new file mode 100644 index 0000000000000000000000000000000000000000..895bcc9d1fdc75ba00ba789e5a041a13d5d7edb8 --- /dev/null +++ b/.inductor_cache/cy/ccynoxcuupwftgm6s5jendp46t45hc376h3dxf5etumtyzwwzikf.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = ks0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32)), tmp0, None) diff --git a/.inductor_cache/d7/cd7kv3fd3rbwl5z3lzl4d65tpfg5ewegaj7vncqz7to737vwyhfc.py b/.inductor_cache/d7/cd7kv3fd3rbwl5z3lzl4d65tpfg5ewegaj7vncqz7to737vwyhfc.py new file mode 100644 index 0000000000000000000000000000000000000000..8d31e9b307c4d246922c511b6f68a0242510e33d --- /dev/null +++ b/.inductor_cache/d7/cd7kv3fd3rbwl5z3lzl4d65tpfg5ewegaj7vncqz7to737vwyhfc.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 8}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/da/cdakniaakm6do4pgde7tzh3xnxqhlnjefychysegtvcanqz642tc.py b/.inductor_cache/da/cdakniaakm6do4pgde7tzh3xnxqhlnjefychysegtvcanqz642tc.py new file mode 100644 index 0000000000000000000000000000000000000000..825a7d59dda7002a4c2b6caaf83e6ad71aff7cf3 --- /dev/null +++ b/.inductor_cache/da/cdakniaakm6do4pgde7tzh3xnxqhlnjefychysegtvcanqz642tc.py @@ -0,0 +1,45 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) diff --git a/.inductor_cache/da/cdapgkytd3nkhj2oxii6fmlb72nubzphpm6spazcdttlvni7uihd.py b/.inductor_cache/da/cdapgkytd3nkhj2oxii6fmlb72nubzphpm6spazcdttlvni7uihd.py new file mode 100644 index 0000000000000000000000000000000000000000..f7ea07a8d98f962a0a6a6da9e8e2c44a7a854fa5 --- /dev/null +++ b/.inductor_cache/da/cdapgkytd3nkhj2oxii6fmlb72nubzphpm6spazcdttlvni7uihd.py @@ -0,0 +1,150 @@ +# AOT ID: ['3_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/pk/cpkuzsuxmqb72c7wpmegqszo3sukl3dwc37k6of6ol25llfkezjy.py +# Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] +# Source node to ATen node mapping: +# mul_1 => mul_7 +# unsqueeze => unsqueeze +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s0, 32][32, 1]cuda:1" = PlaceHolder[target=mm] +# %arg3_1 : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:1" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %mul_2 : Tensor "f32[s0, 32][32, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# %unsqueeze : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%mul_2, -1), kwargs = {}) +# %mul_7 : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s0, 32, 1][32, 1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_7, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2048}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 28672}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s77 = arg1_1 + arg2_1_size = arg2_1.size() + s0 = arg2_1_size[0] + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s0, 6144), (6144, 1)) + assert_size_stride(arg3_1, (s0, 32, 1), (32, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(1): + torch.cuda.set_device(1) + buf0 = empty_strided_cuda((s0, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = reinterpret_tensor(buf0, (s0, 32, 1), (32, 1, 1), 0); del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] + triton_poi_fused_mul_unsqueeze_0_xnumel = 32*s0 + stream1 = get_raw_stream(1) + triton_poi_fused_mul_unsqueeze_0.run(buf1, arg3_1, arg4_1.item(), triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream1) + del arg3_1 + del arg4_1 + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:1', dtype=torch.bfloat16) + arg1_1 = 56 + arg2_1 = rand_strided((56, 6144), (6144, 1), device='cuda:1', dtype=torch.bfloat16) + arg3_1 = rand_strided((56, 32, 1), (32, 1, 1), device='cuda:1', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/dc/cdcux4enrbootmatcwy52moflq3ec3gimeeqfqnnbs2rhdfegr4u.py b/.inductor_cache/dc/cdcux4enrbootmatcwy52moflq3ec3gimeeqfqnnbs2rhdfegr4u.py new file mode 100644 index 0000000000000000000000000000000000000000..9f9bf4db7a157ae6c918061ef4ad34dab204549d --- /dev/null +++ b/.inductor_cache/dc/cdcux4enrbootmatcwy52moflq3ec3gimeeqfqnnbs2rhdfegr4u.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = ks0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32)), tmp0, None) diff --git a/.inductor_cache/dm/cdmvkduxzdqrvvphvyrynpwm77ulv5m44qrmm2izq36cx2yge35l.py b/.inductor_cache/dm/cdmvkduxzdqrvvphvyrynpwm77ulv5m44qrmm2izq36cx2yge35l.py new file mode 100644 index 0000000000000000000000000000000000000000..26a2ed4376fc0ca5200becc65378653672a1fcda --- /dev/null +++ b/.inductor_cache/dm/cdmvkduxzdqrvvphvyrynpwm77ulv5m44qrmm2izq36cx2yge35l.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/dn/cdnvk7ketvhjg6i2ggdy5oiyemirjdox3326cagxkaqlxhmh5lpp.py b/.inductor_cache/dn/cdnvk7ketvhjg6i2ggdy5oiyemirjdox3326cagxkaqlxhmh5lpp.py new file mode 100644 index 0000000000000000000000000000000000000000..21e9ef65bdd3f0e843e6800b6c676110ca547a9c --- /dev/null +++ b/.inductor_cache/dn/cdnvk7ketvhjg6i2ggdy5oiyemirjdox3326cagxkaqlxhmh5lpp.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = ks0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32)), tmp0, None) diff --git a/.inductor_cache/du/cduvxixx2ifvrigx3xk5jkqzmtfoj2meiagnufslgpzj5du5iyvu.py b/.inductor_cache/du/cduvxixx2ifvrigx3xk5jkqzmtfoj2meiagnufslgpzj5du5iyvu.py new file mode 100644 index 0000000000000000000000000000000000000000..02c7c10ac0ae502d43daf442a41386fd52aa75d7 --- /dev/null +++ b/.inductor_cache/du/cduvxixx2ifvrigx3xk5jkqzmtfoj2meiagnufslgpzj5du5iyvu.py @@ -0,0 +1,129 @@ +# AOT ID: ['4_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/ze/czeardixathkscotfnp37pocvapthzwtdabgtpsto2evnxhd2wi7.py +# Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] +# Source node to ATen node mapping: +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s77, 32][32, 1]cuda:2" = PlaceHolder[target=mm] +# %mul_2 : Tensor "f32[s77, 32][32, 1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# return %mul_2 +triton_poi_fused_mul_0 = async_compile.triton('triton_poi_fused_mul_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 3072}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1 = args + args.clear() + s77 = arg1_1 + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s77, 6144), (6144, 1)) + with torch.cuda._DeviceGuard(2): + torch.cuda.set_device(2) + buf0 = empty_strided_cuda((s77, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = buf0; del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] + triton_poi_fused_mul_0_xnumel = 32*s77 + stream2 = get_raw_stream(2) + triton_poi_fused_mul_0.run(buf1, triton_poi_fused_mul_0_xnumel, stream=stream2) + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:2', dtype=torch.bfloat16) + arg1_1 = 8 + arg2_1 = rand_strided((8, 6144), (6144, 1), device='cuda:2', dtype=torch.bfloat16) + return [arg0_1, arg1_1, arg2_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/e6/ce6z3vbz7kdhjoalnxabok5cvzdzr4iogaadfn7ixj2ardgtlyri.py b/.inductor_cache/e6/ce6z3vbz7kdhjoalnxabok5cvzdzr4iogaadfn7ixj2ardgtlyri.py new file mode 100644 index 0000000000000000000000000000000000000000..79b66da6903d3247c073670880fd11d1bd3e5fd4 --- /dev/null +++ b/.inductor_cache/e6/ce6z3vbz7kdhjoalnxabok5cvzdzr4iogaadfn7ixj2ardgtlyri.py @@ -0,0 +1,148 @@ +# AOT ID: ['1_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/aq/caqnw5wwjljr4ngacjnllpjdtwyypbrec5ajoqmf7kvy5vp7xtap.py +# Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] +# Source node to ATen node mapping: +# mul_1 => mul_7 +# unsqueeze => unsqueeze +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s77, 32][32, 1]cuda:3" = PlaceHolder[target=mm] +# %arg3_1 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:3" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %mul_2 : Tensor "f32[s77, 32][32, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# %unsqueeze : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%mul_2, -1), kwargs = {}) +# %mul_7 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:3"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_7, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s77 = arg1_1 + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s77, 6144), (6144, 1)) + assert_size_stride(arg3_1, (s77, 32, 1), (32, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(3): + torch.cuda.set_device(3) + buf0 = empty_strided_cuda((s77, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = reinterpret_tensor(buf0, (s77, 32, 1), (32, 1, 1), 0); del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] + triton_poi_fused_mul_unsqueeze_0_xnumel = 32*s77 + stream3 = get_raw_stream(3) + triton_poi_fused_mul_unsqueeze_0.run(buf1, arg3_1, arg4_1.item(), triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream3) + del arg3_1 + del arg4_1 + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:3', dtype=torch.bfloat16) + arg1_1 = 112 + arg2_1 = rand_strided((112, 6144), (6144, 1), device='cuda:3', dtype=torch.bfloat16) + arg3_1 = rand_strided((112, 32, 1), (32, 1, 1), device='cuda:3', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/e7/ce7mzu33nhmwj4byk6np4snfzj7rn4uy4mzvcc57gd6yu4do4d24.py b/.inductor_cache/e7/ce7mzu33nhmwj4byk6np4snfzj7rn4uy4mzvcc57gd6yu4do4d24.py new file mode 100644 index 0000000000000000000000000000000000000000..da25756ebdcaefe00839d2bdcc241929c6172ce8 --- /dev/null +++ b/.inductor_cache/e7/ce7mzu33nhmwj4byk6np4snfzj7rn4uy4mzvcc57gd6yu4do4d24.py @@ -0,0 +1,129 @@ +# AOT ID: ['4_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/wy/cwysjyxztxbr5nepr7yum3223q6fcwhi4xdszamkdcvhi4icppep.py +# Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] +# Source node to ATen node mapping: +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s77, 32][32, 1]cuda:0" = PlaceHolder[target=mm] +# %mul_2 : Tensor "f32[s77, 32][32, 1]cuda:0"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# return %mul_2 +triton_poi_fused_mul_0 = async_compile.triton('triton_poi_fused_mul_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 3072}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1 = args + args.clear() + s77 = arg1_1 + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s77, 6144), (6144, 1)) + with torch.cuda._DeviceGuard(0): + torch.cuda.set_device(0) + buf0 = empty_strided_cuda((s77, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = buf0; del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] + triton_poi_fused_mul_0_xnumel = 32*s77 + stream0 = get_raw_stream(0) + triton_poi_fused_mul_0.run(buf1, triton_poi_fused_mul_0_xnumel, stream=stream0) + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:0', dtype=torch.bfloat16) + arg1_1 = 8 + arg2_1 = rand_strided((8, 6144), (6144, 1), device='cuda:0', dtype=torch.bfloat16) + return [arg0_1, arg1_1, arg2_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/eg/cegqzpiy6hdyjvxnjmhxv5lenkg5vwzpwiqeb7cedcobjkkkg3vc.py b/.inductor_cache/eg/cegqzpiy6hdyjvxnjmhxv5lenkg5vwzpwiqeb7cedcobjkkkg3vc.py new file mode 100644 index 0000000000000000000000000000000000000000..654d527b023b2309d28d50f7aaf6a8b2eada375f --- /dev/null +++ b/.inductor_cache/eg/cegqzpiy6hdyjvxnjmhxv5lenkg5vwzpwiqeb7cedcobjkkkg3vc.py @@ -0,0 +1,237 @@ +# AOT ID: ['8_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/r5/cr53e3b33x5ipsseng7l5za7ibpunvhbbo3dgdp6chmwh3xtywgg.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# input_ => mul_2 +# lt => lt +# lt_1 => lt_1 +# mul => mul +# mul_1 => mul_1 +# org_vocab_mask => bitwise_and +# sub_3 => sub_3 +# valid_offset => add +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:2" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:2"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:2"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:2"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %mul : Tensor "i64[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and, %arg1_1), kwargs = {}) +# %mul_1 : Tensor "i64[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and_1, %sub_2), kwargs = {}) +# %add : Tensor "i64[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_1), kwargs = {}) +# %sub_3 : Tensor "i64[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg0_1, %add), kwargs = {}) +# %mul_2 : Tensor "i64[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_or, %sub_3), kwargs = {}) +# return %mul_2 +triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0 = async_compile.triton('triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/62/c62vhrldvf7yqvelctjx64ts5ifznauctxiqhwo4jrqxe2rtpdgj.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# invert => bitwise_not +# lt => lt +# lt_1 => lt_1 +# org_vocab_mask => bitwise_and +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:2" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:2"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:2"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:2"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %bitwise_not : Tensor "b8[1][1]cuda:2"[num_users=1] = call_function[target=torch.ops.aten.bitwise_not.default](args = (%bitwise_or,), kwargs = {}) +# return %bitwise_not +triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1 = async_compile.triton('triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1 = args + args.clear() + s90 = arg1_1 + s87 = arg2_1 + s68 = arg3_1 + s53 = arg4_1 + s88 = arg5_1 + assert_size_stride(arg0_1, (1, ), (1, )) + with torch.cuda._DeviceGuard(2): + torch.cuda.set_device(2) + buf0 = empty_strided_cuda((1, ), (1, ), torch.int64) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] + stream2 = get_raw_stream(2) + triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0.run(arg0_1, buf0, s90, s87, s68, s53, s88, 1, stream=stream2) + buf1 = empty_strided_cuda((1, ), (1, ), torch.bool) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] + stream2 = get_raw_stream(2) + triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1.run(arg0_1, buf1, s90, s87, s68, s53, 1, stream=stream2) + del arg0_1 + return (buf0, buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((1, ), (1, ), device='cuda:2', dtype=torch.int64) + arg1_1 = 38720 + arg2_1 = 58080 + arg3_1 = 154880 + arg4_1 = 154880 + arg5_1 = 0 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ei/ceig37vx5ji4ph7mrwwpixvyur3pw6uptbvrdorumllwgpvrxs3r.py b/.inductor_cache/ei/ceig37vx5ji4ph7mrwwpixvyur3pw6uptbvrdorumllwgpvrxs3r.py new file mode 100644 index 0000000000000000000000000000000000000000..6e98a6efce378488dbee627aa9227b2f992f7cb8 --- /dev/null +++ b/.inductor_cache/ei/ceig37vx5ji4ph7mrwwpixvyur3pw6uptbvrdorumllwgpvrxs3r.py @@ -0,0 +1,148 @@ +# AOT ID: ['1_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/uc/cucmd33h5amxj6vf3wswqdgekb6bccqg7iuesszrizh56sgt5fnr.py +# Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] +# Source node to ATen node mapping: +# mul_1 => mul_7 +# unsqueeze => unsqueeze +# weights_1 => mul_2 +# Graph fragment: +# %mm : Tensor "f32[s77, 32][32, 1]cuda:4" = PlaceHolder[target=mm] +# %arg3_1 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:4" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %mul_2 : Tensor "f32[s77, 32][32, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# %unsqueeze : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%mul_2, -1), kwargs = {}) +# %mul_7 : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s77, 32, 1][32, 1, 1]cuda:4"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_7, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 4096}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*fp32', 'in_ptr1': 'fp64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 57344}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp3 = tl.load(in_ptr0 + (x0), xmask) + tmp5 = in_ptr1 + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tmp4 = tmp2 * tmp3 + tmp6 = tmp5.to(tl.float32) + tmp7 = tmp4 * tmp6 + tl.store(in_out_ptr0 + (x0), tmp7, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s77 = arg1_1 + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg2_1, (s77, 6144), (6144, 1)) + assert_size_stride(arg3_1, (s77, 32, 1), (32, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(4): + torch.cuda.set_device(4) + buf0 = empty_strided_cuda((s77, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg2_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg2_1 + buf1 = reinterpret_tensor(buf0, (s77, 32, 1), (32, 1, 1), 0); del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1, unsqueeze, mul_1], Original ATen: [aten.mul, aten.unsqueeze] + triton_poi_fused_mul_unsqueeze_0_xnumel = 32*s77 + stream4 = get_raw_stream(4) + triton_poi_fused_mul_unsqueeze_0.run(buf1, arg3_1, arg4_1.item(), triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream4) + del arg3_1 + del arg4_1 + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:4', dtype=torch.bfloat16) + arg1_1 = 112 + arg2_1 = rand_strided((112, 6144), (6144, 1), device='cuda:4', dtype=torch.bfloat16) + arg3_1 = rand_strided((112, 32, 1), (32, 1, 1), device='cuda:4', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ej/cejfeyisoerhzk7b36urdm75zdory6wzzeogp7h3yljqhhiulh4i.py b/.inductor_cache/ej/cejfeyisoerhzk7b36urdm75zdory6wzzeogp7h3yljqhhiulh4i.py new file mode 100644 index 0000000000000000000000000000000000000000..d2325ce1893e2553ae952a7df1aa725c1055a925 --- /dev/null +++ b/.inductor_cache/ej/cejfeyisoerhzk7b36urdm75zdory6wzzeogp7h3yljqhhiulh4i.py @@ -0,0 +1,127 @@ +# AOT ID: ['9_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/pf/cpfoff3tjmjwli33akk522guenhiraz7jxzrctbruncdtmoybdyq.py +# Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] +# Source node to ATen node mapping: +# weights_1 => mul +# Graph fragment: +# %mm : Tensor "f32[1, 32][32, 1]cuda:7" = PlaceHolder[target=mm] +# %mul : Tensor "f32[1, 32][32, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# return %mul +triton_poi_fused_mul_0 = async_compile.triton('triton_poi_fused_mul_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 384}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 32 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1 = args + args.clear() + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg1_1, (1, 6144), (6144, 1)) + with torch.cuda._DeviceGuard(7): + torch.cuda.set_device(7) + buf0 = empty_strided_cuda((1, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg1_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg1_1 + buf1 = buf0; del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] + stream7 = get_raw_stream(7) + triton_poi_fused_mul_0.run(buf1, 32, stream=stream7) + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:7', dtype=torch.bfloat16) + arg1_1 = rand_strided((1, 6144), (6144, 1), device='cuda:7', dtype=torch.bfloat16) + return [arg0_1, arg1_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/en/cen4hqi6fw6bppnddpykd46fb2yxynsuln72g7lpqixw4wxgm54u.py b/.inductor_cache/en/cen4hqi6fw6bppnddpykd46fb2yxynsuln72g7lpqixw4wxgm54u.py new file mode 100644 index 0000000000000000000000000000000000000000..526ec432008717b3829504211a3ff916f8bf10c1 --- /dev/null +++ b/.inductor_cache/en/cen4hqi6fw6bppnddpykd46fb2yxynsuln72g7lpqixw4wxgm54u.py @@ -0,0 +1,237 @@ +# AOT ID: ['8_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/j3/cj3b6qhvt2ytxuedrtr3m3b65j7ypc27vuaomc5pc35ce4r3x4sz.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# input_ => mul_2 +# lt => lt +# lt_1 => lt_1 +# mul => mul +# mul_1 => mul_1 +# org_vocab_mask => bitwise_and +# sub_3 => sub_3 +# valid_offset => add +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:1" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:1"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:1"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:1"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %mul : Tensor "i64[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and, %arg1_1), kwargs = {}) +# %mul_1 : Tensor "i64[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_and_1, %sub_2), kwargs = {}) +# %add : Tensor "i64[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mul, %mul_1), kwargs = {}) +# %sub_3 : Tensor "i64[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.sub.Tensor](args = (%arg0_1, %add), kwargs = {}) +# %mul_2 : Tensor "i64[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%bitwise_or, %sub_3), kwargs = {}) +# return %mul_2 +triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0 = async_compile.triton('triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/n6/cn64ytsgtpbvrqo6un2gwerphqubtrkl7jt2gdmng2fq2tbv6hiw.py +# Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] +# Source node to ATen node mapping: +# added_vocab_mask => bitwise_and_1 +# ge => ge +# ge_1 => ge_1 +# invert => bitwise_not +# lt => lt +# lt_1 => lt_1 +# org_vocab_mask => bitwise_and +# vocab_mask => bitwise_or +# Graph fragment: +# %arg0_1 : Tensor "i64[1][1]cuda:1" = PlaceHolder[target=arg0_1] +# %ge : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg1_1), kwargs = {}) +# %lt : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg2_1), kwargs = {}) +# %bitwise_and : Tensor "b8[1][1]cuda:1"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge, %lt), kwargs = {}) +# %ge_1 : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.ge.Scalar](args = (%arg0_1, %arg3_1), kwargs = {}) +# %lt_1 : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.lt.Scalar](args = (%arg0_1, %arg4_1), kwargs = {}) +# %bitwise_and_1 : Tensor "b8[1][1]cuda:1"[num_users=2] = call_function[target=torch.ops.aten.bitwise_and.Tensor](args = (%ge_1, %lt_1), kwargs = {}) +# %bitwise_or : Tensor "b8[1][1]cuda:1"[num_users=2] = call_function[target=torch.ops.aten.bitwise_or.Tensor](args = (%bitwise_and, %bitwise_and_1), kwargs = {}) +# %bitwise_not : Tensor "b8[1][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.bitwise_not.default](args = (%bitwise_or,), kwargs = {}) +# return %bitwise_not +triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1 = async_compile.triton('triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i1', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12 == 0 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp13, None) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1 = args + args.clear() + s90 = arg1_1 + s87 = arg2_1 + s68 = arg3_1 + s53 = arg4_1 + s88 = arg5_1 + assert_size_stride(arg0_1, (1, ), (1, )) + with torch.cuda._DeviceGuard(1): + torch.cuda.set_device(1) + buf0 = empty_strided_cuda((1, ), (1, ), torch.int64) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, mul, mul_1, valid_offset, sub_3, input_], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.mul, aten.add, aten.sub] + stream1 = get_raw_stream(1) + triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0.run(arg0_1, buf0, s90, s87, s68, s53, s88, 1, stream=stream1) + buf1 = empty_strided_cuda((1, ), (1, ), torch.bool) + # Topologically Sorted Source Nodes: [ge, lt, org_vocab_mask, ge_1, lt_1, added_vocab_mask, vocab_mask, invert], Original ATen: [aten.ge, aten.lt, aten.bitwise_and, aten.bitwise_or, aten.bitwise_not] + stream1 = get_raw_stream(1) + triton_poi_fused_bitwise_and_bitwise_not_bitwise_or_ge_lt_1.run(arg0_1, buf1, s90, s87, s68, s53, 1, stream=stream1) + del arg0_1 + return (buf0, buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((1, ), (1, ), device='cuda:1', dtype=torch.int64) + arg1_1 = 19360 + arg2_1 = 38720 + arg3_1 = 154880 + arg4_1 = 154880 + arg5_1 = 0 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/er/c29e4b244dcbb666adc0af2f5547302210cd8155bb16bf10b49cfe6e360890f0.best_config b/.inductor_cache/er/c29e4b244dcbb666adc0af2f5547302210cd8155bb16bf10b49cfe6e360890f0.best_config new file mode 100644 index 0000000000000000000000000000000000000000..ceb8ef25d450884e0fedce18ea088043d16dcf7f --- /dev/null +++ b/.inductor_cache/er/c29e4b244dcbb666adc0af2f5547302210cd8155bb16bf10b49cfe6e360890f0.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 22, "triton_cache_hash": "Q2N5PO2YINGSELIO3M4VOOWLWHTNDJUQK2K7ETAZL7ECQK6GFLMA"} \ No newline at end of file diff --git a/.inductor_cache/er/cer3iwnrt32abye3ztneej3z43wqnxplsgqgt3mqozdpnnckxmys.py b/.inductor_cache/er/cer3iwnrt32abye3ztneej3z43wqnxplsgqgt3mqozdpnnckxmys.py new file mode 100644 index 0000000000000000000000000000000000000000..db569755a4da067e869c9e27f1355a591131f1e6 --- /dev/null +++ b/.inductor_cache/er/cer3iwnrt32abye3ztneej3z43wqnxplsgqgt3mqozdpnnckxmys.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 16384}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 73728}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) diff --git a/.inductor_cache/eu/ceujptddvohmrpmi3d35cfzrtagwszsxwklnkpos5z5fi3vn46sj.py b/.inductor_cache/eu/ceujptddvohmrpmi3d35cfzrtagwszsxwklnkpos5z5fi3vn46sj.py new file mode 100644 index 0000000000000000000000000000000000000000..488a0f8a3ec8ebf76c9536a82358d69815b6db52 --- /dev/null +++ b/.inductor_cache/eu/ceujptddvohmrpmi3d35cfzrtagwszsxwklnkpos5z5fi3vn46sj.py @@ -0,0 +1,27 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=3, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) diff --git a/.inductor_cache/ev/cev77sksao5kljqxup2qspk42cfvawzdo42izbnzha45437jqh7c.py b/.inductor_cache/ev/cev77sksao5kljqxup2qspk42cfvawzdo42izbnzha45437jqh7c.py new file mode 100644 index 0000000000000000000000000000000000000000..2ad864c61a4cc5d4735e398860821c3b041adb4f --- /dev/null +++ b/.inductor_cache/ev/cev77sksao5kljqxup2qspk42cfvawzdo42izbnzha45437jqh7c.py @@ -0,0 +1,142 @@ +# AOT ID: ['5_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/iy/ciyckypghoehvvsvyj2fgefzwp4bhbzhzadklx53ll3uvb2rkphp.py +# Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] +# Source node to ATen node mapping: +# mul => mul_2 +# unsqueeze => unsqueeze +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, s3][s3, 1]cuda:7" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:7" = PlaceHolder[target=arg3_1] +# %arg4_1 : Tensor "f64[][]cpu" = PlaceHolder[target=arg4_1] +# %unsqueeze : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, -1), kwargs = {}) +# %mul_2 : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %arg3_1), kwargs = {}) +# %convert_element_type_default_1 : Tensor "f32[][]cpu"[num_users=1] = call_function[target=torch.ops.prims.convert_element_type.default](args = (%arg4_1, torch.float32), kwargs = {}) +# %mul_tensor : Tensor "f32[s0, s3, 1][s3, 1, 1]cuda:7"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mul_2, %convert_element_type_default_1), kwargs = {}) +# return %mul_tensor +triton_poi_fused_mul_unsqueeze_0 = async_compile.triton('triton_poi_fused_mul_unsqueeze_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 4096}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1 = args + args.clear() + s7 = arg0_1 + s3 = arg1_1 + arg2_1_size = arg2_1.size() + s0 = arg2_1_size[0] + assert_size_stride(arg2_1, (s0, s3), (s3, 1)) + assert_size_stride(arg3_1, (s0, s3, 1), (s3, 1, 1)) + assert_size_stride(arg4_1, (), ()) + with torch.cuda._DeviceGuard(7): + torch.cuda.set_device(7) + buf0 = empty_strided_cuda((s0, s3, 1), (s3, 1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, mul], Original ATen: [aten.unsqueeze, aten.mul] + triton_poi_fused_mul_unsqueeze_0_xnumel = s0*s3 + stream7 = get_raw_stream(7) + triton_poi_fused_mul_unsqueeze_0.run(arg2_1, arg3_1, arg4_1.item(), buf0, triton_poi_fused_mul_unsqueeze_0_xnumel, stream=stream7) + del arg2_1 + del arg3_1 + del arg4_1 + return (buf0, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 8 + arg1_1 = 32 + arg2_1 = rand_strided((8, 32), (32, 1), device='cuda:7', dtype=torch.float32) + arg3_1 = rand_strided((8, 32, 1), (32, 1, 1), device='cuda:7', dtype=torch.float32) + arg4_1 = rand_strided((), (), device='cpu', dtype=torch.float64) + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ev/cevpjqnqj6j2likvjk5zkdv7ke4cfyvsns7trrzxmxqj5qatnoxr.py b/.inductor_cache/ev/cevpjqnqj6j2likvjk5zkdv7ke4cfyvsns7trrzxmxqj5qatnoxr.py new file mode 100644 index 0000000000000000000000000000000000000000..4ac56cb2d203cb464d6cbb49b97efdcd2a5ad1b0 --- /dev/null +++ b/.inductor_cache/ev/cevpjqnqj6j2likvjk5zkdv7ke4cfyvsns7trrzxmxqj5qatnoxr.py @@ -0,0 +1,291 @@ +# AOT ID: ['7_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/r3/cr333mq2yzr7rixiiwaacpyfykcrh3oe4bimo3cngi42juonzohi.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s0, 1][1, 1]cuda:1" = PlaceHolder[target=arg2_1] +# %arg4_1 : Tensor "f32[s0, 1][1, 1]cuda:1" = PlaceHolder[target=arg4_1] +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:1" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg4_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s0, 1, 1][1, 1, 1]cuda:1"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/un/cun3h5xetskkgqj652kojes6opfqbaexbkzn5bq2lhsitna2pl4x.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg5_1 : Tensor "i64[s0, 1][1, 1]cuda:1" = PlaceHolder[target=arg5_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg5_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/f4/cf4amfzddy5edtg5hhvqyznxzmqz3sy5hooeuillcupuqjry5zoh.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg7_1 : Tensor "bf16[s0, s87][s87, 1]cuda:1" = PlaceHolder[target=arg7_1] +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s0][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg3_1]), kwargs = {}) +# %div : Tensor "i64[s0][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s0][1]cuda:1"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg3_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:1, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s0][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg3_1]), kwargs = {}) +# %add_47 : Tensor "i64[s0][1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s0, s87][s87, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg7_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/tk/ctkv5ncbcvcsa2sqv7fy6waloep7rvxvcgauk5pfktnei5g2ypuk.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg3_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s0, 1][1, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg8_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1 = args + args.clear() + s53 = arg0_1 + s68 = arg1_1 + s0 = arg3_1 + s87 = arg6_1 + s77 = arg8_1 + assert_size_stride(arg2_1, (s0, 1), (1, 1)) + assert_size_stride(arg4_1, (s0, 1), (1, 1)) + assert_size_stride(arg5_1, (s0, 1), (1, 1)) + assert_size_stride(arg7_1, (s0, s87), (s87, 1)) + with torch.cuda._DeviceGuard(1): + torch.cuda.set_device(1) + buf0 = empty_strided_cuda((s0, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s0, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream1 = get_raw_stream(1) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg4_1, buf0, buf1, s0, stream=stream1) + del arg2_1 + del arg4_1 + buf2 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream1 = get_raw_stream(1) + triton_poi_fused_gather_max_view_1.run(arg5_1, buf2, s0, stream=stream1) + buf3 = empty_strided_cuda((s0, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s0*s87 + stream1 = get_raw_stream(1) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg7_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream1) + del arg7_1 + buf4 = empty_strided_cuda((s0, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream1 = get_raw_stream(1) + triton_poi_fused_add_max_view_3.run(buf4, s77, s0, stream=stream1) + return (reinterpret_tensor(buf2, (s0, ), (1, ), 0), buf3, buf1, buf0, arg5_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 8 + arg2_1 = rand_strided((8, 1), (1, 1), device='cuda:1', dtype=torch.float32) + arg3_1 = 8 + arg4_1 = rand_strided((8, 1), (1, 1), device='cuda:1', dtype=torch.float32) + arg5_1 = rand_strided((8, 1), (1, 1), device='cuda:1', dtype=torch.int64) + arg6_1 = 6144 + arg7_1 = rand_strided((8, 6144), (6144, 1), device='cuda:1', dtype=torch.bfloat16) + arg8_1 = 2 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1, arg8_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/ew/cewhk2e3t5msoqsn3m7nynvzesfjqgc746bztsvg7puyhydc7sr4.py b/.inductor_cache/ew/cewhk2e3t5msoqsn3m7nynvzesfjqgc746bztsvg7puyhydc7sr4.py new file mode 100644 index 0000000000000000000000000000000000000000..3d105696f187b5aeb85790669eba0de7d11855e4 --- /dev/null +++ b/.inductor_cache/ew/cewhk2e3t5msoqsn3m7nynvzesfjqgc746bztsvg7puyhydc7sr4.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 2}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 12}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/f4/c4da3b99e3a2ef69d83e8714bf27beb330df794d63b934a47211ed779089218f.best_config b/.inductor_cache/f4/c4da3b99e3a2ef69d83e8714bf27beb330df794d63b934a47211ed779089218f.best_config new file mode 100644 index 0000000000000000000000000000000000000000..f523c8ace74d4450540cc45fcdd06a3b9e2dcf68 --- /dev/null +++ b/.inductor_cache/f4/c4da3b99e3a2ef69d83e8714bf27beb330df794d63b934a47211ed779089218f.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "7cced77f371acaa5aa7d90332a90e0c907727cfefb71d9cc9d997c24557fc44f", "found_by_coordesc": false, "time_taken_ms": 22, "triton_cache_hash": "QLXJTPJWIG7LHGEN76P7EYFUJIJLXLDECRO3I6NRHSQ4NBZC2KMA"} \ No newline at end of file diff --git a/.inductor_cache/f4/cf4amfzddy5edtg5hhvqyznxzmqz3sy5hooeuillcupuqjry5zoh.py b/.inductor_cache/f4/cf4amfzddy5edtg5hhvqyznxzmqz3sy5hooeuillcupuqjry5zoh.py new file mode 100644 index 0000000000000000000000000000000000000000..dc3dccb5bd997136bb928c490ecbe4c31707574b --- /dev/null +++ b/.inductor_cache/f4/cf4amfzddy5edtg5hhvqyznxzmqz3sy5hooeuillcupuqjry5zoh.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) diff --git a/.inductor_cache/f5/cf5tdjh7czx76ocdvaqqmpbpt24xihjxufk72ezsjzb26rz66qx3.py b/.inductor_cache/f5/cf5tdjh7czx76ocdvaqqmpbpt24xihjxufk72ezsjzb26rz66qx3.py new file mode 100644 index 0000000000000000000000000000000000000000..a615ef85f7630432b88f812857bd459b0ce5e9dc --- /dev/null +++ b/.inductor_cache/f5/cf5tdjh7czx76ocdvaqqmpbpt24xihjxufk72ezsjzb26rz66qx3.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=0, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/f5/cf5tdx3gnxtntosmkamwgpfawabhai5ev6kn6ewzs2f6jcc5k3yw.py b/.inductor_cache/f5/cf5tdx3gnxtntosmkamwgpfawabhai5ev6kn6ewzs2f6jcc5k3yw.py new file mode 100644 index 0000000000000000000000000000000000000000..e02f2fc744b9400c218836d558f751c04e9b98d6 --- /dev/null +++ b/.inductor_cache/f5/cf5tdx3gnxtntosmkamwgpfawabhai5ev6kn6ewzs2f6jcc5k3yw.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=2, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/fc/cfcbfel6xlcjejeu5usnxjns7r2f7caon3xz662wb3uq4ou65dvx.py b/.inductor_cache/fc/cfcbfel6xlcjejeu5usnxjns7r2f7caon3xz662wb3uq4ou65dvx.py new file mode 100644 index 0000000000000000000000000000000000000000..d563b9466af998b8516503fe5ec5b0b9732e6f86 --- /dev/null +++ b/.inductor_cache/fc/cfcbfel6xlcjejeu5usnxjns7r2f7caon3xz662wb3uq4ou65dvx.py @@ -0,0 +1,289 @@ +# AOT ID: ['6_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/wu/cwuk5cadblqsicej65lgc3wdcpm3vt4hpedbi6eemxutq5pqhadk.py +# Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] +# Source node to ATen node mapping: +# expand_scores => mul_3 +# flatten => view_1 +# max_1 => getitem, max_1 +# unsqueeze => unsqueeze +# view => view +# Graph fragment: +# %arg2_1 : Tensor "f32[s97, 1][1, 1]cuda:6" = PlaceHolder[target=arg2_1] +# %arg3_1 : Tensor "f32[s97, 1][1, 1]cuda:6" = PlaceHolder[target=arg3_1] +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:6" = PlaceHolder[target=mul_3] +# %unsqueeze : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%arg2_1, 2), kwargs = {}) +# %view : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%arg3_1, [-1, 1, 1]), kwargs = {}) +# %mul_3 : Tensor "f32[s97, 1, 1][1, 1, 1]cuda:6"[num_users=2] = call_function[target=torch.ops.aten.mul.Tensor](args = (%unsqueeze, %view), kwargs = {}) +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %getitem : Tensor "f32[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=operator.getitem](args = (%max_1, 0), kwargs = {}) +# return %mul_3,%getitem +triton_poi_fused_max_mul_unsqueeze_view_0 = async_compile.triton('triton_poi_fused_max_mul_unsqueeze_view_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'out_ptr0': '*fp32', 'out_ptr1': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_max_mul_unsqueeze_view_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 2, 'num_store': 2, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_max_mul_unsqueeze_view_0(in_ptr0, in_ptr1, out_ptr0, out_ptr1, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp2 = tmp0 * tmp1 + tl.store(out_ptr0 + (x0), tmp2, xmask) + tl.store(out_ptr1 + (x0), tmp2, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/au/cau6vi5aabrewtrihlehyopwe5sren7faqm7qila2g46bypj6mps.py +# Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] +# Source node to ATen node mapping: +# flatten => view_1 +# gather => gather +# max_1 => max_1 +# Graph fragment: +# %arg4_1 : Tensor "i64[s97, 1][1, 1]cuda:6" = PlaceHolder[target=arg4_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %gather : Tensor "i64[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.gather.default](args = (%arg4_1, 1, %getitem_1), kwargs = {}) +# return %gather +triton_poi_fused_gather_max_view_1 = async_compile.triton('triton_poi_fused_gather_max_view_1', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 192}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/tp/ctpdramlki7worghuqh4omu3ji5k4kbvd64yby4bnrj3is4m6q6g.py +# Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] +# Source node to ATen node mapping: +# batch_offsets => iota +# flat_cs => view_4 +# flatten => view_1 +# floordiv => div +# hidden_states => index +# max_1 => max_1 +# repeat_interleave => unsqueeze_1, view_5 +# selected_input_index => add_47 +# Graph fragment: +# %arg6_1 : Tensor "bf16[s97, s87][s87, 1]cuda:6" = PlaceHolder[target=arg6_1] +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %view_4 : Tensor "i64[s97][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%getitem_1, [%arg1_1]), kwargs = {}) +# %div : Tensor "i64[s97][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.div.Tensor_mode](args = (%view_4, 1), kwargs = {rounding_mode: floor}) +# %iota : Tensor "i64[s97][1]cuda:6"[num_users=1] = call_function[target=torch.ops.prims.iota.default](args = (%arg1_1,), kwargs = {start: 0, step: 1, dtype: torch.int64, device: cuda:6, requires_grad: False}) +# %unsqueeze_1 : Tensor "i64[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.unsqueeze.default](args = (%iota, 1), kwargs = {}) +# %view_5 : Tensor "i64[s97][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%expand, [%arg1_1]), kwargs = {}) +# %add_47 : Tensor "i64[s97][1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%div, %view_5), kwargs = {}) +# %index : Tensor "bf16[s97, s87][s87, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.index.Tensor](args = (%arg6_1, [%add_47]), kwargs = {}) +# return %index +triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2 = async_compile.triton('triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 65536}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 294912}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x2 = xindex + tmp0 = tl.load(in_ptr0 + (x2), xmask, eviction_policy='evict_last').to(tl.float32) + tl.store(out_ptr0 + (x2), tmp0, xmask) +''', device_str='cuda') + + +# kernel path: /mnt/glm5_2/.inductor_cache/gc/cgclcmrkxnap7phuhnd6fnbh2op7rlfchsr3yjcry4wmrbxlmnk2.py +# Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] +# Source node to ATen node mapping: +# add_2 => add_53 +# flatten => view_1 +# max_1 => max_1 +# Graph fragment: +# %view_1 : Tensor "f32[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.reshape.default](args = (%mul_3, [%arg1_1, 1]), kwargs = {}) +# %max_1 : [num_users=2] = call_function[target=torch.ops.aten.max.dim](args = (%view_1, -1, True), kwargs = {}) +# %add_53 : Tensor "i64[s97, 1][1, 1]cuda:6"[num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%getitem_1, %arg7_1), kwargs = {}) +# return %add_53 +triton_poi_fused_add_max_view_3 = async_compile.triton('triton_poi_fused_add_max_view_3', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8}, + filename=__file__, + triton_meta={'signature': {'out_ptr0': '*i64', 'ks0': 'i64', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_max_view_3', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 0, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 128}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_max_view_3(out_ptr0, ks0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = ks0 + tl.store(out_ptr0 + (x0), tmp0, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1 = args + args.clear() + s53 = arg0_1 + s97 = arg1_1 + s87 = arg5_1 + s77 = arg7_1 + assert_size_stride(arg2_1, (s97, 1), (1, 1)) + assert_size_stride(arg3_1, (s97, 1), (1, 1)) + assert_size_stride(arg4_1, (s97, 1), (1, 1)) + assert_size_stride(arg6_1, (s97, s87), (s87, 1)) + with torch.cuda._DeviceGuard(6): + torch.cuda.set_device(6) + buf0 = empty_strided_cuda((s97, 1, 1), (1, 1, 1), torch.float32) + buf1 = empty_strided_cuda((s97, 1), (1, 1), torch.float32) + # Topologically Sorted Source Nodes: [unsqueeze, view, expand_scores, flatten, max_1], Original ATen: [aten.unsqueeze, aten.view, aten.mul, aten.max] + stream6 = get_raw_stream(6) + triton_poi_fused_max_mul_unsqueeze_view_0.run(arg2_1, arg3_1, buf0, buf1, s97, stream=stream6) + del arg2_1 + del arg3_1 + buf2 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, gather], Original ATen: [aten.view, aten.max, aten.gather] + stream6 = get_raw_stream(6) + triton_poi_fused_gather_max_view_1.run(arg4_1, buf2, s97, stream=stream6) + buf3 = empty_strided_cuda((s97, s87), (s87, 1), torch.bfloat16) + # Topologically Sorted Source Nodes: [flatten, max_1, flat_cs, floordiv, batch_offsets, repeat_interleave, selected_input_index, hidden_states], Original ATen: [aten.view, aten.max, aten.floor_divide, aten.arange, aten.unsqueeze, aten.add, aten.index] + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel = s87*s97 + stream6 = get_raw_stream(6) + triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2.run(arg6_1, buf3, triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2_xnumel, stream=stream6) + del arg6_1 + buf4 = empty_strided_cuda((s97, 1), (1, 1), torch.int64) + # Topologically Sorted Source Nodes: [flatten, max_1, add_2], Original ATen: [aten.view, aten.max, aten.add] + stream6 = get_raw_stream(6) + triton_poi_fused_add_max_view_3.run(buf4, s77, s97, stream=stream6) + return (reinterpret_tensor(buf2, (s97, ), (1, ), 0), buf3, buf1, buf0, arg4_1, buf4, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = 1 + arg1_1 = 8 + arg2_1 = rand_strided((8, 1), (1, 1), device='cuda:6', dtype=torch.float32) + arg3_1 = rand_strided((8, 1), (1, 1), device='cuda:6', dtype=torch.float32) + arg4_1 = rand_strided((8, 1), (1, 1), device='cuda:6', dtype=torch.int64) + arg5_1 = 6144 + arg6_1 = rand_strided((8, 6144), (6144, 1), device='cuda:6', dtype=torch.bfloat16) + arg7_1 = 1 + return [arg0_1, arg1_1, arg2_1, arg3_1, arg4_1, arg5_1, arg6_1, arg7_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/fg/cfgsmpazt3p65r4llz2mww6r7a3bo2hz3iefxsdmjw2fsadkx5qu.py b/.inductor_cache/fg/cfgsmpazt3p65r4llz2mww6r7a3bo2hz3iefxsdmjw2fsadkx5qu.py new file mode 100644 index 0000000000000000000000000000000000000000..a7343ac699c9a6e32d0692924613be5848b2e368 --- /dev/null +++ b/.inductor_cache/fg/cfgsmpazt3p65r4llz2mww6r7a3bo2hz3iefxsdmjw2fsadkx5qu.py @@ -0,0 +1,127 @@ +# AOT ID: ['9_inference'] +from ctypes import c_void_p, c_long, c_int +import torch +import math +import random +import os +import tempfile +from math import inf, nan +from cmath import nanj +from torch._inductor.hooks import run_intermediate_hooks +from torch._inductor.utils import maybe_profile +from torch._inductor.codegen.memory_planning import _align as align +from torch import device, empty_strided +from torch._inductor.async_compile import AsyncCompile +from torch._inductor.select_algorithm import extern_kernels +import triton +import triton.language as tl +from torch._inductor.runtime.triton_heuristics import start_graph, end_graph +from torch._C import _cuda_getCurrentRawStream as get_raw_stream + +aten = torch.ops.aten +inductor_ops = torch.ops.inductor +_quantized = torch.ops._quantized +assert_size_stride = torch._C._dynamo.guards.assert_size_stride +assert_alignment = torch._C._dynamo.guards.assert_alignment +empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu +empty_strided_cpu_pinned = torch._C._dynamo.guards._empty_strided_cpu_pinned +empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda +empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu +empty_strided_mtia = torch._C._dynamo.guards._empty_strided_mtia +reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor +alloc_from_pool = torch.ops.inductor._alloc_from_pool +async_compile = AsyncCompile() +empty_strided_p2p = torch._C._distributed_c10d._SymmetricMemory.empty_strided_p2p + + +# kernel path: /mnt/glm5_2/.inductor_cache/oo/coozip2ovbcn7m7olgttp5v5i5njqohl22ntpfhn3ptuzbaux2jn.py +# Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] +# Source node to ATen node mapping: +# weights_1 => mul +# Graph fragment: +# %mm : Tensor "f32[1, 32][32, 1]cuda:1" = PlaceHolder[target=mm] +# %mul : Tensor "f32[1, 32][32, 1]cuda:1"[num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%mm, 0.1767766952966369), kwargs = {}) +# return %mul +triton_poi_fused_mul_0 = async_compile.triton('triton_poi_fused_mul_0', ''' +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 384}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 32 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) +''', device_str='cuda') + + +async_compile.wait(globals()) +del async_compile + +class Runner: + def __init__(self, partitions): + self.partitions = partitions + + def recursively_apply_fns(self, fns): + new_callables = [] + for fn, c in zip(fns, self.partitions): + new_callables.append(fn(c)) + self.partitions = new_callables + + def call(self, args): + arg0_1, arg1_1 = args + args.clear() + assert_size_stride(arg0_1, (32, 6144), (6144, 1)) + assert_size_stride(arg1_1, (1, 6144), (6144, 1)) + with torch.cuda._DeviceGuard(1): + torch.cuda.set_device(1) + buf0 = empty_strided_cuda((1, 32), (32, 1), torch.float32) + # Topologically Sorted Source Nodes: [t, weights], Original ATen: [aten.t, aten.mm] + extern_kernels.mm_dtype(arg1_1, reinterpret_tensor(arg0_1, (6144, 32), (1, 6144), 0), out_dtype=torch.float32, out=buf0) + del arg0_1 + del arg1_1 + buf1 = buf0; del buf0 # reuse + # Topologically Sorted Source Nodes: [weights_1], Original ATen: [aten.mul] + stream1 = get_raw_stream(1) + triton_poi_fused_mul_0.run(buf1, 32, stream=stream1) + return (buf1, ) + +runner = Runner(partitions=[]) +call = runner.call +recursively_apply_fns = runner.recursively_apply_fns + + +def get_args(): + from torch._dynamo.testing import rand_strided + arg0_1 = rand_strided((32, 6144), (6144, 1), device='cuda:1', dtype=torch.bfloat16) + arg1_1 = rand_strided((1, 6144), (6144, 1), device='cuda:1', dtype=torch.bfloat16) + return [arg0_1, arg1_1] + + +def benchmark_compiled_module(args, times=10, repeat=10): + from torch._inductor.utils import print_performance + fn = lambda: call(list(args)) + return print_performance(fn, times=times, repeat=repeat) + + +if __name__ == "__main__": + from torch._inductor.wrapper_benchmark import compiled_module_main + args = get_args() + compiled_module_main('None', lambda times, repeat: benchmark_compiled_module(args, times=times, repeat=repeat)) diff --git a/.inductor_cache/fi/1a41d41d8f80ffccf39024bfc31afdf3a344bee7596e7cec8f580a53ecf14273.best_config b/.inductor_cache/fi/1a41d41d8f80ffccf39024bfc31afdf3a344bee7596e7cec8f580a53ecf14273.best_config new file mode 100644 index 0000000000000000000000000000000000000000..584702e570c122691e73fc22ee42ceb15dd299fe --- /dev/null +++ b/.inductor_cache/fi/1a41d41d8f80ffccf39024bfc31afdf3a344bee7596e7cec8f580a53ecf14273.best_config @@ -0,0 +1 @@ +{"XBLOCK": 256, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 22, "triton_cache_hash": "GIDCKWLVJJFYH72JFJCG4FFIN3BV7CWCQPTZRHJERXHCZJAW4VIA"} \ No newline at end of file diff --git a/.inductor_cache/fi/cfif7q6mrsvb5g7ohbg7cc5eu7mghyn2by3awngtfg5ql2er6blx.py b/.inductor_cache/fi/cfif7q6mrsvb5g7ohbg7cc5eu7mghyn2by3awngtfg5ql2er6blx.py new file mode 100644 index 0000000000000000000000000000000000000000..752545619fbeadd5ebb788b0189ea185716149e7 --- /dev/null +++ b/.inductor_cache/fi/cfif7q6mrsvb5g7ohbg7cc5eu7mghyn2by3awngtfg5ql2er6blx.py @@ -0,0 +1,24 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 8192}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*bf16', 'out_ptr0': '*bf16', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=6, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 36864}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_arange_floor_divide_index_max_unsqueeze_view_2(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask).to(tl.float32) + tl.store(out_ptr0 + (x0), tmp0, xmask) diff --git a/.inductor_cache/fp/b6d5f89d127c7ef600839d28557f9d17b68973755f2f2480b0e315d0c6a7bed0.best_config b/.inductor_cache/fp/b6d5f89d127c7ef600839d28557f9d17b68973755f2f2480b0e315d0c6a7bed0.best_config new file mode 100644 index 0000000000000000000000000000000000000000..8ea323f748a9d5acd6377c1908e47a4a24aa3ada --- /dev/null +++ b/.inductor_cache/fp/b6d5f89d127c7ef600839d28557f9d17b68973755f2f2480b0e315d0c6a7bed0.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 21, "triton_cache_hash": "YG74CS4JHDXVAWUXP7QZ23NAXRAHIYIZ5FUJMRPVXQLZO4XINHZA"} \ No newline at end of file diff --git a/.inductor_cache/fp/cfpismzcv67o6f242nmx56zdblghoc3lldc4i3lfjbyn6b74ntrq.py b/.inductor_cache/fp/cfpismzcv67o6f242nmx56zdblghoc3lldc4i3lfjbyn6b74ntrq.py new file mode 100644 index 0000000000000000000000000000000000000000..7855d79dd0a0c8b2e02c790ab55b5d333769ebd2 --- /dev/null +++ b/.inductor_cache/fp/cfpismzcv67o6f242nmx56zdblghoc3lldc4i3lfjbyn6b74ntrq.py @@ -0,0 +1,29 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 4096}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) diff --git a/.inductor_cache/fp/cfpwme7ccf4xkklj24tlioasyfry5kxcubv6xqgvx2ytwbie4j7y.py b/.inductor_cache/fp/cfpwme7ccf4xkklj24tlioasyfry5kxcubv6xqgvx2ytwbie4j7y.py new file mode 100644 index 0000000000000000000000000000000000000000..512d12a957b3ee0555d5d77874447225761fd93c --- /dev/null +++ b/.inductor_cache/fp/cfpwme7ccf4xkklj24tlioasyfry5kxcubv6xqgvx2ytwbie4j7y.py @@ -0,0 +1,29 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 32}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*fp32', 'in_ptr1': '*fp32', 'in_ptr2': 'fp64', 'out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=4, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_unsqueeze_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 3, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 512}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_unsqueeze_0(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_ptr0 + (x0), xmask) + tmp1 = tl.load(in_ptr1 + (x0), xmask) + tmp3 = in_ptr2 + tmp2 = tmp0 * tmp1 + tmp4 = tmp3.to(tl.float32) + tmp5 = tmp2 * tmp4 + tl.store(out_ptr0 + (x0), tmp5, xmask) diff --git a/.inductor_cache/ft/cft6n5c7hrt25hfqh7jjjcgw67qrmjx5smcrl6iun4jd2kw2i3ts.py b/.inductor_cache/ft/cft6n5c7hrt25hfqh7jjjcgw67qrmjx5smcrl6iun4jd2kw2i3ts.py new file mode 100644 index 0000000000000000000000000000000000000000..ead6462c99f4fb514d5ce02318d08e1e3315e3d1 --- /dev/null +++ b/.inductor_cache/ft/cft6n5c7hrt25hfqh7jjjcgw67qrmjx5smcrl6iun4jd2kw2i3ts.py @@ -0,0 +1,25 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=5, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_gather_max_view_1', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_gather_max_view_1(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp1, None) diff --git a/.inductor_cache/fu/8cda90a724cc72869001d41a48bcd1bbb3f04fe576dcc669c43d046393d1d905.best_config b/.inductor_cache/fu/8cda90a724cc72869001d41a48bcd1bbb3f04fe576dcc669c43d046393d1d905.best_config new file mode 100644 index 0000000000000000000000000000000000000000..79c5dd2999993abb9210754002465659067ca9e6 --- /dev/null +++ b/.inductor_cache/fu/8cda90a724cc72869001d41a48bcd1bbb3f04fe576dcc669c43d046393d1d905.best_config @@ -0,0 +1 @@ +{"XBLOCK": 128, "num_warps": 4, "num_stages": 1, "configs_hash": "1b2cc4dbebb9680d3ce31843331593b159e4046c056f195ca1ccf2464d5b37d1", "found_by_coordesc": false, "time_taken_ms": 85, "triton_cache_hash": "LBOXSWDAX2GIZFOXRIZQ4S3246ZSKZAMDEVIL3FUHRGF3W6BJYLQ"} \ No newline at end of file diff --git a/.inductor_cache/fu/cfuumyxqcxgpceqnkpyok34tuwjkztjorwvzgp3c3ypdzqudt5wo.py b/.inductor_cache/fu/cfuumyxqcxgpceqnkpyok34tuwjkztjorwvzgp3c3ypdzqudt5wo.py new file mode 100644 index 0000000000000000000000000000000000000000..4d1bbde7c81b83a0a043b0b966038513fc4bbb1e --- /dev/null +++ b/.inductor_cache/fu/cfuumyxqcxgpceqnkpyok34tuwjkztjorwvzgp3c3ypdzqudt5wo.py @@ -0,0 +1,26 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 256}, + filename=__file__, + triton_meta={'signature': {'in_out_ptr0': '*fp32', 'xnumel': 'i32', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=1, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_mul_0', 'mutated_arg_names': ['in_out_ptr0'], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False, 'tiling_scores': {'x': 3072}}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_mul_0(in_out_ptr0, xnumel, XBLOCK : tl.constexpr): + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = xindex < xnumel + x0 = xindex + tmp0 = tl.load(in_out_ptr0 + (x0), xmask) + tmp1 = tl.full([1], 0.1767766952966369, tl.float32) + tmp2 = tmp0 * tmp1 + tl.store(in_out_ptr0 + (x0), tmp2, xmask) diff --git a/.inductor_cache/fx/cfxtkr422juy23on5xj3g6onq2zte6hdsyivkzwvz6c25xld7din.py b/.inductor_cache/fx/cfxtkr422juy23on5xj3g6onq2zte6hdsyivkzwvz6c25xld7din.py new file mode 100644 index 0000000000000000000000000000000000000000..56755b9ac0e9886428be06e2aa478d35cc9a642a --- /dev/null +++ b/.inductor_cache/fx/cfxtkr422juy23on5xj3g6onq2zte6hdsyivkzwvz6c25xld7din.py @@ -0,0 +1,45 @@ + +import triton +import triton.language as tl + +from torch._inductor.runtime import triton_helpers, triton_heuristics +from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math +from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, DeviceProperties +triton_helpers.set_driver_to_gpu() + +@triton_heuristics.pointwise( + size_hints={'x': 1}, + filename=__file__, + triton_meta={'signature': {'in_ptr0': '*i64', 'out_ptr0': '*i64', 'ks0': 'i64', 'ks1': 'i64', 'ks2': 'i64', 'ks3': 'i64', 'ks4': 'i64', 'xnumel': 'constexpr', 'XBLOCK': 'constexpr'}, 'device': DeviceProperties(type='cuda', index=7, multi_processor_count=148, cc=100, major=10, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, max_threads_per_block=1024, warp_size=32), 'constants': {'xnumel': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (1,): [['tt.divisibility', 16]]}]}, + inductor_meta={'grid_type': 'Grid1D', 'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0', 'mutated_arg_names': [], 'optimize_mem': True, 'no_x_dim': False, 'atomic_add_found': False, 'num_load': 1, 'num_store': 1, 'num_reduction': 0, 'backend_hash': 'B9347ED8E82563C0DF6E4C45E8A40BBC93F818749C1452A3CD0A7365095FE2BD', 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False, 'deterministic': False, 'force_filter_reduction_configs': False, 'mix_order_reduction_allow_multi_stages': False, 'are_deterministic_algorithms_enabled': False}, + min_elem_per_thread=0 +) +@triton.jit +def triton_poi_fused_add_bitwise_and_bitwise_or_ge_lt_mul_sub_0(in_ptr0, out_ptr0, ks0, ks1, ks2, ks3, ks4, xnumel, XBLOCK : tl.constexpr): + xnumel = 1 + xoffset = tl.program_id(0) * XBLOCK + xindex = xoffset + tl.arange(0, XBLOCK)[:] + xmask = tl.full([XBLOCK], True, tl.int1)[:] + tmp0 = tl.load(in_ptr0 + (0)) + tmp1 = tl.broadcast_to(tmp0, [XBLOCK]) + tmp2 = ks0 + tmp3 = tmp1 >= tmp2 + tmp4 = ks1 + tmp5 = tmp1 < tmp4 + tmp6 = tmp3 & tmp5 + tmp7 = ks2 + tmp8 = tmp1 >= tmp7 + tmp9 = ks3 + tmp10 = tmp1 < tmp9 + tmp11 = tmp8 & tmp10 + tmp12 = tmp6 | tmp11 + tmp13 = tmp12.to(tl.int64) + tmp14 = tmp6.to(tl.int64) + tmp15 = tmp14 * tmp2 + tmp16 = tmp11.to(tl.int64) + tmp17 = ks0 + ks2 + ((-1)*ks1) + ((-1)*ks4) + tmp18 = tmp16 * tmp17 + tmp19 = tmp15 + tmp18 + tmp20 = tmp1 - tmp19 + tmp21 = tmp13 * tmp20 + tl.store(out_ptr0 + (tl.full([XBLOCK], 0, tl.int32).broadcast_to(XBLOCK)), tmp21, None) diff --git a/.inductor_cache/fxgraph/27/f27o6rx7rg342hrpfcctpozlvg2354yl763qkw33npuhcekxnxvx/pflgmkza6wuxeoggbjr4xfhju3ibc55p5gnpis43uorvrxtlrmh b/.inductor_cache/fxgraph/27/f27o6rx7rg342hrpfcctpozlvg2354yl763qkw33npuhcekxnxvx/pflgmkza6wuxeoggbjr4xfhju3ibc55p5gnpis43uorvrxtlrmh new file mode 100644 index 0000000000000000000000000000000000000000..3c92da09e654c7531967ca82576d1fc11e803434 --- /dev/null +++ b/.inductor_cache/fxgraph/27/f27o6rx7rg342hrpfcctpozlvg2354yl763qkw33npuhcekxnxvx/pflgmkza6wuxeoggbjr4xfhju3ibc55p5gnpis43uorvrxtlrmh @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7956662b20f5a97238c60a63cb94e9a6d01177afe99af44b9ba3a358de6b8b0f +size 276847 diff --git a/.inductor_cache/fxgraph/2e/f2e72cs2himbdjdco76jkk3trv55ibzgjmoifvwu7tb34ktssjhh/6gullbj7edgkiktugt2he7mesfwclsy5raw6dglloko3uspiqy2 b/.inductor_cache/fxgraph/2e/f2e72cs2himbdjdco76jkk3trv55ibzgjmoifvwu7tb34ktssjhh/6gullbj7edgkiktugt2he7mesfwclsy5raw6dglloko3uspiqy2 new file mode 100644 index 0000000000000000000000000000000000000000..b56c2d01aa675418f83537ecda5d4f61062eef44 --- /dev/null +++ b/.inductor_cache/fxgraph/2e/f2e72cs2himbdjdco76jkk3trv55ibzgjmoifvwu7tb34ktssjhh/6gullbj7edgkiktugt2he7mesfwclsy5raw6dglloko3uspiqy2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1a8b5853f20cca42a7434f4727d84916c25cb1d882de1996b729dba49e88635 +size 281515 diff --git a/.inductor_cache/fxgraph/2p/f2pf3j65kzed74uq5lvpxpfplizuyv6x52wv7qv64wwtincssr3s/t34zgqbous3g4lrapvk3wbanvlmlwpbtm2hi2dmngublqtvxisf b/.inductor_cache/fxgraph/2p/f2pf3j65kzed74uq5lvpxpfplizuyv6x52wv7qv64wwtincssr3s/t34zgqbous3g4lrapvk3wbanvlmlwpbtm2hi2dmngublqtvxisf new file mode 100644 index 0000000000000000000000000000000000000000..c01b13aef66df35868db8e9c00f873a9aebb600a --- /dev/null +++ b/.inductor_cache/fxgraph/2p/f2pf3j65kzed74uq5lvpxpfplizuyv6x52wv7qv64wwtincssr3s/t34zgqbous3g4lrapvk3wbanvlmlwpbtm2hi2dmngublqtvxisf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ef993402ea4b66e2e207d55bb040daad8bb3c33668e8d0d8d3502b84eb7448a +size 147455 diff --git a/.inductor_cache/fxgraph/2u/f2uhif635vilodxlv35gpth7llbzckhikr3iwsrbg55jpg774kzz/ihyw5jfjjhba4ez3o7v6smsujpqvqkgeqlrf4lfn46hf7ja7goz b/.inductor_cache/fxgraph/2u/f2uhif635vilodxlv35gpth7llbzckhikr3iwsrbg55jpg774kzz/ihyw5jfjjhba4ez3o7v6smsujpqvqkgeqlrf4lfn46hf7ja7goz new file mode 100644 index 0000000000000000000000000000000000000000..86ef74ea137fba561075d6940e294c421d054755 --- /dev/null +++ b/.inductor_cache/fxgraph/2u/f2uhif635vilodxlv35gpth7llbzckhikr3iwsrbg55jpg774kzz/ihyw5jfjjhba4ez3o7v6smsujpqvqkgeqlrf4lfn46hf7ja7goz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41f16ea4a949c20e133b77ebe932544be15828c482e25e2cade78e5fa41f33b3 +size 118484 diff --git a/.inductor_cache/fxgraph/4c/f4crukekl2q4oj6klh4aefch64yefn72dasfszf24dnjhppejj3l/dw4ib5mfqhplqjzabsma6owfjrcpkyospwgpcet77ljmildo6dg b/.inductor_cache/fxgraph/4c/f4crukekl2q4oj6klh4aefch64yefn72dasfszf24dnjhppejj3l/dw4ib5mfqhplqjzabsma6owfjrcpkyospwgpcet77ljmildo6dg new file mode 100644 index 0000000000000000000000000000000000000000..6075c69630794b947e7328383286b95557b322be --- /dev/null +++ b/.inductor_cache/fxgraph/4c/f4crukekl2q4oj6klh4aefch64yefn72dasfszf24dnjhppejj3l/dw4ib5mfqhplqjzabsma6owfjrcpkyospwgpcet77ljmildo6dg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1db880f58581deb827200c980f3ac54c44f561d27d8cf1127ffad2c42c6ef0cc +size 109104 diff --git a/.inductor_cache/fxgraph/4j/f4jybcn634vohda6titi7rjezc327bgwoltofglm762dzwamzdrk/l4pbixckj6ctoue2a75adlb7u5glqh7bdxwvprzgnzimlpkw6dg b/.inductor_cache/fxgraph/4j/f4jybcn634vohda6titi7rjezc327bgwoltofglm762dzwamzdrk/l4pbixckj6ctoue2a75adlb7u5glqh7bdxwvprzgnzimlpkw6dg new file mode 100644 index 0000000000000000000000000000000000000000..75641b2f880966e5eb34e25f4f336127b20da439 --- /dev/null +++ b/.inductor_cache/fxgraph/4j/f4jybcn634vohda6titi7rjezc327bgwoltofglm762dzwamzdrk/l4pbixckj6ctoue2a75adlb7u5glqh7bdxwvprzgnzimlpkw6dg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f1e145c4a4f8537509a07fa01ac3fa74cb81fe11ded57c7266e50c5bd56f0cc +size 147458 diff --git a/.inductor_cache/fxgraph/4j/f4jz56k7lt5fzkjimb76e2yeurm2tos3ipwhwughnwcua37of4yz/t6bcknkpglo54urosygfl4fkfwoyt4zwq47inpzgybrkszraiii b/.inductor_cache/fxgraph/4j/f4jz56k7lt5fzkjimb76e2yeurm2tos3ipwhwughnwcua37of4yz/t6bcknkpglo54urosygfl4fkfwoyt4zwq47inpzgybrkszraiii new file mode 100644 index 0000000000000000000000000000000000000000..abdcb93b10d65652f074d799aa1cfbe29ae2f2bb --- /dev/null +++ b/.inductor_cache/fxgraph/4j/f4jz56k7lt5fzkjimb76e2yeurm2tos3ipwhwughnwcua37of4yz/t6bcknkpglo54urosygfl4fkfwoyt4zwq47inpzgybrkszraiii @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f8225354f32ddde522e960c55f0aa2d9d89f336873e86bf26c062a966204211 +size 109104 diff --git a/.inductor_cache/fxgraph/4v/f4v3fpddde5fxc5onden54afaldv44pfinjr3zwpoqshn4dcjdq7/5ekiicitorrjyxvyojy6sabvh7hdecyuayupme4guanzafuebbe b/.inductor_cache/fxgraph/4v/f4v3fpddde5fxc5onden54afaldv44pfinjr3zwpoqshn4dcjdq7/5ekiicitorrjyxvyojy6sabvh7hdecyuayupme4guanzafuebbe new file mode 100644 index 0000000000000000000000000000000000000000..4d6b76a776a9317e5de6e29149caca68e7fb675e --- /dev/null +++ b/.inductor_cache/fxgraph/4v/f4v3fpddde5fxc5onden54afaldv44pfinjr3zwpoqshn4dcjdq7/5ekiicitorrjyxvyojy6sabvh7hdecyuayupme4guanzafuebbe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e91484091374629c5eb87271e900353fce320b140628f61386a01b9016840849 +size 256822 diff --git a/.inductor_cache/fxgraph/4v/f4voaijtwe4rxxqyzibi75obtxemydk6jkevx54gwvuanxfiao2l/nhhp6x3jondquscd7cuzoq52aovdeujbkzmwzudwcxdcw2bgnce b/.inductor_cache/fxgraph/4v/f4voaijtwe4rxxqyzibi75obtxemydk6jkevx54gwvuanxfiao2l/nhhp6x3jondquscd7cuzoq52aovdeujbkzmwzudwcxdcw2bgnce new file mode 100644 index 0000000000000000000000000000000000000000..ebae15e934c968f0da679aefa2bfd77a9199cfb8 --- /dev/null +++ b/.inductor_cache/fxgraph/4v/f4voaijtwe4rxxqyzibi75obtxemydk6jkevx54gwvuanxfiao2l/nhhp6x3jondquscd7cuzoq52aovdeujbkzmwzudwcxdcw2bgnce @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69ceff5f6973470a4843f8a99743ba03aa32512156596cd07615c62b68266889 +size 179716 diff --git a/.inductor_cache/fxgraph/5k/f5k5zeqlmtxtd4jwnntyatfxjshxbmsjzmu3ev43krpb2tgi56g5/lu6n3wpw55jalcyxkmnrei6gm7svqf6z6rs2wzbgry2d3tcvvf2 b/.inductor_cache/fxgraph/5k/f5k5zeqlmtxtd4jwnntyatfxjshxbmsjzmu3ev43krpb2tgi56g5/lu6n3wpw55jalcyxkmnrei6gm7svqf6z6rs2wzbgry2d3tcvvf2 new file mode 100644 index 0000000000000000000000000000000000000000..18e51f2365e8b041011e8fbfa75d7cea76b485e1 --- /dev/null +++ b/.inductor_cache/fxgraph/5k/f5k5zeqlmtxtd4jwnntyatfxjshxbmsjzmu3ev43krpb2tgi56g5/lu6n3wpw55jalcyxkmnrei6gm7svqf6z6rs2wzbgry2d3tcvvf2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d3cddd9f6ef52058b17531b1223c667e55817d9f465ab64268e343dcc55a975 +size 118484 diff --git a/.inductor_cache/fxgraph/5q/f5qookrxhpxcnygkcsudllc6lzphv7z2bong6ortsxfsitfszgwx/5bn4r3hiosjxui5ozhesnrhxcxfggbs53wqwrwvwvi4iytnnfkf b/.inductor_cache/fxgraph/5q/f5qookrxhpxcnygkcsudllc6lzphv7z2bong6ortsxfsitfszgwx/5bn4r3hiosjxui5ozhesnrhxcxfggbs53wqwrwvwvi4iytnnfkf new file mode 100644 index 0000000000000000000000000000000000000000..2448d2f695dc04c97a2087b50ae2f1b774985d57 --- /dev/null +++ b/.inductor_cache/fxgraph/5q/f5qookrxhpxcnygkcsudllc6lzphv7z2bong6ortsxfsitfszgwx/5bn4r3hiosjxui5ozhesnrhxcxfggbs53wqwrwvwvi4iytnnfkf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e85bc8ece874937a23aec9c926c4f715ca63065ddda168dab6aa388c4dad2a8a +size 159554 diff --git a/.inductor_cache/fxgraph/5u/f5udb3yqw6ucuuxytagy7rrjgdadcka26nxm62ljjtnnpde2vnl3/teu2agn5grj5aehuwrr5y4a6g7ha3zuysju7trztwmlpkxzwjye b/.inductor_cache/fxgraph/5u/f5udb3yqw6ucuuxytagy7rrjgdadcka26nxm62ljjtnnpde2vnl3/teu2agn5grj5aehuwrr5y4a6g7ha3zuysju7trztwmlpkxzwjye new file mode 100644 index 0000000000000000000000000000000000000000..1df991c14c83c608b673892561245a5e3aca2b2a --- /dev/null +++ b/.inductor_cache/fxgraph/5u/f5udb3yqw6ucuuxytagy7rrjgdadcka26nxm62ljjtnnpde2vnl3/teu2agn5grj5aehuwrr5y4a6g7ha3zuysju7trztwmlpkxzwjye @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9929a019bd3453d010f4b463dc701e37ce0de6989269f9c733b316f55f364e08 +size 157777 diff --git a/.inductor_cache/fxgraph/6p/f6psuxovydhqk4xi3b22ojx42wojnf33fwf5drilv6vzbncv7fri/54jtv5thlxj7f4r5473jbalyqcp7h6p7tcyyxxv4rv3k7zpqkjv b/.inductor_cache/fxgraph/6p/f6psuxovydhqk4xi3b22ojx42wojnf33fwf5drilv6vzbncv7fri/54jtv5thlxj7f4r5473jbalyqcp7h6p7tcyyxxv4rv3k7zpqkjv new file mode 100644 index 0000000000000000000000000000000000000000..217c26bd79c0fd7e33bca023cd25b446364fe495 --- /dev/null +++ b/.inductor_cache/fxgraph/6p/f6psuxovydhqk4xi3b22ojx42wojnf33fwf5drilv6vzbncv7fri/54jtv5thlxj7f4r5473jbalyqcp7h6p7tcyyxxv4rv3k7zpqkjv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef133af6675dd3f2f23de7f6908178809ff3f9ff98b18bdebc8d76afe5f0526b +size 159554 diff --git a/.inductor_cache/fxgraph/6u/f6u25xqfyhztf263nqz5vado2ex7gvnlxfuqm66cfnt4z6ieimlp/dywxqfdb2gqp55mpbuvh5pr6qahukheadkm2llelsdohyznoogf b/.inductor_cache/fxgraph/6u/f6u25xqfyhztf263nqz5vado2ex7gvnlxfuqm66cfnt4z6ieimlp/dywxqfdb2gqp55mpbuvh5pr6qahukheadkm2llelsdohyznoogf new file mode 100644 index 0000000000000000000000000000000000000000..c6c08a7159dbc5e4bde2464f8ff36cd590b420dd --- /dev/null +++ b/.inductor_cache/fxgraph/6u/f6u25xqfyhztf263nqz5vado2ex7gvnlxfuqm66cfnt4z6ieimlp/dywxqfdb2gqp55mpbuvh5pr6qahukheadkm2llelsdohyznoogf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e2d781461d1a0fef58f0d2a7ebe3e800f451c801a99a5ac8b90dc7c65ae718a +size 139369 diff --git a/.inductor_cache/fxgraph/7o/f7opkp5cvt3j6ikw2fyouf64oba4fezzcj4r6zk7n4yv6p3m72eu/emfqppmxr4n7c5tbctsig2ga7hn6nclrazq4a3ka5u56bwx734m b/.inductor_cache/fxgraph/7o/f7opkp5cvt3j6ikw2fyouf64oba4fezzcj4r6zk7n4yv6p3m72eu/emfqppmxr4n7c5tbctsig2ga7hn6nclrazq4a3ka5u56bwx734m new file mode 100644 index 0000000000000000000000000000000000000000..0db103b61e8c07bc3d323264bf2cc1ac22f54f79 --- /dev/null +++ b/.inductor_cache/fxgraph/7o/f7opkp5cvt3j6ikw2fyouf64oba4fezzcj4r6zk7n4yv6p3m72eu/emfqppmxr4n7c5tbctsig2ga7hn6nclrazq4a3ka5u56bwx734m @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:230b07bd978f1bf1766114e48368c0f9dbe689710661c06d40ed3be0daffdf19 +size 179722 diff --git a/.inductor_cache/fxgraph/7t/f7tn2io7ayr7x5tu2gjd3vmrvbyenydz6oc52mxp4hofypxpeee6/qn6klb62v3wxkb4ouqb4najn2hjll3anozmroescfej6utvv4hz b/.inductor_cache/fxgraph/7t/f7tn2io7ayr7x5tu2gjd3vmrvbyenydz6oc52mxp4hofypxpeee6/qn6klb62v3wxkb4ouqb4najn2hjll3anozmroescfej6utvv4hz new file mode 100644 index 0000000000000000000000000000000000000000..ce1ebd212b956d8d567de8e52abb8b876fcbfc07 --- /dev/null +++ b/.inductor_cache/fxgraph/7t/f7tn2io7ayr7x5tu2gjd3vmrvbyenydz6oc52mxp4hofypxpeee6/qn6klb62v3wxkb4ouqb4najn2hjll3anozmroescfej6utvv4hz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:837ca587daaeed75078ea403c6812dd1d2b5ec0d76591712422913ea4eb5e1f2 +size 139369 diff --git a/.inductor_cache/fxgraph/a5/fa5wwiv5umznfk2rud2x76gcfkmgriafshohdcyfg7xpldpsluld/v7f4ds3qd7op7qywdbxdzjnnuavkrj5xkrt2vcdpkghya6457ou b/.inductor_cache/fxgraph/a5/fa5wwiv5umznfk2rud2x76gcfkmgriafshohdcyfg7xpldpsluld/v7f4ds3qd7op7qywdbxdzjnnuavkrj5xkrt2vcdpkghya6457ou new file mode 100644 index 0000000000000000000000000000000000000000..dba1cdfd38fa0da29a633f23b9d9f51971e77afd --- /dev/null +++ b/.inductor_cache/fxgraph/a5/fa5wwiv5umznfk2rud2x76gcfkmgriafshohdcyfg7xpldpsluld/v7f4ds3qd7op7qywdbxdzjnnuavkrj5xkrt2vcdpkghya6457ou @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afcbc1cb701fdcffc316186e3ca5ada02aa8a7b75467aa886f518f807b9dfba8 +size 281515 diff --git a/.inductor_cache/fxgraph/ag/fagpnbyz6qsj4o4rhzhe2ac2k7hdme2u6dnzzdnwj4w5uolubxql/7nfpyb4zwi4r6z5v2h6muyg7w3fjecn4fagrz3vdgnxwjgj7375 b/.inductor_cache/fxgraph/ag/fagpnbyz6qsj4o4rhzhe2ac2k7hdme2u6dnzzdnwj4w5uolubxql/7nfpyb4zwi4r6z5v2h6muyg7w3fjecn4fagrz3vdgnxwjgj7375 new file mode 100644 index 0000000000000000000000000000000000000000..24939f21f0ea664a424520680cf2bcc2ab76b2d8 --- /dev/null +++ b/.inductor_cache/fxgraph/ag/fagpnbyz6qsj4o4rhzhe2ac2k7hdme2u6dnzzdnwj4w5uolubxql/7nfpyb4zwi4r6z5v2h6muyg7w3fjecn4fagrz3vdgnxwjgj7375 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb4afc0799b2391f67b5d1fcca60dfb6ca9209bc280d1ceea3336f64993fdffb +size 281966 diff --git a/.inductor_cache/fxgraph/b4/fb4zezob3jxdhc73kfbgtguwug3mmje7nxolr36iz7kx46apw7df/lgvuv2uwxfvnlq3ohnze2firqcj33fihxg7dj6q76qvrx6hkkeu b/.inductor_cache/fxgraph/b4/fb4zezob3jxdhc73kfbgtguwug3mmje7nxolr36iz7kx46apw7df/lgvuv2uwxfvnlq3ohnze2firqcj33fihxg7dj6q76qvrx6hkkeu new file mode 100644 index 0000000000000000000000000000000000000000..ad20caab2a5c6cf721772b35943e48bad8b33028 --- /dev/null +++ b/.inductor_cache/fxgraph/b4/fb4zezob3jxdhc73kfbgtguwug3mmje7nxolr36iz7kx46apw7df/lgvuv2uwxfvnlq3ohnze2firqcj33fihxg7dj6q76qvrx6hkkeu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59ab4aea96b96ad5c36e3b724d15118093bd9507b9be34fa1ff42b1bf8ea5129 +size 159554 diff --git a/.inductor_cache/fxgraph/bc/fbc56yg6xd66zhguh2xlywojvovffbq2n7j4hmtuxzzwlbzzbzvk/n2hm7wnehwvy7dcevenu3tyodtyptvj4ky7pheh4nzks3v63ywg b/.inductor_cache/fxgraph/bc/fbc56yg6xd66zhguh2xlywojvovffbq2n7j4hmtuxzzwlbzzbzvk/n2hm7wnehwvy7dcevenu3tyodtyptvj4ky7pheh4nzks3v63ywg new file mode 100644 index 0000000000000000000000000000000000000000..6bc7e7d2b9bb09f728466f6b03e1c5ef36146441 --- /dev/null +++ b/.inductor_cache/fxgraph/bc/fbc56yg6xd66zhguh2xlywojvovffbq2n7j4hmtuxzzwlbzzbzvk/n2hm7wnehwvy7dcevenu3tyodtyptvj4ky7pheh4nzks3v63ywg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e8ecfd9a43dab8f8c44a91b4dcf0e1cf0f9d53c563ef390fc6e552dd7dbc58c +size 256822 diff --git a/.inductor_cache/fxgraph/bt/fbtavbf4pvujmngczgl6753sfx5lk4upod7lztkf6xn5mfo5ui2i/c3vic4qhyhwi6meuzp6tzqxgmtff45qcyke7ncdavm43jdyfrpi b/.inductor_cache/fxgraph/bt/fbtavbf4pvujmngczgl6753sfx5lk4upod7lztkf6xn5mfo5ui2i/c3vic4qhyhwi6meuzp6tzqxgmtff45qcyke7ncdavm43jdyfrpi new file mode 100644 index 0000000000000000000000000000000000000000..87b62d01e446b96f98cc74b38193329c6c92cc12 --- /dev/null +++ b/.inductor_cache/fxgraph/bt/fbtavbf4pvujmngczgl6753sfx5lk4upod7lztkf6xn5mfo5ui2i/c3vic4qhyhwi6meuzp6tzqxgmtff45qcyke7ncdavm43jdyfrpi @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16ea817207c1ec8f3094cbfd3cc2e664ca5e7602c289f68860ab39b48f058bd1 +size 139369 diff --git a/.inductor_cache/fxgraph/cs/fcsbsthsjevo3pq4hhgfznr43x43vci6svn52fswfmthwp7ceays/f7b6sqkvl6h7rbkrddgbhh2h4amnkd3pjfzcncyozean6m6fnvp b/.inductor_cache/fxgraph/cs/fcsbsthsjevo3pq4hhgfznr43x43vci6svn52fswfmthwp7ceays/f7b6sqkvl6h7rbkrddgbhh2h4amnkd3pjfzcncyozean6m6fnvp new file mode 100644 index 0000000000000000000000000000000000000000..4c9f6c84fcde6181905abe7fa9efc31867eb65bc --- /dev/null +++ b/.inductor_cache/fxgraph/cs/fcsbsthsjevo3pq4hhgfznr43x43vci6svn52fswfmthwp7ceays/f7b6sqkvl6h7rbkrddgbhh2h4amnkd3pjfzcncyozean6m6fnvp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fc3e941555f8ff8855118cc139f47e018d50f6f4972268b0ec900df33c56d5f +size 109104 diff --git a/.inductor_cache/fxgraph/d2/fd2odm7ueokhvpawrjqys35tbv2nw6o5yo7bznkfoynzjw77u6o3/ev6rhyy2or2qh5hkq5nfptoibvr454zmvb4fnqxaz742cpovcxw b/.inductor_cache/fxgraph/d2/fd2odm7ueokhvpawrjqys35tbv2nw6o5yo7bznkfoynzjw77u6o3/ev6rhyy2or2qh5hkq5nfptoibvr454zmvb4fnqxaz742cpovcxw new file mode 100644 index 0000000000000000000000000000000000000000..cf3244ae185fa3b6831aec4dfbebcae4a222359c --- /dev/null +++ b/.inductor_cache/fxgraph/d2/fd2odm7ueokhvpawrjqys35tbv2nw6o5yo7bznkfoynzjw77u6o3/ev6rhyy2or2qh5hkq5nfptoibvr454zmvb4fnqxaz742cpovcxw @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:257d13e31a747503f4ea875a57cdc80d63cef32ca87856c2e0cff9a13dd515ed +size 281515 diff --git a/.inductor_cache/fxgraph/d5/fd5i3x6ajyufaljzozolyk2vvlw5ifeocxk567pxqsldwnkgbzac/cvftq2lyjskfpmqggmfh7rw7wjkiwcodueaxdz7xptb2e5qr4oq b/.inductor_cache/fxgraph/d5/fd5i3x6ajyufaljzozolyk2vvlw5ifeocxk567pxqsldwnkgbzac/cvftq2lyjskfpmqggmfh7rw7wjkiwcodueaxdz7xptb2e5qr4oq new file mode 100644 index 0000000000000000000000000000000000000000..7171daf2576ddd6eb848cc3b7f25eead83edab1b --- /dev/null +++ b/.inductor_cache/fxgraph/d5/fd5i3x6ajyufaljzozolyk2vvlw5ifeocxk567pxqsldwnkgbzac/cvftq2lyjskfpmqggmfh7rw7wjkiwcodueaxdz7xptb2e5qr4oq @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:154b3869784c9457b206330a7fc6dfb2548b09c3a10171e7f77cc3a27611e3a0 +size 147452 diff --git a/.inductor_cache/fxgraph/db/fdbh2b7mmtbe7t2e3d5aelbwyuq46auimsmou63qd33zl72bvhhz/f4tskhvu6digwxpchylk7r7y74dcom4aww3je6gegxyxlajenek b/.inductor_cache/fxgraph/db/fdbh2b7mmtbe7t2e3d5aelbwyuq46auimsmou63qd33zl72bvhhz/f4tskhvu6digwxpchylk7r7y74dcom4aww3je6gegxyxlajenek new file mode 100644 index 0000000000000000000000000000000000000000..17064a62cb4f138a46dc93ec2f15aec55458297b --- /dev/null +++ b/.inductor_cache/fxgraph/db/fdbh2b7mmtbe7t2e3d5aelbwyuq46auimsmou63qd33zl72bvhhz/f4tskhvu6digwxpchylk7r7y74dcom4aww3je6gegxyxlajenek @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f27251eb4f0d06b5de23e16afc7f8ff06273380b5b69278c435f17581246915 +size 281515 diff --git a/.inductor_cache/fxgraph/di/fdiqmibwfdhcuuhs6ayweylnfwssarjftn3lqpexzhq2logikdnw/relotiy2jcf55dx27zynszkp5mmgz7enr6yhp24yr7rby3wknnb b/.inductor_cache/fxgraph/di/fdiqmibwfdhcuuhs6ayweylnfwssarjftn3lqpexzhq2logikdnw/relotiy2jcf55dx27zynszkp5mmgz7enr6yhp24yr7rby3wknnb new file mode 100644 index 0000000000000000000000000000000000000000..53a92d59c5f4c26d3630c22f6bf3aec9f80e0d2b --- /dev/null +++ b/.inductor_cache/fxgraph/di/fdiqmibwfdhcuuhs6ayweylnfwssarjftn3lqpexzhq2logikdnw/relotiy2jcf55dx27zynszkp5mmgz7enr6yhp24yr7rby3wknnb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8916e9a31a488bde8efafe70d9654feb186cfc8d8fb077eb988fe21c6eca6b42 +size 109104 diff --git a/.inductor_cache/fxgraph/dm/fdm2vzq6owyuyrvgtsaes3bqjsea7j5opkbrjzp5yvk5eaaie5pl/juvux776sz7j5tpilt2sb75ihyp7tky5qivngzbufmm3tjuqpba b/.inductor_cache/fxgraph/dm/fdm2vzq6owyuyrvgtsaes3bqjsea7j5opkbrjzp5yvk5eaaie5pl/juvux776sz7j5tpilt2sb75ihyp7tky5qivngzbufmm3tjuqpba new file mode 100644 index 0000000000000000000000000000000000000000..ab1c75f169d8a13aecab8f342f38025c80d58d5a --- /dev/null +++ b/.inductor_cache/fxgraph/dm/fdm2vzq6owyuyrvgtsaes3bqjsea7j5opkbrjzp5yvk5eaaie5pl/juvux776sz7j5tpilt2sb75ihyp7tky5qivngzbufmm3tjuqpba @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d2b4bfffe967e9ecde85cf520ffa83e1ff9ab1d822ad364342b19b9a6907840 +size 256822 diff --git a/.inductor_cache/fxgraph/do/fdoxsfn5zevmxnouexpdozewmmuesmji2gxbdbzj55iu2kzfirwm/hvjmffewl5g3xzs2qjxlyiinbyyddnb4vdrxjeuae74vp4m2wn6 b/.inductor_cache/fxgraph/do/fdoxsfn5zevmxnouexpdozewmmuesmji2gxbdbzj55iu2kzfirwm/hvjmffewl5g3xzs2qjxlyiinbyyddnb4vdrxjeuae74vp4m2wn6 new file mode 100644 index 0000000000000000000000000000000000000000..d503627acdfe995635623dd6f588e011658b9128 --- /dev/null +++ b/.inductor_cache/fxgraph/do/fdoxsfn5zevmxnouexpdozewmmuesmji2gxbdbzj55iu2kzfirwm/hvjmffewl5g3xzs2qjxlyiinbyyddnb4vdrxjeuae74vp4m2wn6 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d52c294965f4dbbe65a826ebc210d0e3031b43ca8e374928027f957f19ab37d +size 118484 diff --git a/.inductor_cache/fxgraph/e4/fe45sfef754ayge22g3uuqjzhgodjdocya5lpr2tx6l7i4vkqwit/6ry3bcpdcxz45iibyaetr3ddq2vx2x6ubevfyovvrvlttmmlivr b/.inductor_cache/fxgraph/e4/fe45sfef754ayge22g3uuqjzhgodjdocya5lpr2tx6l7i4vkqwit/6ry3bcpdcxz45iibyaetr3ddq2vx2x6ubevfyovvrvlttmmlivr new file mode 100644 index 0000000000000000000000000000000000000000..d49c0fbd0c400411f663937196141857c7fcc642 --- /dev/null +++ b/.inductor_cache/fxgraph/e4/fe45sfef754ayge22g3uuqjzhgodjdocya5lpr2tx6l7i4vkqwit/6ry3bcpdcxz45iibyaetr3ddq2vx2x6ubevfyovvrvlttmmlivr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f471b089e315f3cea101c00938ec6386ab7d5fd4092a5c3ab58d5739b18b4563 +size 147458