From 2de72a2259448ac3a24dc57ce025f8bb195acb99 Mon Sep 17 00:00:00 2001 From: Bartlomiej Kocot Date: Wed, 15 Jul 2026 16:04:06 +0000 Subject: [PATCH 01/11] feat(rocke): register D256 bf16 decode dispatcher candidate and tune gfx942 num_segments --- .../attention/decode/decode_shapes.json | 16 + .../attention/decode/decode_shapes_perf.csv | 1597 ++++++++++------- .../attention/decode/decode_shapes.json | 16 + .../rocke/library/dispatch/attention.py | 77 +- .../kernels/common/attention_unified.py | 25 +- .../attention/test_d256_decode_wiring.py | 228 +++ 6 files changed, 1295 insertions(+), 664 deletions(-) create mode 100644 dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py diff --git a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes.json b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes.json index 1a890de7afbb..48d8abc3e7e7 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes.json +++ b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes.json @@ -115,6 +115,22 @@ {"batch": 1, "seqlen_q": 1, "seqlen_k": 16384, "dtype": "fp16", "label": "qwen3_235b_fp16_b1_kv16384"}, {"batch": 1, "seqlen_q": 1, "seqlen_k": 32768, "dtype": "fp16", "label": "qwen3_235b_fp16_b1_kv32768"} ] + }, + { + "model": "Qwen3-Next-80B-A3B", + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "shapes": [ + {"batch": 1, "seqlen_q": 1, "seqlen_k": 512, "dtype": "bf16", "label": "qwen3next_80b_b1_kv512"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 1024, "dtype": "bf16", "label": "qwen3next_80b_b1_kv1024"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 2048, "dtype": "bf16", "label": "qwen3next_80b_b1_kv2048"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 4096, "dtype": "bf16", "label": "qwen3next_80b_b1_kv4096"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 8192, "dtype": "bf16", "label": "qwen3next_80b_b1_kv8192"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 16384, "dtype": "bf16", "label": "qwen3next_80b_b1_kv16384"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 32768, "dtype": "bf16", "label": "qwen3next_80b_b1_kv32768"} + ] } ] } diff --git a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes_perf.csv b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes_perf.csv index ed1d5f62dd1f..1f643ccb7222 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes_perf.csv +++ b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes_perf.csv @@ -12,30 +12,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.0456018590927124, - "aoTriton_ms": 0.028075098991394043, + "triton_ms": 0.045930638313293456, + "aoTriton_ms": 0.03057126045227051, "dsl": { "30": { - "ms": 0.05544295787811279, + "ms": 0.05826066017150879, "path": "2d" }, "60": { - "ms": 0.058234181404113766, + "ms": 0.06028773784637451, "path": "2d" }, "80": { - "ms": 0.054544081687927244, + "ms": 0.057419538497924805, "path": "2d" }, "120": { - "ms": 0.05677802085876465, + "ms": 0.05900720119476319, "path": "2d" } }, "best_sms": 80, - "best_ms": 0.054544081687927244, - "best_speedup_vs_triton": 0.8360551260835672, - "best_speedup_vs_aoTriton": 0.5147231032694821, + "best_ms": 0.057419538497924805, + "best_speedup_vs_triton": 0.7999130525048269, + "best_speedup_vs_aoTriton": 0.5324191251271617, "best_path": "2d" }, { @@ -51,30 +51,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08846302032470703, - "aoTriton_ms": 0.04755035877227783, + "triton_ms": 0.08820249557495118, + "aoTriton_ms": 0.04751912117004395, "dsl": { "30": { - "ms": 0.02925057888031006, + "ms": 0.03284290075302124, "path": "3d" }, "60": { - "ms": 0.027333381175994872, + "ms": 0.0328918194770813, "path": "3d" }, "80": { - "ms": 0.027101640701293946, + "ms": 0.03156235933303833, "path": "3d" }, "120": { - "ms": 0.026928460597991942, + "ms": 0.031061999797821045, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.026928460597991942, - "best_speedup_vs_triton": 3.2851124186171905, - "best_speedup_vs_aoTriton": 1.765803084036065, + "best_ms": 0.031061999797821045, + "best_speedup_vs_triton": 2.8395626858879335, + "best_speedup_vs_aoTriton": 1.5298152559184983, "best_path": "3d" }, { @@ -90,30 +90,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08943408012390136, - "aoTriton_ms": 0.09122699737548828, + "triton_ms": 0.08744312286376953, + "aoTriton_ms": 0.09125592231750489, "dsl": { "30": { - "ms": 0.028017361164093018, + "ms": 0.03232167959213257, "path": "3d" }, "60": { - "ms": 0.028060638904571535, + "ms": 0.03227358102798462, "path": "3d" }, "80": { - "ms": 0.02763967990875244, + "ms": 0.031833360195159914, "path": "3d" }, "120": { - "ms": 0.02915518045425415, + "ms": 0.03240348100662231, "path": "3d" } }, "best_sms": 80, - "best_ms": 0.02763967990875244, - "best_speedup_vs_triton": 3.2357133085170413, - "best_speedup_vs_aoTriton": 3.3005808199175326, + "best_ms": 0.031833360195159914, + "best_speedup_vs_triton": 2.7469020652448988, + "best_speedup_vs_aoTriton": 2.866675769005995, "best_path": "3d" }, { @@ -129,30 +129,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08883748054504395, - "aoTriton_ms": 0.1876980781555176, + "triton_ms": 0.08760432243347167, + "aoTriton_ms": 0.1873253631591797, "dsl": { "30": { - "ms": 0.04282025814056396, + "ms": 0.04310736179351807, "path": "3d" }, "60": { - "ms": 0.029717280864715576, + "ms": 0.03197527885437012, "path": "3d" }, "80": { - "ms": 0.02828197956085205, + "ms": 0.03256946086883545, "path": "3d" }, "120": { - "ms": 0.027237160205841063, + "ms": 0.03102992057800293, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.027237160205841063, - "best_speedup_vs_triton": 3.2616278596471515, - "best_speedup_vs_aoTriton": 6.891249922422726, + "best_ms": 0.03102992057800293, + "best_speedup_vs_triton": 2.8232209687179886, + "best_speedup_vs_aoTriton": 6.036926929551163, "best_path": "3d" }, { @@ -168,30 +168,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08854080200195312, - "aoTriton_ms": 0.37042232513427736, + "triton_ms": 0.08857695579528808, + "aoTriton_ms": 0.3701787948608398, "dsl": { "30": { - "ms": 0.07365851879119872, + "ms": 0.07387186050415039, "path": "3d" }, "60": { - "ms": 0.04367102146148682, + "ms": 0.04401103973388672, "path": "3d" }, "80": { - "ms": 0.032708160877227783, + "ms": 0.03287977933883667, "path": "3d" }, "120": { - "ms": 0.03271620035171509, + "ms": 0.03285814046859741, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.032708160877227783, - "best_speedup_vs_triton": 2.706994206561989, - "best_speedup_vs_aoTriton": 11.325073474007961, + "best_sms": 120, + "best_ms": 0.03285814046859741, + "best_speedup_vs_triton": 2.6957385455193745, + "best_speedup_vs_aoTriton": 11.265969089596547, "best_path": "3d" }, { @@ -207,30 +207,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08822810173034668, - "aoTriton_ms": 0.7368000030517579, + "triton_ms": 0.0883963394165039, + "aoTriton_ms": 0.7359786224365235, "dsl": { "30": { - "ms": 0.13634453773498534, + "ms": 0.1362869167327881, "path": "3d" }, "60": { - "ms": 0.07532154083251953, + "ms": 0.07543385982513427, "path": "3d" }, "80": { - "ms": 0.05296204090118408, + "ms": 0.052780041694641115, "path": "3d" }, "120": { - "ms": 0.05289787769317627, + "ms": 0.05272071838378906, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.05289787769317627, - "best_speedup_vs_triton": 1.6678949246715797, - "best_speedup_vs_aoTriton": 13.928725218909939, + "best_ms": 0.05272071838378906, + "best_speedup_vs_triton": 1.676690722857916, + "best_speedup_vs_aoTriton": 13.95995056590176, "best_path": "3d" }, { @@ -246,30 +246,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08824432373046875, - "aoTriton_ms": 1.59133056640625, + "triton_ms": 0.0882962989807129, + "aoTriton_ms": 1.5905145263671876, "dsl": { "30": { - "ms": 0.2650442886352539, + "ms": 0.26536279678344726, "path": "3d" }, "60": { - "ms": 0.140045862197876, + "ms": 0.1399962615966797, "path": "3d" }, "80": { - "ms": 0.09239447593688965, + "ms": 0.0926046371459961, "path": "3d" }, "120": { - "ms": 0.09227902412414551, + "ms": 0.09251482009887696, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.09227902412414551, - "best_speedup_vs_triton": 0.9562771666478748, - "best_speedup_vs_aoTriton": 17.244770211975684, + "best_ms": 0.09251482009887696, + "best_speedup_vs_triton": 0.9544016719304492, + "best_speedup_vs_aoTriton": 17.191997181287228, "best_path": "3d" }, { @@ -285,30 +285,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.044551458358764645, - "aoTriton_ms": 0.028409459590911866, + "triton_ms": 0.04450096130371094, + "aoTriton_ms": 0.028347740173339842, "dsl": { "30": { - "ms": 0.06578757762908935, + "ms": 0.06549816131591797, "path": "2d" }, "60": { - "ms": 0.06638415813446046, + "ms": 0.06666163921356201, "path": "2d" }, "80": { - "ms": 0.06490876197814942, + "ms": 0.06502828121185303, "path": "2d" }, "120": { - "ms": 0.06615561962127686, + "ms": 0.06617331981658936, "path": "2d" } }, "best_sms": 80, - "best_ms": 0.06490876197814942, - "best_speedup_vs_triton": 0.6863704837532141, - "best_speedup_vs_aoTriton": 0.4376829679862866, + "best_ms": 0.06502828121185303, + "best_speedup_vs_triton": 0.684332423899273, + "best_speedup_vs_aoTriton": 0.4359294086366342, "best_path": "2d" }, { @@ -324,30 +324,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0886081600189209, - "aoTriton_ms": 0.04462681770324707, + "triton_ms": 0.08721139907836914, + "aoTriton_ms": 0.04458755970001221, "dsl": { "30": { - "ms": 0.02729327917098999, + "ms": 0.030773320198059083, "path": "3d" }, "60": { - "ms": 0.028127200603485107, + "ms": 0.03075488090515137, "path": "3d" }, "80": { - "ms": 0.026252501010894776, + "ms": 0.030913639068603515, "path": "3d" }, "120": { - "ms": 0.02645133972167969, + "ms": 0.030938520431518554, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.026252501010894776, - "best_speedup_vs_triton": 3.375227372894817, - "best_speedup_vs_aoTriton": 1.6999072844422314, + "best_sms": 60, + "best_ms": 0.03075488090515137, + "best_speedup_vs_triton": 2.8356929538218902, + "best_speedup_vs_aoTriton": 1.449771821179249, "best_path": "3d" }, { @@ -363,30 +363,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08808615684509277, - "aoTriton_ms": 0.08586263656616211, + "triton_ms": 0.08776388168334961, + "aoTriton_ms": 0.08595731735229492, "dsl": { "30": { - "ms": 0.029641098976135254, + "ms": 0.033032939434051514, "path": "3d" }, "60": { - "ms": 0.027211480140686035, + "ms": 0.0330786395072937, "path": "3d" }, "80": { - "ms": 0.026828219890594484, + "ms": 0.03195605993270874, "path": "3d" }, "120": { - "ms": 0.027005419731140137, + "ms": 0.031802899837493896, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.026828219890594484, - "best_speedup_vs_triton": 3.2833396030116138, - "best_speedup_vs_aoTriton": 3.2004596993878107, + "best_sms": 120, + "best_ms": 0.031802899837493896, + "best_speedup_vs_triton": 2.7596188439357583, + "best_speedup_vs_aoTriton": 2.7028138248876257, "best_path": "3d" }, { @@ -402,30 +402,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0876956558227539, - "aoTriton_ms": 0.18424774169921876, + "triton_ms": 0.087913818359375, + "aoTriton_ms": 0.18398164749145507, "dsl": { "30": { - "ms": 0.041673622131347655, + "ms": 0.04194387912750244, "path": "3d" }, "60": { - "ms": 0.029048540592193604, + "ms": 0.03256063938140869, "path": "3d" }, "80": { - "ms": 0.0271834397315979, + "ms": 0.03229363918304443, "path": "3d" }, "120": { - "ms": 0.026483440399169923, + "ms": 0.03085592031478882, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.026483440399169923, - "best_speedup_vs_triton": 3.3113392558129484, - "best_speedup_vs_aoTriton": 6.957092391402202, + "best_ms": 0.03085592031478882, + "best_speedup_vs_triton": 2.8491718108708985, + "best_speedup_vs_aoTriton": 5.962604440719766, "best_path": "3d" }, { @@ -441,30 +441,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08839808464050293, - "aoTriton_ms": 0.3638062286376953, + "triton_ms": 0.08863287925720215, + "aoTriton_ms": 0.36303592681884767, "dsl": { "30": { - "ms": 0.07154243946075439, + "ms": 0.07187925815582276, "path": "3d" }, "60": { - "ms": 0.04267111778259278, + "ms": 0.04269440174102783, "path": "3d" }, "80": { - "ms": 0.032234280109405516, + "ms": 0.0325734806060791, "path": "3d" }, "120": { - "ms": 0.03233288049697876, + "ms": 0.03335206031799316, "path": "3d" } }, "best_sms": 80, - "best_ms": 0.032234280109405516, - "best_speedup_vs_triton": 2.7423626133567534, - "best_speedup_vs_aoTriton": 11.286314675026407, + "best_ms": 0.0325734806060791, + "best_speedup_vs_triton": 2.7210134627326514, + "best_speedup_vs_aoTriton": 11.145137702941554, "best_path": "3d" }, { @@ -480,30 +480,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08855323791503907, - "aoTriton_ms": 0.7220821380615234, + "triton_ms": 0.09064971923828125, + "aoTriton_ms": 0.7208148956298828, "dsl": { "30": { - "ms": 0.1321340560913086, + "ms": 0.13234583854675294, "path": "3d" }, "60": { - "ms": 0.07320467948913574, + "ms": 0.07312935829162598, "path": "3d" }, "80": { - "ms": 0.05165502071380615, + "ms": 0.050550899505615234, "path": "3d" }, "120": { - "ms": 0.051582040786743166, + "ms": 0.05050759792327881, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.051582040786743166, - "best_speedup_vs_triton": 1.7167455293431833, - "best_speedup_vs_aoTriton": 13.998712091420431, + "best_ms": 0.05050759792327881, + "best_speedup_vs_triton": 1.7947739145302146, + "best_speedup_vs_aoTriton": 14.271415099264921, "best_path": "3d" }, { @@ -519,30 +519,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0887483024597168, - "aoTriton_ms": 1.5994796752929688, + "triton_ms": 0.08860602378845214, + "aoTriton_ms": 1.5988369750976563, "dsl": { "30": { - "ms": 0.2568092918395996, + "ms": 0.2565561294555664, "path": "3d" }, "60": { - "ms": 0.13568061828613281, + "ms": 0.13583308219909668, "path": "3d" }, "80": { - "ms": 0.08837242126464843, + "ms": 0.0909199619293213, "path": "3d" }, "120": { - "ms": 0.08826257705688477, + "ms": 0.09075475692749023, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.08826257705688477, - "best_speedup_vs_triton": 1.0055031862769992, - "best_speedup_vs_aoTriton": 18.12183292883135, + "best_ms": 0.09075475692749023, + "best_speedup_vs_triton": 0.9763237409058916, + "best_speedup_vs_aoTriton": 17.617114840328085, "best_path": "3d" }, { @@ -558,30 +558,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.045001277923583986, - "aoTriton_ms": 0.030519120693206787, + "triton_ms": 0.04499330043792724, + "aoTriton_ms": 0.028747859001159667, "dsl": { "30": { - "ms": 0.055666661262512206, + "ms": 0.05783810138702392, "path": "2d" }, "60": { - "ms": 0.05882996082305908, + "ms": 0.06033505916595459, "path": "2d" }, "80": { - "ms": 0.05562096118927002, + "ms": 0.057433180809020996, "path": "2d" }, "120": { - "ms": 0.05667779922485352, + "ms": 0.05944180011749268, "path": "2d" } }, "best_sms": 80, - "best_ms": 0.05562096118927002, - "best_speedup_vs_triton": 0.809070482806854, - "best_speedup_vs_aoTriton": 0.5486981893274852, + "best_ms": 0.057433180809020996, + "best_speedup_vs_triton": 0.7834025523945937, + "best_speedup_vs_aoTriton": 0.5005444343532556, "best_path": "2d" }, { @@ -597,30 +597,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.09233996391296387, - "aoTriton_ms": 0.04828968048095703, + "triton_ms": 0.09008119583129882, + "aoTriton_ms": 0.04822874069213867, "dsl": { "30": { - "ms": 0.02874703884124756, + "ms": 0.03165456056594849, "path": "3d" }, "60": { - "ms": 0.02782572031021118, + "ms": 0.03115499973297119, "path": "3d" }, "80": { - "ms": 0.027049520015716554, + "ms": 0.03141479969024658, "path": "3d" }, "120": { - "ms": 0.026830620765686035, + "ms": 0.030816640853881836, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.026830620765686035, - "best_speedup_vs_triton": 3.441588799580009, - "best_speedup_vs_aoTriton": 1.7997973622255963, + "best_ms": 0.030816640853881836, + "best_speedup_vs_triton": 2.9231348172703804, + "best_speedup_vs_aoTriton": 1.5650226421762485, "best_path": "3d" }, { @@ -636,30 +636,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.089166259765625, - "aoTriton_ms": 0.09671483993530273, + "triton_ms": 0.08867557525634766, + "aoTriton_ms": 0.09666440010070801, "dsl": { "30": { - "ms": 0.02782249927520752, + "ms": 0.03254139900207519, "path": "3d" }, "60": { - "ms": 0.030800580978393555, + "ms": 0.0334154200553894, "path": "3d" }, "80": { - "ms": 0.03012701988220215, + "ms": 0.032741880416870116, "path": "3d" }, "120": { - "ms": 0.02964751958847046, + "ms": 0.03257669925689697, "path": "3d" } }, "best_sms": 30, - "best_ms": 0.02782249927520752, - "best_speedup_vs_triton": 3.204825665862469, - "best_speedup_vs_aoTriton": 3.476137746600098, + "best_ms": 0.03254139900207519, + "best_speedup_vs_triton": 2.7250080812657362, + "best_speedup_vs_aoTriton": 2.970505358252841, "best_path": "3d" }, { @@ -675,30 +675,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08993202209472656, - "aoTriton_ms": 0.18871723175048827, + "triton_ms": 0.08681050300598145, + "aoTriton_ms": 0.18812557220458984, "dsl": { "30": { - "ms": 0.0430584192276001, + "ms": 0.043102540969848634, "path": "3d" }, "60": { - "ms": 0.02977260112762451, + "ms": 0.0320755410194397, "path": "3d" }, "80": { - "ms": 0.027494540214538576, + "ms": 0.03224152088165283, "path": "3d" }, "120": { - "ms": 0.026732800006866456, + "ms": 0.031440460681915285, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.026732800006866456, - "best_speedup_vs_triton": 3.364107840242214, - "best_speedup_vs_aoTriton": 7.059388904342803, + "best_ms": 0.031440460681915285, + "best_speedup_vs_triton": 2.7611078566643044, + "best_speedup_vs_aoTriton": 5.983550117406538, "best_path": "3d" }, { @@ -714,30 +714,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.09003625869750977, - "aoTriton_ms": 0.372541618347168, + "triton_ms": 0.08926254272460937, + "aoTriton_ms": 0.3719356536865234, "dsl": { "30": { - "ms": 0.07413884162902833, + "ms": 0.07433931827545166, "path": "3d" }, "60": { - "ms": 0.04388751983642578, + "ms": 0.04409604072570801, "path": "3d" }, "80": { - "ms": 0.03298882007598877, + "ms": 0.03336730003356934, "path": "3d" }, "120": { - "ms": 0.03285650014877319, + "ms": 0.033288719654083254, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.03285650014877319, - "best_speedup_vs_triton": 2.740287562273171, - "best_speedup_vs_aoTriton": 11.338444954889027, + "best_ms": 0.033288719654083254, + "best_speedup_vs_triton": 2.681465182565538, + "best_speedup_vs_aoTriton": 11.173023701465825, "best_path": "3d" }, { @@ -753,30 +753,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.0908372974395752, - "aoTriton_ms": 0.8037422943115234, + "triton_ms": 0.08850337982177735, + "aoTriton_ms": 0.8044700622558594, "dsl": { "30": { - "ms": 0.13675909996032715, + "ms": 0.1369837188720703, "path": "3d" }, "60": { - "ms": 0.07558135986328125, + "ms": 0.0756126594543457, "path": "3d" }, "80": { - "ms": 0.05273752212524414, + "ms": 0.05307432174682617, "path": "3d" }, "120": { - "ms": 0.0527278995513916, + "ms": 0.05301018238067627, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.0527278995513916, - "best_speedup_vs_triton": 1.7227558505538423, - "best_speedup_vs_aoTriton": 15.243207128479499, + "best_ms": 0.05301018238067627, + "best_speedup_vs_triton": 1.6695543355466622, + "best_speedup_vs_aoTriton": 15.175764846059305, "best_path": "3d" }, { @@ -792,30 +792,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08840510368347168, - "aoTriton_ms": 1.6082568359375, + "triton_ms": 0.08832216262817383, + "aoTriton_ms": 1.5979205322265626, "dsl": { "30": { - "ms": 0.26605863571166993, + "ms": 0.2659256935119629, "path": "3d" }, "60": { - "ms": 0.14066729545593262, + "ms": 0.1404693603515625, "path": "3d" }, "80": { - "ms": 0.09089422225952148, + "ms": 0.09310979843139648, "path": "3d" }, "120": { - "ms": 0.09086855888366699, + "ms": 0.09302800178527831, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.09086855888366699, - "best_speedup_vs_triton": 0.9728899057005063, - "best_speedup_vs_aoTriton": 17.698716208281073, + "best_ms": 0.09302800178527831, + "best_speedup_vs_triton": 0.949414809876641, + "best_speedup_vs_aoTriton": 17.17676937654522, "best_path": "3d" }, { @@ -831,30 +831,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.044979639053344726, - "aoTriton_ms": 0.028791940212249754, + "triton_ms": 0.045028581619262695, + "aoTriton_ms": 0.029026899337768555, "dsl": { "30": { - "ms": 0.06576352119445801, + "ms": 0.06568418025970459, "path": "2d" }, "60": { - "ms": 0.06689174175262451, + "ms": 0.0670513391494751, "path": "2d" }, "80": { - "ms": 0.06504265785217285, + "ms": 0.06537146091461182, "path": "2d" }, "120": { - "ms": 0.07906538009643554, + "ms": 0.06670494079589843, "path": "2d" } }, "best_sms": 80, - "best_ms": 0.06504265785217285, - "best_speedup_vs_triton": 0.6915406064059252, - "best_speedup_vs_aoTriton": 0.44266241821924435, + "best_ms": 0.06537146091461182, + "best_speedup_vs_triton": 0.6888110039039668, + "best_speedup_vs_aoTriton": 0.4440301460553785, "best_path": "2d" }, { @@ -870,30 +870,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0874855613708496, - "aoTriton_ms": 0.04548882007598877, + "triton_ms": 0.08888405799865723, + "aoTriton_ms": 0.045285181999206545, "dsl": { "30": { - "ms": 0.027396719455718994, + "ms": 0.030737240314483643, "path": "3d" }, "60": { - "ms": 0.02683543920516968, + "ms": 0.03109325885772705, "path": "3d" }, "80": { - "ms": 0.026452159881591795, + "ms": 0.031307361125946044, "path": "3d" }, "120": { - "ms": 0.027401540279388428, + "ms": 0.03313397884368897, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.026452159881591795, - "best_speedup_vs_triton": 3.3073125885546792, - "best_speedup_vs_aoTriton": 1.7196637355743751, + "best_sms": 30, + "best_ms": 0.030737240314483643, + "best_speedup_vs_triton": 2.8917383958108407, + "best_speedup_vs_aoTriton": 1.473300190123698, "best_path": "3d" }, { @@ -909,30 +909,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0889762020111084, - "aoTriton_ms": 0.09491310119628907, + "triton_ms": 0.08770294189453125, + "aoTriton_ms": 0.09484259605407715, "dsl": { "30": { - "ms": 0.027806479930877686, + "ms": 0.03226958036422729, "path": "3d" }, "60": { - "ms": 0.02758836030960083, + "ms": 0.03202100038528442, "path": "3d" }, "80": { - "ms": 0.027181038856506346, + "ms": 0.03232409954071045, "path": "3d" }, "120": { - "ms": 0.027177019119262694, + "ms": 0.03235538005828857, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.027177019119262694, - "best_speedup_vs_triton": 3.2739500097729004, - "best_speedup_vs_aoTriton": 3.4924029298347876, + "best_sms": 60, + "best_ms": 0.03202100038528442, + "best_speedup_vs_triton": 2.7389194853148946, + "best_speedup_vs_aoTriton": 2.96188735245333, "best_path": "3d" }, { @@ -948,30 +948,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08831310272216797, - "aoTriton_ms": 0.1852444267272949, + "triton_ms": 0.08773019790649414, + "aoTriton_ms": 0.1851034355163574, "dsl": { "30": { - "ms": 0.0420143985748291, + "ms": 0.042154760360717775, "path": "3d" }, "60": { - "ms": 0.029275460243225096, + "ms": 0.03234416007995605, "path": "3d" }, "80": { - "ms": 0.027938780784606935, + "ms": 0.03237060070037842, "path": "3d" }, "120": { - "ms": 0.028197760581970214, + "ms": 0.03205627918243408, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.027938780784606935, - "best_speedup_vs_triton": 3.1609504868166862, - "best_speedup_vs_aoTriton": 6.6303690256003085, + "best_sms": 120, + "best_ms": 0.03205627918243408, + "best_speedup_vs_triton": 2.7367554857884993, + "best_speedup_vs_aoTriton": 5.774326909961178, "best_path": "3d" }, { @@ -987,30 +987,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08881423950195312, - "aoTriton_ms": 0.36550777435302734, + "triton_ms": 0.08720999717712402, + "aoTriton_ms": 0.36465408325195314, "dsl": { "30": { - "ms": 0.07217269897460937, + "ms": 0.0722777795791626, "path": "3d" }, "60": { - "ms": 0.04299026012420654, + "ms": 0.043315038681030274, "path": "3d" }, "80": { - "ms": 0.03272742033004761, + "ms": 0.03283087968826294, "path": "3d" }, "120": { - "ms": 0.03280839920043945, + "ms": 0.03363271951675415, "path": "3d" } }, "best_sms": 80, - "best_ms": 0.03272742033004761, - "best_speedup_vs_triton": 2.7137561899558347, - "best_speedup_vs_aoTriton": 11.16824273550972, + "best_ms": 0.03283087968826294, + "best_speedup_vs_triton": 2.6563405551481964, + "best_speedup_vs_aoTriton": 11.107045766498825, "best_path": "3d" }, { @@ -1026,30 +1026,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08911312103271485, - "aoTriton_ms": 0.8088990020751953, + "triton_ms": 0.08944835662841796, + "aoTriton_ms": 0.8090968322753906, "dsl": { "30": { - "ms": 0.13337692260742187, + "ms": 0.1332615566253662, "path": "3d" }, "60": { - "ms": 0.07382612228393555, + "ms": 0.07380290031433105, "path": "3d" }, "80": { - "ms": 0.05120997905731201, + "ms": 0.052009482383728024, "path": "3d" }, "120": { - "ms": 0.051262102127075194, + "ms": 0.051995038986206055, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.05120997905731201, - "best_speedup_vs_triton": 1.7401514836196919, - "best_speedup_vs_aoTriton": 15.795729991803164, + "best_sms": 120, + "best_ms": 0.051995038986206055, + "best_speedup_vs_triton": 1.7203248304544598, + "best_speedup_vs_aoTriton": 15.56103905393818, "best_path": "3d" }, { @@ -1065,30 +1065,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08814408302307129, - "aoTriton_ms": 1.6142866516113281, + "triton_ms": 0.08780757904052734, + "aoTriton_ms": 1.6059767150878905, "dsl": { "30": { - "ms": 0.25890134811401366, + "ms": 0.259506893157959, "path": "3d" }, "60": { - "ms": 0.13674548149108887, + "ms": 0.13713447570800782, "path": "3d" }, "80": { - "ms": 0.09165038108825684, + "ms": 0.09189417839050293, "path": "3d" }, "120": { - "ms": 0.09168326377868652, + "ms": 0.09187013626098633, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.09165038108825684, - "best_speedup_vs_triton": 0.9617426788241167, - "best_speedup_vs_aoTriton": 17.61352907040085, + "best_sms": 120, + "best_ms": 0.09187013626098633, + "best_speedup_vs_triton": 0.955779349135632, + "best_speedup_vs_aoTriton": 17.48094408530758, "best_path": "3d" }, { @@ -1104,30 +1104,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.04507905960083008, - "aoTriton_ms": 0.02874382019042969, + "triton_ms": 0.04444643974304199, + "aoTriton_ms": 0.029012479782104493, "dsl": { "30": { - "ms": 0.05536595821380615, + "ms": 0.05781003952026367, "path": "2d" }, "60": { - "ms": 0.056996941566467285, + "ms": 0.06902068138122558, "path": "2d" }, "80": { - "ms": 0.054440641403198244, + "ms": 0.057149319648742675, "path": "2d" }, "120": { - "ms": 0.05614215850830078, + "ms": 0.05867763996124267, "path": "2d" } }, "best_sms": 80, - "best_ms": 0.054440641403198244, - "best_speedup_vs_triton": 0.8280405674680718, - "best_speedup_vs_aoTriton": 0.527984598446356, + "best_ms": 0.057149319648742675, + "best_speedup_vs_triton": 0.7777247396158607, + "best_speedup_vs_aoTriton": 0.507660982850262, "best_path": "2d" }, { @@ -1143,30 +1143,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.09279301643371582, - "aoTriton_ms": 0.05153153896331787, + "triton_ms": 0.09051502227783204, + "aoTriton_ms": 0.05142652034759521, "dsl": { "30": { - "ms": 0.027747139930725098, + "ms": 0.03153507947921753, "path": "3d" }, "60": { - "ms": 0.027781620025634765, + "ms": 0.031368300914764405, "path": "3d" }, "80": { - "ms": 0.026323859691619874, + "ms": 0.03163450002670288, "path": "3d" }, "120": { - "ms": 0.026744821071624757, + "ms": 0.03077091932296753, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.026323859691619874, - "best_speedup_vs_triton": 3.525053602350578, - "best_speedup_vs_aoTriton": 1.9575981473462567, + "best_sms": 120, + "best_ms": 0.03077091932296753, + "best_speedup_vs_triton": 2.941576796188578, + "best_speedup_vs_aoTriton": 1.6712701953370066, "best_path": "3d" }, { @@ -1182,30 +1182,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08860896110534668, - "aoTriton_ms": 0.09785987854003907, + "triton_ms": 0.08857695579528808, + "aoTriton_ms": 0.09773006439208984, "dsl": { "30": { - "ms": 0.027875421047210695, + "ms": 0.03311553955078125, "path": "3d" }, "60": { - "ms": 0.027792840003967284, + "ms": 0.0324179196357727, "path": "3d" }, "80": { - "ms": 0.027780001163482667, + "ms": 0.03251976013183594, "path": "3d" }, "120": { - "ms": 0.027802460193634033, + "ms": 0.03172754049301148, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.027780001163482667, - "best_speedup_vs_triton": 3.189667292808642, - "best_speedup_vs_aoTriton": 3.522673665999615, + "best_sms": 120, + "best_ms": 0.03172754049301148, + "best_speedup_vs_triton": 2.791800259928709, + "best_speedup_vs_aoTriton": 3.080291219346691, "best_path": "3d" }, { @@ -1221,30 +1221,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08992881774902343, - "aoTriton_ms": 0.1905278205871582, + "triton_ms": 0.08880707740783692, + "aoTriton_ms": 0.19016790390014648, "dsl": { "30": { - "ms": 0.04296140193939209, + "ms": 0.04312498092651367, "path": "3d" }, "60": { - "ms": 0.0428964376449585, + "ms": 0.043127398490905765, "path": "3d" }, "80": { - "ms": 0.03393739938735962, + "ms": 0.0346069598197937, "path": "3d" }, "120": { - "ms": 0.03301448106765747, + "ms": 0.03356215953826904, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.03301448106765747, - "best_speedup_vs_triton": 2.7239203779920054, - "best_speedup_vs_aoTriton": 5.771037872644564, + "best_ms": 0.03356215953826904, + "best_speedup_vs_triton": 2.64604777015541, + "best_speedup_vs_aoTriton": 5.666140275726558, "best_path": "3d" }, { @@ -1260,30 +1260,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.0890413761138916, - "aoTriton_ms": 0.41119384765625, + "triton_ms": 0.09006077766418458, + "aoTriton_ms": 0.41084617614746094, "dsl": { "30": { - "ms": 0.07379161834716796, + "ms": 0.0735727596282959, "path": "3d" }, "60": { - "ms": 0.07339230060577392, + "ms": 0.07360243797302246, "path": "3d" }, "80": { - "ms": 0.05137998104095459, + "ms": 0.05093500137329102, "path": "3d" }, "120": { - "ms": 0.0514176607131958, + "ms": 0.050983099937438964, "path": "3d" } }, "best_sms": 80, - "best_ms": 0.05137998104095459, - "best_speedup_vs_triton": 1.732997449783358, - "best_speedup_vs_aoTriton": 8.002997263243257, + "best_ms": 0.05093500137329102, + "best_speedup_vs_triton": 1.76815107953271, + "best_speedup_vs_aoTriton": 8.066087465797104, "best_path": "3d" }, { @@ -1299,30 +1299,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08870557785034179, - "aoTriton_ms": 0.8168212890625, + "triton_ms": 0.08959148406982421, + "aoTriton_ms": 0.8131292724609375, "dsl": { "30": { - "ms": 0.1353382396697998, + "ms": 0.13511542320251466, "path": "3d" }, "60": { - "ms": 0.13534946441650392, + "ms": 0.13516994476318359, "path": "3d" }, "80": { - "ms": 0.08831950187683106, + "ms": 0.08824578285217285, "path": "3d" }, "120": { - "ms": 0.08822648048400879, + "ms": 0.08824418067932129, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.08822648048400879, - "best_speedup_vs_triton": 1.0054303125740105, - "best_speedup_vs_aoTriton": 9.258232727650858, + "best_ms": 0.08824418067932129, + "best_speedup_vs_triton": 1.0152679007287633, + "best_speedup_vs_aoTriton": 9.21453705163679, "best_path": "3d" }, { @@ -1338,30 +1338,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08800919532775879, - "aoTriton_ms": 1.634215087890625, + "triton_ms": 0.08674391746520996, + "aoTriton_ms": 1.6234425354003905, "dsl": { "30": { - "ms": 0.2626940727233887, + "ms": 0.26254512786865236, "path": "3d" }, "60": { - "ms": 0.26278228759765626, + "ms": 0.26253389358520507, "path": "3d" }, "80": { - "ms": 0.16474920272827148, + "ms": 0.1641303062438965, "path": "3d" }, "120": { - "ms": 0.16466421127319336, + "ms": 0.164119873046875, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.16466421127319336, - "best_speedup_vs_triton": 0.5344767672784907, - "best_speedup_vs_aoTriton": 9.924531112466868, + "best_ms": 0.164119873046875, + "best_speedup_vs_triton": 0.528539998568209, + "best_speedup_vs_aoTriton": 9.89180959783409, "best_path": "3d" }, { @@ -1377,30 +1377,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.04533805847167969, - "aoTriton_ms": 0.028132820129394533, + "triton_ms": 0.045794358253479, + "aoTriton_ms": 0.02811038017272949, "dsl": { "30": { - "ms": 0.06560555934906005, + "ms": 0.06548051834106446, "path": "2d" }, "60": { - "ms": 0.06834867954254151, + "ms": 0.0675613021850586, "path": "2d" }, "80": { - "ms": 0.06513807773590088, + "ms": 0.0655671215057373, "path": "2d" }, "120": { - "ms": 0.06627992153167725, + "ms": 0.06702888011932373, "path": "2d" } }, - "best_sms": 80, - "best_ms": 0.06513807773590088, - "best_speedup_vs_triton": 0.6960300341606733, - "best_speedup_vs_aoTriton": 0.4318951542208178, + "best_sms": 30, + "best_ms": 0.06548051834106446, + "best_speedup_vs_triton": 0.6993585178259077, + "best_speedup_vs_aoTriton": 0.42929379432081827, "best_path": "2d" }, { @@ -1416,30 +1416,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.09251155853271484, - "aoTriton_ms": 0.0507794189453125, + "triton_ms": 0.0889939022064209, + "aoTriton_ms": 0.05071847915649414, "dsl": { "30": { - "ms": 0.028225839138031006, + "ms": 0.031199100017547606, "path": "3d" }, "60": { - "ms": 0.027027881145477294, + "ms": 0.030775740146636962, "path": "3d" }, "80": { - "ms": 0.026645400524139405, + "ms": 0.03259432077407837, "path": "3d" }, "120": { - "ms": 0.026113760471343995, + "ms": 0.03157517910003662, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.026113760471343995, - "best_speedup_vs_triton": 3.542636405592854, - "best_speedup_vs_aoTriton": 1.9445464011602402, + "best_sms": 60, + "best_ms": 0.030775740146636962, + "best_speedup_vs_triton": 2.8916900708932505, + "best_speedup_vs_aoTriton": 1.6480019299238993, "best_path": "3d" }, { @@ -1455,30 +1455,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.09079400062561035, - "aoTriton_ms": 0.09634679794311524, + "triton_ms": 0.08832356452941895, + "aoTriton_ms": 0.09612316131591797, "dsl": { "30": { - "ms": 0.028393421173095703, + "ms": 0.031762020587921144, "path": "3d" }, "60": { - "ms": 0.02823146104812622, + "ms": 0.032356960773468016, "path": "3d" }, "80": { - "ms": 0.02762605905532837, + "ms": 0.03253098011016846, "path": "3d" }, "120": { - "ms": 0.027657320499420168, + "ms": 0.03221585988998413, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.02762605905532837, - "best_speedup_vs_triton": 3.2865346607625705, - "best_speedup_vs_aoTriton": 3.487533192850841, + "best_sms": 30, + "best_ms": 0.031762020587921144, + "best_speedup_vs_triton": 2.780791741033243, + "best_speedup_vs_aoTriton": 3.0263553620537884, "best_path": "3d" }, { @@ -1494,30 +1494,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08829383850097657, - "aoTriton_ms": 0.18741264343261718, + "triton_ms": 0.08817522048950195, + "aoTriton_ms": 0.18696212768554688, "dsl": { "30": { - "ms": 0.04261260032653809, + "ms": 0.04256289958953857, "path": "3d" }, "60": { - "ms": 0.04255805969238281, + "ms": 0.04265992164611816, "path": "3d" }, "80": { - "ms": 0.033874039649963376, + "ms": 0.03397831916809082, "path": "3d" }, "120": { - "ms": 0.033635900020599366, + "ms": 0.033762619495391846, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.033635900020599366, - "best_speedup_vs_triton": 2.624988136095763, - "best_speedup_vs_aoTriton": 5.571804034315762, + "best_ms": 0.033762619495391846, + "best_speedup_vs_triton": 2.6116226112590795, + "best_speedup_vs_aoTriton": 5.537548048102866, "best_path": "3d" }, { @@ -1533,30 +1533,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.089725341796875, - "aoTriton_ms": 0.41206703186035154, + "triton_ms": 0.08959349632263183, + "aoTriton_ms": 0.4116327667236328, "dsl": { "30": { - "ms": 0.07289196014404296, + "ms": 0.07278696060180664, "path": "3d" }, "60": { - "ms": 0.07292404174804687, + "ms": 0.07282626152038574, "path": "3d" }, "80": { - "ms": 0.050614237785339355, + "ms": 0.050463500022888186, "path": "3d" }, "120": { - "ms": 0.050541257858276366, + "ms": 0.050438637733459475, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.050541257858276366, - "best_speedup_vs_triton": 1.775289052925343, - "best_speedup_vs_aoTriton": 8.153082240569397, + "best_ms": 0.050438637733459475, + "best_speedup_vs_triton": 1.776286996411051, + "best_speedup_vs_aoTriton": 8.16106035414529, "best_path": "3d" }, { @@ -1572,30 +1572,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0897864818572998, - "aoTriton_ms": 0.8200230407714844, + "triton_ms": 0.08964061737060547, + "aoTriton_ms": 0.8160665130615234, "dsl": { "30": { - "ms": 0.13409618377685548, + "ms": 0.13393989562988282, "path": "3d" }, "60": { - "ms": 0.133944616317749, + "ms": 0.13398480415344238, "path": "3d" }, "80": { - "ms": 0.08971792221069336, + "ms": 0.08989277839660645, "path": "3d" }, "120": { - "ms": 0.08969867706298829, + "ms": 0.08994649887084961, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.08969867706298829, - "best_speedup_vs_triton": 1.0009788861685203, - "best_speedup_vs_aoTriton": 9.141974749478713, + "best_sms": 80, + "best_ms": 0.08989277839660645, + "best_speedup_vs_triton": 0.9971948689260839, + "best_speedup_vs_aoTriton": 9.078221049760442, "best_path": "3d" }, { @@ -1611,30 +1611,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08800357818603516, - "aoTriton_ms": 1.6411614990234376, + "triton_ms": 0.08979875564575196, + "aoTriton_ms": 1.6301219177246093, "dsl": { "30": { - "ms": 0.2601089286804199, + "ms": 0.26009708404541015, "path": "3d" }, "60": { - "ms": 0.26014421463012694, + "ms": 0.26022857666015625, "path": "3d" }, "80": { - "ms": 0.16899820327758788, + "ms": 0.16287057876586913, "path": "3d" }, "120": { - "ms": 0.1689837646484375, + "ms": 0.1626877784729004, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.1689837646484375, - "best_speedup_vs_triton": 0.5207812618515294, - "best_speedup_vs_aoTriton": 9.711947786450338, + "best_ms": 0.1626877784729004, + "best_speedup_vs_triton": 0.551969892813492, + "best_speedup_vs_aoTriton": 10.019940852509372, "best_path": "3d" }, { @@ -1650,30 +1650,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.04420825958251953, - "aoTriton_ms": 0.028420701026916503, + "triton_ms": 0.045893778800964354, + "aoTriton_ms": 0.028690121173858642, "dsl": { "30": { - "ms": 0.055137438774108885, + "ms": 0.05837212085723877, "path": "2d" }, "60": { - "ms": 0.05861266136169434, + "ms": 0.060725560188293455, "path": "2d" }, "80": { - "ms": 0.05526254177093506, + "ms": 0.05784853935241699, "path": "2d" }, "120": { - "ms": 0.05782201766967773, + "ms": 0.05872496128082275, "path": "2d" } }, - "best_sms": 30, - "best_ms": 0.055137438774108885, - "best_speedup_vs_triton": 0.8017829729747727, - "best_speedup_vs_aoTriton": 0.5154519625649012, + "best_sms": 80, + "best_ms": 0.05784853935241699, + "best_speedup_vs_triton": 0.7933437786799858, + "best_speedup_vs_aoTriton": 0.49595238695789007, "best_path": "2d" }, { @@ -1689,30 +1689,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.09269118309020996, - "aoTriton_ms": 0.04760168075561524, + "triton_ms": 0.09034903526306153, + "aoTriton_ms": 0.04758887767791748, "dsl": { "30": { - "ms": 0.028255500793457032, + "ms": 0.031321799755096434, "path": "3d" }, "60": { - "ms": 0.026503479480743407, + "ms": 0.032119619846344, "path": "3d" }, "80": { - "ms": 0.02620919942855835, + "ms": 0.031534280776977536, "path": "3d" }, "120": { - "ms": 0.026571619510650634, + "ms": 0.03145410060882568, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.02620919942855835, - "best_speedup_vs_triton": 3.536589636889511, - "best_speedup_vs_aoTriton": 1.8162203269645458, + "best_sms": 30, + "best_ms": 0.031321799755096434, + "best_speedup_vs_triton": 2.8845416281789698, + "best_speedup_vs_aoTriton": 1.5193532316154406, "best_path": "3d" }, { @@ -1728,30 +1728,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.0907218360900879, - "aoTriton_ms": 0.0911404037475586, + "triton_ms": 0.08836928367614746, + "aoTriton_ms": 0.09123027801513672, "dsl": { "30": { - "ms": 0.027978079319000246, + "ms": 0.03224149942398071, "path": "3d" }, "60": { - "ms": 0.02634310007095337, + "ms": 0.03194082021713257, "path": "3d" }, "80": { - "ms": 0.02670151948928833, + "ms": 0.031952059268951415, "path": "3d" }, "120": { - "ms": 0.026656620502471924, + "ms": 0.03147655963897705, "path": "3d" } }, - "best_sms": 60, - "best_ms": 0.02634310007095337, - "best_speedup_vs_triton": 3.4438557286627134, - "best_speedup_vs_aoTriton": 3.4597448099152355, + "best_sms": 120, + "best_ms": 0.03147655963897705, + "best_speedup_vs_triton": 2.8074632262771444, + "best_speedup_vs_aoTriton": 2.898356080254951, "best_path": "3d" }, { @@ -1767,30 +1767,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08673266410827636, - "aoTriton_ms": 0.18755374908447264, + "triton_ms": 0.08864912033081054, + "aoTriton_ms": 0.19174753189086913, "dsl": { "30": { - "ms": 0.0287758994102478, + "ms": 0.032793979644775394, "path": "3d" }, "60": { - "ms": 0.027432820796966552, + "ms": 0.031122119426727296, "path": "3d" }, "80": { - "ms": 0.02771346092224121, + "ms": 0.03246201992034912, "path": "3d" }, "120": { - "ms": 0.027459259033203124, + "ms": 0.0322038197517395, "path": "3d" } }, "best_sms": 60, - "best_ms": 0.027432820796966552, - "best_speedup_vs_triton": 3.161638562442949, - "best_speedup_vs_aoTriton": 6.8368379056816435, + "best_ms": 0.031122119426727296, + "best_speedup_vs_triton": 2.8484281264816356, + "best_speedup_vs_aoTriton": 6.161133477503421, "best_path": "3d" }, { @@ -1806,30 +1806,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08940600395202637, - "aoTriton_ms": 0.370882568359375, + "triton_ms": 0.08741988182067871, + "aoTriton_ms": 0.37002723693847656, "dsl": { "30": { - "ms": 0.043399200439453126, + "ms": 0.04355078220367432, "path": "3d" }, "60": { - "ms": 0.02877671957015991, + "ms": 0.03151263952255249, "path": "3d" }, "80": { - "ms": 0.028844060897827147, + "ms": 0.03135385990142822, "path": "3d" }, "120": { - "ms": 0.028807981014251707, + "ms": 0.03205548048019409, "path": "3d" } }, - "best_sms": 60, - "best_ms": 0.02877671957015991, - "best_speedup_vs_triton": 3.106886583581825, - "best_speedup_vs_aoTriton": 12.888285179800778, + "best_sms": 80, + "best_ms": 0.03135385990142822, + "best_speedup_vs_triton": 2.78816968933055, + "best_speedup_vs_aoTriton": 11.801648604088493, "best_path": "3d" }, { @@ -1845,30 +1845,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08896657943725586, - "aoTriton_ms": 0.7369083404541016, + "triton_ms": 0.08916872024536132, + "aoTriton_ms": 0.7358119201660156, "dsl": { "30": { - "ms": 0.07429518222808838, + "ms": 0.07421905994415283, "path": "3d" }, "60": { - "ms": 0.04415373802185059, + "ms": 0.04428445816040039, "path": "3d" }, "80": { - "ms": 0.038428540229797366, + "ms": 0.03841494083404541, "path": "3d" }, "120": { - "ms": 0.038398880958557126, + "ms": 0.03847830057144165, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.038398880958557126, - "best_speedup_vs_triton": 2.316905524754096, - "best_speedup_vs_aoTriton": 19.19088062095942, + "best_sms": 80, + "best_ms": 0.03841494083404541, + "best_speedup_vs_triton": 2.321198947841022, + "best_speedup_vs_aoTriton": 19.154316112180474, "best_path": "3d" }, { @@ -1884,30 +1884,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08905318260192871, - "aoTriton_ms": 1.591803741455078, + "triton_ms": 0.08786731719970703, + "aoTriton_ms": 1.5880705261230468, "dsl": { "30": { - "ms": 0.1366468620300293, + "ms": 0.13689149856567384, "path": "3d" }, "60": { - "ms": 0.07566314220428466, + "ms": 0.07597829818725586, "path": "3d" }, "80": { - "ms": 0.05785170078277588, + "ms": 0.0574267578125, "path": "3d" }, "120": { - "ms": 0.05782926082611084, + "ms": 0.05730408191680908, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.05782926082611084, - "best_speedup_vs_triton": 1.539932922015143, - "best_speedup_vs_aoTriton": 27.525922322291784, + "best_ms": 0.05730408191680908, + "best_speedup_vs_triton": 1.53335180078913, + "best_speedup_vs_aoTriton": 27.713043696058516, "best_path": "3d" }, { @@ -1923,30 +1923,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.044889822006225585, - "aoTriton_ms": 0.028620340824127198, + "triton_ms": 0.045061440467834474, + "aoTriton_ms": 0.028816800117492675, "dsl": { "30": { - "ms": 0.0658156394958496, + "ms": 0.06606266021728516, "path": "2d" }, "60": { - "ms": 0.07647702217102051, + "ms": 0.06671857833862305, "path": "2d" }, "80": { - "ms": 0.06483580112457275, + "ms": 0.06513092041015625, "path": "2d" }, "120": { - "ms": 0.06569697856903076, + "ms": 0.07696378231048584, "path": "2d" } }, "best_sms": 80, - "best_ms": 0.06483580112457275, - "best_speedup_vs_triton": 0.6923616463067401, - "best_speedup_vs_aoTriton": 0.4414280432679052, + "best_ms": 0.06513092041015625, + "best_speedup_vs_triton": 0.6918594146077471, + "best_speedup_vs_aoTriton": 0.44244423287773926, "best_path": "2d" }, { @@ -1962,30 +1962,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08907485961914062, - "aoTriton_ms": 0.044630842208862306, + "triton_ms": 0.08891533851623536, + "aoTriton_ms": 0.04459238052368164, "dsl": { "30": { - "ms": 0.027693419456481932, + "ms": 0.030452580451965333, "path": "3d" }, "60": { - "ms": 0.026848258972167968, + "ms": 0.030843899250030518, "path": "3d" }, "80": { - "ms": 0.026192340850830078, + "ms": 0.031624081134796145, "path": "3d" }, "120": { - "ms": 0.02604882001876831, + "ms": 0.03139797925949097, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.02604882001876831, - "best_speedup_vs_triton": 3.419535301597605, - "best_speedup_vs_aoTriton": 1.71335370188383, + "best_sms": 30, + "best_ms": 0.030452580451965333, + "best_speedup_vs_triton": 2.9197965228755183, + "best_speedup_vs_aoTriton": 1.4643219018506446, "best_path": "3d" }, { @@ -2001,30 +2001,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.09032974243164063, - "aoTriton_ms": 0.08602060317993164, + "triton_ms": 0.08794427871704101, + "aoTriton_ms": 0.08593485832214355, "dsl": { "30": { - "ms": 0.028189759254455566, + "ms": 0.03236419916152954, "path": "3d" }, "60": { - "ms": 0.026867499351501466, + "ms": 0.03296878099441528, "path": "3d" }, "80": { - "ms": 0.027014238834381102, + "ms": 0.03165293931961059, "path": "3d" }, "120": { - "ms": 0.026614940166473387, + "ms": 0.03163290023803711, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.026614940166473387, - "best_speedup_vs_triton": 3.3939487320519413, - "best_speedup_vs_aoTriton": 3.2320419524478607, + "best_ms": 0.03163290023803711, + "best_speedup_vs_triton": 2.7801522483003964, + "best_speedup_vs_aoTriton": 2.716629132184688, "best_path": "3d" }, { @@ -2040,30 +2040,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.09064805984497071, - "aoTriton_ms": 0.184149112701416, + "triton_ms": 0.0895071029663086, + "aoTriton_ms": 0.18381805419921876, "dsl": { "30": { - "ms": 0.027656519412994386, + "ms": 0.032332119941711424, "path": "3d" }, "60": { - "ms": 0.02733897924423218, + "ms": 0.031495800018310545, "path": "3d" }, "80": { - "ms": 0.02742640018463135, + "ms": 0.03189752101898193, "path": "3d" }, "120": { - "ms": 0.026449759006500245, + "ms": 0.03159362077713013, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.026449759006500245, - "best_speedup_vs_triton": 3.4271790462322627, - "best_speedup_vs_aoTriton": 6.962222705173225, + "best_sms": 60, + "best_ms": 0.031495800018310545, + "best_speedup_vs_triton": 2.84187424717811, + "best_speedup_vs_aoTriton": 5.836271950303007, "best_path": "3d" }, { @@ -2079,30 +2079,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08993441581726075, - "aoTriton_ms": 0.363888053894043, + "triton_ms": 0.08876057624816895, + "aoTriton_ms": 0.3630471420288086, "dsl": { "30": { - "ms": 0.04249392032623291, + "ms": 0.042635078430175784, "path": "3d" }, "60": { - "ms": 0.028272340297698973, + "ms": 0.03238503932952881, "path": "3d" }, "80": { - "ms": 0.028530540466308593, + "ms": 0.031031520366668702, "path": "3d" }, "120": { - "ms": 0.028481619358062746, + "ms": 0.03154150009155274, "path": "3d" } }, - "best_sms": 60, - "best_ms": 0.028272340297698973, - "best_speedup_vs_triton": 3.1810035840782636, - "best_speedup_vs_aoTriton": 12.870814727836983, + "best_sms": 80, + "best_ms": 0.031031520366668702, + "best_speedup_vs_triton": 2.8603360453942717, + "best_speedup_vs_aoTriton": 11.699302442775622, "best_path": "3d" }, { @@ -2118,30 +2118,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08970749855041504, - "aoTriton_ms": 0.7218479919433594, + "triton_ms": 0.08905323982238769, + "aoTriton_ms": 0.7208982849121094, "dsl": { "30": { - "ms": 0.07234990119934082, + "ms": 0.07276050090789794, "path": "3d" }, "60": { - "ms": 0.04325967788696289, + "ms": 0.04328455924987793, "path": "3d" }, "80": { - "ms": 0.03797068119049072, + "ms": 0.0383187198638916, "path": "3d" }, "120": { - "ms": 0.03797068119049072, + "ms": 0.03828263998031616, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.03797068119049072, - "best_speedup_vs_triton": 2.3625464631611917, - "best_speedup_vs_aoTriton": 19.01066742316272, + "best_sms": 120, + "best_ms": 0.03828263998031616, + "best_speedup_vs_triton": 2.3262042499727373, + "best_speedup_vs_aoTriton": 18.83094492132138, "best_path": "3d" }, { @@ -2157,30 +2157,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08845179557800292, - "aoTriton_ms": 1.599663543701172, + "triton_ms": 0.08829509735107421, + "aoTriton_ms": 1.5961700439453126, "dsl": { "30": { - "ms": 0.1330770206451416, + "ms": 0.13313644409179687, "path": "3d" }, "60": { - "ms": 0.07412280082702637, + "ms": 0.07399213790893555, "path": "3d" }, "80": { - "ms": 0.05636106014251709, + "ms": 0.057519779205322266, "path": "3d" }, "120": { - "ms": 0.056324977874755856, + "ms": 0.05747568130493164, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.056324977874755856, - "best_speedup_vs_triton": 1.5703831393362322, - "best_speedup_vs_aoTriton": 28.400606694567756, + "best_ms": 0.05747568130493164, + "best_speedup_vs_triton": 1.5362166284316519, + "best_speedup_vs_aoTriton": 27.771224415365996, "best_path": "3d" }, { @@ -2196,30 +2196,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.04488984107971192, - "aoTriton_ms": 0.0287951397895813, + "triton_ms": 0.045275559425354, + "aoTriton_ms": 0.0288360595703125, "dsl": { "30": { - "ms": 0.05560492038726807, + "ms": 0.05801209926605225, "path": "2d" }, "60": { - "ms": 0.05834564208984375, + "ms": 0.060641360282897946, "path": "2d" }, "80": { - "ms": 0.05495222091674805, + "ms": 0.05824304103851318, "path": "2d" }, "120": { - "ms": 0.05656633853912354, + "ms": 0.05985156059265137, "path": "2d" } }, - "best_sms": 80, - "best_ms": 0.05495222091674805, - "best_speedup_vs_triton": 0.8168885684842381, - "best_speedup_vs_aoTriton": 0.5240032033137585, + "best_sms": 30, + "best_ms": 0.05801209926605225, + "best_speedup_vs_triton": 0.780450285339847, + "best_speedup_vs_aoTriton": 0.4970697481238522, "best_path": "2d" }, { @@ -2235,30 +2235,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.09206893920898437, - "aoTriton_ms": 0.048240737915039064, + "triton_ms": 0.09175308227539063, + "aoTriton_ms": 0.04829771995544434, "dsl": { "30": { - "ms": 0.028501660823822023, + "ms": 0.031134960651397706, "path": "3d" }, "60": { - "ms": 0.02725882053375244, + "ms": 0.030717999935150148, "path": "3d" }, "80": { - "ms": 0.02656280040740967, + "ms": 0.03125123977661133, "path": "3d" }, "120": { - "ms": 0.026729578971862792, + "ms": 0.03115580081939697, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.02656280040740967, - "best_speedup_vs_triton": 3.4660855706803346, - "best_speedup_vs_aoTriton": 1.8161013588605799, + "best_sms": 60, + "best_ms": 0.030717999935150148, + "best_speedup_vs_triton": 2.986948449413822, + "best_speedup_vs_aoTriton": 1.572293770994445, "best_path": "3d" }, { @@ -2274,30 +2274,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.09045561790466308, - "aoTriton_ms": 0.09681026458740234, + "triton_ms": 0.08873412132263184, + "aoTriton_ms": 0.09668044090270995, "dsl": { "30": { - "ms": 0.02790911912918091, + "ms": 0.032699360847473144, "path": "3d" }, "60": { - "ms": 0.027597200870513917, + "ms": 0.03262399911880493, "path": "3d" }, "80": { - "ms": 0.026666240692138674, + "ms": 0.03210520029067993, "path": "3d" }, "120": { - "ms": 0.026412060260772707, + "ms": 0.03207953929901123, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.026412060260772707, - "best_speedup_vs_triton": 3.4247846253405725, - "best_speedup_vs_aoTriton": 3.665381027892978, + "best_ms": 0.03207953929901123, + "best_speedup_vs_triton": 2.7660659492503012, + "best_speedup_vs_aoTriton": 3.013772735373724, "best_path": "3d" }, { @@ -2313,30 +2313,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.0873661231994629, - "aoTriton_ms": 0.18880943298339845, + "triton_ms": 0.08981579780578614, + "aoTriton_ms": 0.18818254470825196, "dsl": { "30": { - "ms": 0.04285714149475098, + "ms": 0.042782621383666994, "path": "3d" }, "60": { - "ms": 0.029591379165649415, + "ms": 0.032862141132354736, "path": "3d" }, "80": { - "ms": 0.02852734088897705, + "ms": 0.032752280235290525, "path": "3d" }, "120": { - "ms": 0.027249979972839355, + "ms": 0.031102879047393797, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.027249979972839355, - "best_speedup_vs_triton": 3.206098620495964, - "best_speedup_vs_aoTriton": 6.928791623758582, + "best_ms": 0.031102879047393797, + "best_speedup_vs_triton": 2.8877004494962364, + "best_speedup_vs_aoTriton": 6.050325579876515, "best_path": "3d" }, { @@ -2352,30 +2352,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08877094268798828, - "aoTriton_ms": 0.37275646209716795, + "triton_ms": 0.0889049243927002, + "aoTriton_ms": 0.3715660095214844, "dsl": { "30": { - "ms": 0.07356872081756592, + "ms": 0.07368261814117431, "path": "3d" }, "60": { - "ms": 0.04355234146118164, + "ms": 0.04371915817260742, "path": "3d" }, "80": { - "ms": 0.0325325608253479, + "ms": 0.032833280563354494, "path": "3d" }, "120": { - "ms": 0.03252213954925537, + "ms": 0.03291425943374634, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.03252213954925537, - "best_speedup_vs_triton": 2.7295542027160633, - "best_speedup_vs_aoTriton": 11.461621752548647, + "best_sms": 80, + "best_ms": 0.032833280563354494, + "best_speedup_vs_triton": 2.707768546647384, + "best_speedup_vs_aoTriton": 11.316749442825778, "best_path": "3d" }, { @@ -2391,30 +2391,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.08894094467163086, - "aoTriton_ms": 0.8054093933105468, + "triton_ms": 0.09038031578063965, + "aoTriton_ms": 0.8055245971679688, "dsl": { "30": { - "ms": 0.13500867843627928, + "ms": 0.13514588356018067, "path": "3d" }, "60": { - "ms": 0.07434892177581787, + "ms": 0.07460073947906494, "path": "3d" }, "80": { - "ms": 0.05206155776977539, + "ms": 0.05247213840484619, "path": "3d" }, "120": { - "ms": 0.05210244178771973, + "ms": 0.052292518615722657, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.05206155776977539, - "best_speedup_vs_triton": 1.7083803958564219, - "best_speedup_vs_aoTriton": 15.470328353834457, + "best_sms": 120, + "best_ms": 0.052292518615722657, + "best_speedup_vs_triton": 1.7283603500686089, + "best_speedup_vs_aoTriton": 15.404203478655429, "best_path": "3d" }, { @@ -2430,30 +2430,30 @@ "head_size": 128, "block_size": 16, "dtype": "bf16", - "triton_ms": 0.0886867618560791, - "aoTriton_ms": 1.6079008483886719, + "triton_ms": 0.08971216201782227, + "aoTriton_ms": 1.5985075378417968, "dsl": { "30": { - "ms": 0.25982667922973635, + "ms": 0.2601179122924805, "path": "3d" }, "60": { - "ms": 0.13682565689086915, + "ms": 0.13718338012695314, "path": "3d" }, "80": { - "ms": 0.0913095760345459, + "ms": 0.09123027801513672, "path": "3d" }, "120": { - "ms": 0.09127511978149414, + "ms": 0.09123669624328613, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.09127511978149414, - "best_speedup_vs_triton": 0.9716422401678423, - "best_speedup_vs_aoTriton": 17.615981794796514, + "best_sms": 80, + "best_ms": 0.09123027801513672, + "best_speedup_vs_triton": 0.9833595158280394, + "best_speedup_vs_aoTriton": 17.521677809384467, "best_path": "3d" }, { @@ -2469,30 +2469,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.044984440803527835, - "aoTriton_ms": 0.02837739944458008, + "triton_ms": 0.04485377788543701, + "aoTriton_ms": 0.028953120708465577, "dsl": { "30": { - "ms": 0.06576432228088379, + "ms": 0.06578281879425049, "path": "2d" }, "60": { - "ms": 0.0668596601486206, + "ms": 0.06734481811523438, "path": "2d" }, "80": { - "ms": 0.06541711807250977, + "ms": 0.06542277812957764, "path": "2d" }, "120": { - "ms": 0.06596960067749023, + "ms": 0.06649003982543945, "path": "2d" } }, "best_sms": 80, - "best_ms": 0.06541711807250977, - "best_speedup_vs_triton": 0.6876554964354451, - "best_speedup_vs_aoTriton": 0.43379164782413593, + "best_ms": 0.06542277812957764, + "best_speedup_vs_triton": 0.6855987955234604, + "best_speedup_vs_aoTriton": 0.4425541307817968, "best_path": "2d" }, { @@ -2508,30 +2508,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0881214427947998, - "aoTriton_ms": 0.04545032024383545, + "triton_ms": 0.08859780311584473, + "aoTriton_ms": 0.04542789936065674, "dsl": { "30": { - "ms": 0.027949199676513672, + "ms": 0.03128809928894043, "path": "3d" }, "60": { - "ms": 0.026525120735168457, + "ms": 0.031096460819244384, "path": "3d" }, "80": { - "ms": 0.02577860116958618, + "ms": 0.03141881942749023, "path": "3d" }, "120": { - "ms": 0.02625730037689209, + "ms": 0.030839879512786866, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.02577860116958618, - "best_speedup_vs_triton": 3.4183950562362653, - "best_speedup_vs_aoTriton": 1.7631026580859683, + "best_sms": 120, + "best_ms": 0.030839879512786866, + "best_speedup_vs_triton": 2.8728323364269372, + "best_speedup_vs_aoTriton": 1.4730245408974887, "best_path": "3d" }, { @@ -2547,30 +2547,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08767642021179199, - "aoTriton_ms": 0.09485535621643067, + "triton_ms": 0.09333592414855957, + "aoTriton_ms": 0.09492839813232422, "dsl": { "30": { - "ms": 0.028471999168395996, + "ms": 0.032620799541473386, "path": "3d" }, "60": { - "ms": 0.027374279499053956, + "ms": 0.03265768051147461, "path": "3d" }, "80": { - "ms": 0.026719160079956054, + "ms": 0.034404900074005124, "path": "3d" }, "120": { - "ms": 0.026230840682983397, + "ms": 0.03271460056304932, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.026230840682983397, - "best_speedup_vs_triton": 3.342493718421685, - "best_speedup_vs_aoTriton": 3.6161767502162334, + "best_sms": 30, + "best_ms": 0.032620799541473386, + "best_speedup_vs_triton": 2.8612396219747547, + "best_speedup_vs_aoTriton": 2.910057370348458, "best_path": "3d" }, { @@ -2586,30 +2586,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.09001540184020997, - "aoTriton_ms": 0.1853005599975586, + "triton_ms": 0.09680312156677245, + "aoTriton_ms": 0.1851491355895996, "dsl": { "30": { - "ms": 0.04154612064361572, + "ms": 0.041851658821105954, "path": "3d" }, "60": { - "ms": 0.02888495922088623, + "ms": 0.03154069900512695, "path": "3d" }, "80": { - "ms": 0.028716559410095214, + "ms": 0.032591118812561035, "path": "3d" }, "120": { - "ms": 0.02776236057281494, + "ms": 0.03318449974060059, "path": "3d" } }, - "best_sms": 120, - "best_ms": 0.02776236057281494, - "best_speedup_vs_triton": 3.2423540355697833, - "best_speedup_vs_aoTriton": 6.674524650436459, + "best_sms": 60, + "best_ms": 0.03154069900512695, + "best_speedup_vs_triton": 3.0691495312465036, + "best_speedup_vs_aoTriton": 5.870165894532127, "best_path": "3d" }, { @@ -2625,30 +2625,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08826335906982422, - "aoTriton_ms": 0.36562889099121093, + "triton_ms": 0.0888864803314209, + "aoTriton_ms": 0.36516647338867186, "dsl": { "30": { - "ms": 0.07130750179290772, + "ms": 0.07135647773742676, "path": "3d" }, "60": { - "ms": 0.042390480041503906, + "ms": 0.04260700225830078, "path": "3d" }, "80": { - "ms": 0.032393839359283444, + "ms": 0.03258147954940796, "path": "3d" }, "120": { - "ms": 0.03242671966552734, + "ms": 0.032712979316711424, "path": "3d" } }, "best_sms": 80, - "best_ms": 0.032393839359283444, - "best_speedup_vs_triton": 2.724695831540254, - "best_speedup_vs_aoTriton": 11.286988459008604, + "best_ms": 0.03258147954940796, + "best_speedup_vs_triton": 2.728129034061501, + "best_speedup_vs_aoTriton": 11.2077928454697, "best_path": "3d" }, { @@ -2664,30 +2664,30 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.08976041793823242, - "aoTriton_ms": 0.8092534637451172, + "triton_ms": 0.0895792579650879, + "aoTriton_ms": 0.8084449768066406, "dsl": { "30": { - "ms": 0.13074206352233886, + "ms": 0.13076457977294922, "path": "3d" }, "60": { - "ms": 0.07218070030212402, + "ms": 0.07233871936798096, "path": "3d" }, "80": { - "ms": 0.05109131813049316, + "ms": 0.05040257930755615, "path": "3d" }, "120": { - "ms": 0.051117777824401855, + "ms": 0.050364079475402834, "path": "3d" } }, - "best_sms": 80, - "best_ms": 0.05109131813049316, - "best_speedup_vs_triton": 1.7568624420488406, - "best_speedup_vs_aoTriton": 15.839353795456791, + "best_sms": 120, + "best_ms": 0.050364079475402834, + "best_speedup_vs_triton": 1.7786338775205301, + "best_speedup_vs_aoTriton": 16.052015349580145, "best_path": "3d" }, { @@ -2703,30 +2703,303 @@ "head_size": 128, "block_size": 16, "dtype": "fp16", - "triton_ms": 0.0879610824584961, - "aoTriton_ms": 1.6157373046875, + "triton_ms": 0.08756823539733886, + "aoTriton_ms": 1.6062213134765626, + "dsl": { + "30": { + "ms": 0.25116289138793946, + "path": "3d" + }, + "60": { + "ms": 0.1324973773956299, + "path": "3d" + }, + "80": { + "ms": 0.08718576431274414, + "path": "3d" + }, + "120": { + "ms": 0.08711518287658691, + "path": "3d" + } + }, + "best_sms": 120, + "best_ms": 0.08711518287658691, + "best_speedup_vs_triton": 1.0052006149306232, + "best_speedup_vs_aoTriton": 18.437903249908125, + "best_path": "3d" + }, + { + "label": "qwen3next_80b_b1_kv512", + "signature": "b1_sq1_sk512_nhq16_nhk2_hd256_bs16_bf16", + "bias": "none", + "arch": "gfx942", + "batch": 1, + "seqlen_q": 1, + "seqlen_k": 512, + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "dtype": "bf16", + "triton_ms": 0.045553002357482913, + "aoTriton_ms": 0.03935631990432739, + "dsl": { + "30": { + "ms": 0.19017671585083007, + "path": "2d" + }, + "60": { + "ms": 0.19033388137817384, + "path": "2d" + }, + "80": { + "ms": 0.18995941162109375, + "path": "2d" + }, + "120": { + "ms": 0.18989126205444337, + "path": "2d" + } + }, + "best_sms": 120, + "best_ms": 0.18989126205444337, + "best_speedup_vs_triton": 0.23988993418992863, + "best_speedup_vs_aoTriton": 0.20725714010497026, + "best_path": "2d" + }, + { + "label": "qwen3next_80b_b1_kv1024", + "signature": "b1_sq1_sk1024_nhq16_nhk2_hd256_bs16_bf16", + "bias": "none", + "arch": "gfx942", + "batch": 1, + "seqlen_q": 1, + "seqlen_k": 1024, + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "dtype": "bf16", + "triton_ms": 0.09127595901489258, + "aoTriton_ms": 0.07233071804046631, + "dsl": { + "30": { + "ms": 0.032355360984802246, + "path": "3d" + }, + "60": { + "ms": 0.034133880138397216, + "path": "3d" + }, + "80": { + "ms": 0.03435358047485351, + "path": "3d" + }, + "120": { + "ms": 0.03628361940383911, + "path": "3d" + } + }, + "best_sms": 30, + "best_ms": 0.032355360984802246, + "best_speedup_vs_triton": 2.8210459174838487, + "best_speedup_vs_aoTriton": 2.2355095365630766, + "best_path": "3d" + }, + { + "label": "qwen3next_80b_b1_kv2048", + "signature": "b1_sq1_sk2048_nhq16_nhk2_hd256_bs16_bf16", + "bias": "none", + "arch": "gfx942", + "batch": 1, + "seqlen_q": 1, + "seqlen_k": 2048, + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "dtype": "bf16", + "triton_ms": 0.09660985946655273, + "aoTriton_ms": 0.1393355369567871, + "dsl": { + "30": { + "ms": 0.03554994106292725, + "path": "3d" + }, + "60": { + "ms": 0.03410582065582275, + "path": "3d" + }, + "80": { + "ms": 0.03171710014343262, + "path": "3d" + }, + "120": { + "ms": 0.03234813928604126, + "path": "3d" + } + }, + "best_sms": 80, + "best_ms": 0.03171710014343262, + "best_speedup_vs_triton": 3.045986519248573, + "best_speedup_vs_aoTriton": 4.393073021388372, + "best_path": "3d" + }, + { + "label": "qwen3next_80b_b1_kv4096", + "signature": "b1_sq1_sk4096_nhq16_nhk2_hd256_bs16_bf16", + "bias": "none", + "arch": "gfx942", + "batch": 1, + "seqlen_q": 1, + "seqlen_k": 4096, + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "dtype": "bf16", + "triton_ms": 0.08857053756713867, + "aoTriton_ms": 0.2826033592224121, + "dsl": { + "30": { + "ms": 0.03523721933364868, + "path": "3d" + }, + "60": { + "ms": 0.03387006044387817, + "path": "3d" + }, + "80": { + "ms": 0.03377546072006225, + "path": "3d" + }, + "120": { + "ms": 0.03397269964218139, + "path": "3d" + } + }, + "best_sms": 80, + "best_ms": 0.03377546072006225, + "best_speedup_vs_triton": 2.6223339572250084, + "best_speedup_vs_aoTriton": 8.367120779333996, + "best_path": "3d" + }, + { + "label": "qwen3next_80b_b1_kv8192", + "signature": "b1_sq1_sk8192_nhq16_nhk2_hd256_bs16_bf16", + "bias": "none", + "arch": "gfx942", + "batch": 1, + "seqlen_q": 1, + "seqlen_k": 8192, + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "dtype": "bf16", + "triton_ms": 0.0891510772705078, + "aoTriton_ms": 0.5559293365478516, + "dsl": { + "30": { + "ms": 0.04642940044403076, + "path": "3d" + }, + "60": { + "ms": 0.03900991916656494, + "path": "3d" + }, + "80": { + "ms": 0.03926569938659668, + "path": "3d" + }, + "120": { + "ms": 0.03922800064086914, + "path": "3d" + } + }, + "best_sms": 60, + "best_ms": 0.03900991916656494, + "best_speedup_vs_triton": 2.285343809348839, + "best_speedup_vs_aoTriton": 14.250973814483926, + "best_path": "3d" + }, + { + "label": "qwen3next_80b_b1_kv16384", + "signature": "b1_sq1_sk16384_nhq16_nhk2_hd256_bs16_bf16", + "bias": "none", + "arch": "gfx942", + "batch": 1, + "seqlen_q": 1, + "seqlen_k": 16384, + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "dtype": "bf16", + "triton_ms": 0.08883835792541504, + "aoTriton_ms": 1.1062545776367188, + "dsl": { + "30": { + "ms": 0.06837520122528076, + "path": "3d" + }, + "60": { + "ms": 0.05022213935852051, + "path": "3d" + }, + "80": { + "ms": 0.050214138031005856, + "path": "3d" + }, + "120": { + "ms": 0.05013636112213135, + "path": "3d" + } + }, + "best_sms": 120, + "best_ms": 0.05013636112213135, + "best_speedup_vs_triton": 1.771934698431868, + "best_speedup_vs_aoTriton": 22.06491561966176, + "best_path": "3d" + }, + { + "label": "qwen3next_80b_b1_kv32768", + "signature": "b1_sq1_sk32768_nhq16_nhk2_hd256_bs16_bf16", + "bias": "none", + "arch": "gfx942", + "batch": 1, + "seqlen_q": 1, + "seqlen_k": 32768, + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "dtype": "bf16", + "triton_ms": 0.09160473823547363, + "aoTriton_ms": 2.3580221557617187, "dsl": { "30": { - "ms": 0.25100074768066405, + "ms": 0.11201016426086426, "path": "3d" }, "60": { - "ms": 0.13238825798034667, + "ms": 0.07200193881988526, "path": "3d" }, "80": { - "ms": 0.08947735786437988, + "ms": 0.07207491874694824, "path": "3d" }, "120": { - "ms": 0.08942846298217773, + "ms": 0.07196588039398194, "path": "3d" } }, "best_sms": 120, - "best_ms": 0.08942846298217773, - "best_speedup_vs_triton": 0.9835915716903905, - "best_speedup_vs_aoTriton": 18.067371961983756, + "best_ms": 0.07196588039398194, + "best_speedup_vs_triton": 1.2728912330951483, + "best_speedup_vs_aoTriton": 32.76583490471556, "best_path": "3d" } ] diff --git a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/decode/decode_shapes.json b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/decode/decode_shapes.json index 1a890de7afbb..48d8abc3e7e7 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/decode/decode_shapes.json +++ b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/decode/decode_shapes.json @@ -115,6 +115,22 @@ {"batch": 1, "seqlen_q": 1, "seqlen_k": 16384, "dtype": "fp16", "label": "qwen3_235b_fp16_b1_kv16384"}, {"batch": 1, "seqlen_q": 1, "seqlen_k": 32768, "dtype": "fp16", "label": "qwen3_235b_fp16_b1_kv32768"} ] + }, + { + "model": "Qwen3-Next-80B-A3B", + "num_query_heads": 16, + "num_kv_heads": 2, + "head_size": 256, + "block_size": 16, + "shapes": [ + {"batch": 1, "seqlen_q": 1, "seqlen_k": 512, "dtype": "bf16", "label": "qwen3next_80b_b1_kv512"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 1024, "dtype": "bf16", "label": "qwen3next_80b_b1_kv1024"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 2048, "dtype": "bf16", "label": "qwen3next_80b_b1_kv2048"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 4096, "dtype": "bf16", "label": "qwen3next_80b_b1_kv4096"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 8192, "dtype": "bf16", "label": "qwen3next_80b_b1_kv8192"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 16384, "dtype": "bf16", "label": "qwen3next_80b_b1_kv16384"}, + {"batch": 1, "seqlen_q": 1, "seqlen_k": 32768, "dtype": "bf16", "label": "qwen3next_80b_b1_kv32768"} + ] } ] } diff --git a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py index a0bd12d5a44f..ee77ff5add2b 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py @@ -40,7 +40,7 @@ from __future__ import annotations from dataclasses import asdict, dataclass -from typing import Sequence, Tuple +from typing import Any, Optional, Sequence, Tuple from rocke.core.arch import ArchTarget from kernels.common.attention_unified import ( @@ -150,6 +150,9 @@ class AttentionSpec: num_query_heads: int num_kv_heads: int name: str = "rocke_attention_unified" + # Pinned codegen knobs from a specialized candidate; None for generic paths. + # Stored as a sorted tuple of (key, value) pairs for hashability. + # tiled_overrides: Optional[Tuple[Tuple[str, Any], ...]] = None def kernel_name(self) -> str: from rocke.helpers.spec import kernel_name_join @@ -301,6 +304,78 @@ def select(req: OperatorRequest) -> AttentionSpec: ATTENTION_REGISTRY.register(_make_gfx942_dense_pipe_candidate()) +def _make_d256_decode_candidate() -> KernelCandidate: + """D256 bf16 decode candidate for gfx950 and gfx942 — 3D split-KV path. + + Registered at priority 5 so it outranks the generic unified_3d candidate + (priority 10) for eligible D256 bf16 decode shapes. Callers can also force + this path explicitly via algorithm="d256_decode". + """ + from kernels.common.attention_unified import _d256_decode_cohort + + spec_id = "d256_decode" + name = "attention_d256_decode" + + def support(req: OperatorRequest) -> Tuple[bool, str]: + errors = _request_errors(req) + if errors: + return False, "; ".join(errors) + assert isinstance(req, AttentionRequest) + if req.arch not in ("gfx942", "gfx950"): + return False, f"d256_decode requires gfx942 or gfx950 (got {req.arch!r})" + if req.dtype != "bf16": + return False, f"d256_decode is bf16-only (got {req.dtype!r})" + ok, why = _selector_matches(req, candidate) + if not ok: + return False, why + problem = _problem(req) + ok, why = supports_native_unified_attention(problem) + if not ok: + return False, why + if not _d256_decode_cohort(problem): + return False, "problem is not in the D256 bf16 decode cohort" + if problem.select_path() != "3d": + return False, ( + f"problem routes to {problem.select_path()!r} path, not '3d'" + ) + return True, "ok" + + def select(req: OperatorRequest) -> AttentionSpec: + ok, why = support(req) + if not ok: + raise ValueError(f"{name} does not support request: {why}") + assert isinstance(req, AttentionRequest) + problem = _problem(req) + return AttentionSpec( + path="3d", + head_size=problem.head_size, + block_size=problem.block_size, + dtype=problem.dtype, + num_query_heads=problem.num_query_heads, + num_kv_heads=problem.num_kv_heads, + name="rocke_attention_d256_decode", + ) + + candidate = KernelCandidate( + name=name, + family=_FAMILY, + algorithm="d256_decode", + spec_id=spec_id, + abi_version=ATTENTION_ABI_VERSION, + priority=5, + supports=support, + select_spec=select, + signature=lambda _spec: (), + grid=lambda spec, req: (0, 0, 0), + block=lambda spec: (0, 0, 0), + sweep_space=lambda req: (select(req),) if support(req)[0] else (), + ) + return candidate + + +ATTENTION_REGISTRY.register(_make_d256_decode_candidate()) + + def attention_candidates() -> Tuple[KernelCandidate, ...]: return ATTENTION_REGISTRY.candidates() diff --git a/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py b/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py index cc4926e62da4..190982ac0295 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py @@ -2176,7 +2176,10 @@ def _num_segments(problem: UnifiedAttentionProblem) -> int: return min(segments, 32) if problem.head_size == 128: return min(segments, 16) - return min(segments, 64) + # D256: sweep (decode_shapes_perf gfx942) shows seg128 wins or ties at + # every kv_len — do not cap below the formula value. + if problem.head_size != 256: + return min(segments, 64) return segments @@ -2223,6 +2226,26 @@ def _enable_gfx942_3d_wide_kv_load(problem: UnifiedAttentionProblem) -> bool: return True +def _d256_decode_cohort(problem: UnifiedAttentionProblem) -> bool: + """Predicate: true when this problem belongs to the D256 bf16 decode cohort. + + Covers gfx950 and gfx942, bf16, head_size=256, decode (all_decode=True). + No sliding window, softcap, sinks, alibi, or qq_bias — these features + are not validated for the D256 decode fast path. + """ + return ( + problem.head_size == 256 + and problem.dtype == "bf16" + and problem.all_decode + and not problem.use_fp8 + and problem.sliding_window == 0 + and problem.softcap == 0.0 + and not problem.use_sinks + and not problem.use_alibi + and not problem.use_qq_bias + ) + + def _env_enabled_true(var: str) -> bool: env = __import__("os").environ.get(var, "").strip().lower() return env in ("1", "on", "enable", "enabled", "yes", "true") diff --git a/dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py b/dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py new file mode 100644 index 000000000000..ed316716e32c --- /dev/null +++ b/dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py @@ -0,0 +1,228 @@ +# Copyright (c) Advanced Micro Devices, Inc., or its affiliates. +# SPDX-License-Identifier: MIT +"""Unit tests for the D256 bf16 decode dispatcher wiring (gfx950 + gfx942). + +Covers: + - d256_decode candidate is registered and discoverable + - d256_decode priority outranks unified_3d (priority 10) for eligible shapes + - gfx950 decode GQA (16/2 heads, hd256, bf16) routes to d256_decode + - gfx942 decode routes to d256_decode + - explicit algorithm="d256_decode" forces the candidate + - spec path is "3d" and name is "rocke_attention_d256_decode" + - gates: rejects non-gfx942/gfx950 arch, non-bf16, prefill (2D), hd!=256, + sliding_window, sinks, softcap +""" + +from __future__ import annotations + +import os +import unittest + +import kernels.common.attention_unified as au +from dispatch.attention import ( + AttentionRequest, + attention_candidates, + dispatch_attention, +) + + +def _gfx950_d256_decode(**kw) -> AttentionRequest: + base = dict( + batch=1, + nhead_q=16, + nhead_k=2, + seqlen_q=1, + seqlen_k=8192, + hdim_q=256, + hdim_v=256, + arch="gfx950", + dtype="bf16", + ) + base.update(kw) + return AttentionRequest(**base) + + +class _PinnedArch: + """Context-manager that pins _RESOLVED_ATTENTION_ARCH to a given arch.""" + + def __init__(self, arch: str): + self._arch = arch + + def __enter__(self): + self._old = au._RESOLVED_ATTENTION_ARCH + au._RESOLVED_ATTENTION_ARCH = self._arch + return self + + def __exit__(self, *_): + au._RESOLVED_ATTENTION_ARCH = self._old + + +class TestD256DecodeRegistration(unittest.TestCase): + def test_candidate_is_registered(self): + names = [c.name for c in attention_candidates()] + self.assertIn("attention_d256_decode", names) + + def test_spec_id_is_d256_decode(self): + candidate = next( + c for c in attention_candidates() if c.name == "attention_d256_decode" + ) + self.assertEqual(candidate.spec_id, "d256_decode") + + def test_algorithm_is_d256_decode(self): + candidate = next( + c for c in attention_candidates() if c.name == "attention_d256_decode" + ) + self.assertEqual(candidate.algorithm, "d256_decode") + + def test_priority_beats_unified_3d(self): + # The registry sorts ascending; d256_decode must have a lower priority + # number than unified_3d so it is selected first for eligible requests. + d256 = next( + c for c in attention_candidates() if c.name == "attention_d256_decode" + ) + unified_3d = next( + c for c in attention_candidates() if c.name == "attention_unified_3d" + ) + self.assertLess(d256.priority, unified_3d.priority) + + +class TestD256DecodeSupportGates(unittest.TestCase): + def _candidate(self): + return next( + c for c in attention_candidates() if c.name == "attention_d256_decode" + ) + + def test_rejects_non_gfx942_gfx950_arch(self): + with _PinnedArch("gfx950"): + ok, why = self._candidate().supports(_gfx950_d256_decode(arch="gfx1250")) + self.assertFalse(ok) + self.assertIn("gfx942", why) + + def test_rejects_non_bf16_dtype(self): + with _PinnedArch("gfx950"): + ok, why = self._candidate().supports(_gfx950_d256_decode(dtype="fp16")) + self.assertFalse(ok) + self.assertIn("bf16", why) + + def test_rejects_prefill(self): + # Prefill (seqlen_q>1) routes to 2d, not 3d — d256_decode must refuse. + with _PinnedArch("gfx950"): + req = _gfx950_d256_decode( + batch=2, nhead_q=16, nhead_k=2, seqlen_q=512, seqlen_k=512 + ) + ok, why = self._candidate().supports(req) + self.assertFalse(ok) + # Either the cohort predicate (not all_decode) or the path check fires. + self.assertTrue("cohort" in why or "3d" in why or "2d" in why) + + def test_rejects_non_d256_head_size(self): + with _PinnedArch("gfx950"): + ok, why = self._candidate().supports( + _gfx950_d256_decode(hdim_q=128, hdim_v=128) + ) + self.assertFalse(ok) + self.assertIn("cohort", why) + + def test_rejects_sliding_window(self): + with _PinnedArch("gfx950"): + ok, why = self._candidate().supports(_gfx950_d256_decode(sliding_window=64)) + self.assertFalse(ok) + self.assertIn("cohort", why) + + def test_rejects_sinks(self): + with _PinnedArch("gfx950"): + ok, why = self._candidate().supports(_gfx950_d256_decode(use_sinks=True)) + self.assertFalse(ok) + self.assertIn("cohort", why) + + +class TestD256DecodeRouting(unittest.TestCase): + """Verify that dispatch picks d256_decode for eligible shapes.""" + + def test_gfx950_gqa_decode_routes_d256_decode(self): + with _PinnedArch("gfx950"): + r = dispatch_attention(_gfx950_d256_decode()) + self.assertEqual(r.candidate.spec_id, "d256_decode") + self.assertEqual(r.spec.path, "3d") + self.assertEqual(r.spec.name, "rocke_attention_d256_decode") + + def test_gfx942_gqa_decode_routes_d256_decode(self): + with _PinnedArch("gfx942"): + r = dispatch_attention(_gfx950_d256_decode(arch="gfx942")) + self.assertEqual(r.candidate.spec_id, "d256_decode") + self.assertEqual(r.spec.path, "3d") + + def test_spec_records_correct_dims(self): + with _PinnedArch("gfx950"): + r = dispatch_attention( + _gfx950_d256_decode( + batch=2, + nhead_q=16, + nhead_k=2, + seqlen_q=1, + seqlen_k=4096, + kv_block_size=32, + ) + ) + self.assertEqual(r.spec.head_size, 256) + self.assertEqual(r.spec.block_size, 32) + self.assertEqual(r.spec.dtype, "bf16") + + def test_explicit_algorithm_forces_d256_decode(self): + with _PinnedArch("gfx950"): + r = dispatch_attention(_gfx950_d256_decode(algorithm="d256_decode")) + self.assertEqual(r.candidate.algorithm, "d256_decode") + + def test_explicit_algorithm_unified_3d_bypasses_d256_decode(self): + with _PinnedArch("gfx950"): + r = dispatch_attention( + _gfx950_d256_decode(algorithm="auto", spec_id="unified_3d") + ) + self.assertEqual(r.candidate.spec_id, "unified_3d") + + def test_d256_decode_cohort_predicate_all_decode(self): + # The cohort helper itself: all_decode=True required. + p_decode = au.UnifiedAttentionProblem( + total_q=1, + num_seqs=1, + num_query_heads=16, + num_kv_heads=2, + head_size=256, + block_size=16, + max_seqlen_q=1, + max_seqlen_k=8192, + dtype="bf16", + ) + self.assertTrue(au._d256_decode_cohort(p_decode)) + + def test_d256_decode_cohort_predicate_rejects_prefill(self): + p_prefill = au.UnifiedAttentionProblem( + total_q=512, + num_seqs=1, + num_query_heads=16, + num_kv_heads=2, + head_size=256, + block_size=16, + max_seqlen_q=512, + max_seqlen_k=8192, + dtype="bf16", + ) + self.assertFalse(au._d256_decode_cohort(p_prefill)) + + def test_d256_decode_cohort_predicate_rejects_fp16(self): + p = au.UnifiedAttentionProblem( + total_q=1, + num_seqs=1, + num_query_heads=16, + num_kv_heads=2, + head_size=256, + block_size=16, + max_seqlen_q=1, + max_seqlen_k=8192, + dtype="fp16", + ) + self.assertFalse(au._d256_decode_cohort(p)) + + +if __name__ == "__main__": + unittest.main() From 115dc66ccf83cbe0c2f0db66711b97d2430742f0 Mon Sep 17 00:00:00 2001 From: Bartlomiej Kocot Date: Wed, 15 Jul 2026 16:37:00 +0000 Subject: [PATCH 02/11] extend tests --- .../prefill/parity_unified_attention.py | 366 ++++++++++++++++-- .../prefill/parity_unified_attention.py | 2 +- 2 files changed, 324 insertions(+), 44 deletions(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py index 29dcaf8935c7..34a457ea881a 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py @@ -55,8 +55,6 @@ from pathlib import Path from typing import List, Optional -SHAPES_JSON = Path(__file__).resolve().parent / "shapes.json" - # Block size for the paged-KV mapping. The dense SDPA problems are mapped onto # one contiguous run of paged-KV blocks per sequence; block_size=64 matches the # gfx942 flash-regime tile (T=64) so the default wide4 / L4 geometries apply. @@ -86,57 +84,339 @@ def num_queries_per_kv(self) -> int: return self.heads // self.kv_heads -def load_shapes(path: Path = SHAPES_JSON) -> List[Shape]: - """Load the shipped canonical shape set from ``shapes.json``.""" - data = json.loads(path.read_text()) +# --------------------------------------------------------------------------- +# In-code scenario functions (adapted from gfx950's parity_unified_attention). +# +# gfx942 constraints vs. gfx950: +# - causal-only (no sliding window / softcap / ALiBi / QQ-bias / sinks) +# - BLOCK_SIZE = 64 (tile size T = BLOCK_SIZE) +# - head_size ∈ {64, 128} for the shipped paths +# - Scenarios with non-uniform seq_lens are split into one Shape per unique +# (seqlen_q, seqlen_k) pair (batch=1) and given a disambiguating suffix. +# --------------------------------------------------------------------------- + + +def _shape( + name: str, + dtype: str, + seqlen_q: int, + seqlen_k: int, + heads: int, + kv_heads: int, + head_size: int, + batch: int, + group: str, +) -> Shape: + return Shape( + name=name, + dtype=dtype, + seqlen_q=seqlen_q, + seqlen_k=seqlen_k, + head_size=head_size, + heads=heads, + kv_heads=kv_heads, + batch=batch, + causal=True, + group=group, + ) + + +def default_scenarios() -> List[Shape]: + """Core production scenarios adapted from the gfx950 default set. + + Sliding-window / softcap / ALiBi / QQ-bias / sinks scenarios are dropped + (unsupported on the gfx942 SDPA-fwd net). Decode shapes (seqlen_q == 1) + are included; they exercise the T=64 single-query path. + Non-uniform seq_lens from the gfx950 mixed/prefill scenarios are split + into one Shape per unique (q, k) pair. + """ + g = "default" shapes: List[Shape] = [] - for group, items in data["scenarios"].items(): - for it in items: - shapes.append( - Shape( - name=it["name"], - dtype=it["dtype"], - seqlen_q=int(it["seqlen_q"]), - seqlen_k=int(it["seqlen_k"]), - head_size=int(it["head_size"]), - heads=int(it["heads"]), - kv_heads=int(it["kv_heads"]), - batch=int(it["batch"]), - causal=bool(it["causal"]), - group=group, - ) + + # decode_d128_b16 / b64 equivalents (block_size pinned to 64 on gfx942) + for sq, sk in [(1, 1024), (1, 2048), (1, 4096), (1, 512)]: + shapes.append( + _shape(f"decode_d128_q{sq}k{sk}", "fp16", sq, sk, 16, 2, 128, 1, g) + ) + + # decode_d256 (head_size=256, fp16) + for sq, sk in [(1, 1024), (1, 2048)]: + shapes.append( + _shape(f"decode_d256_q{sq}k{sk}", "fp16", sq, sk, 16, 2, 256, 1, g) + ) + + # bf16 D256 decode — Qwen3-Next-80B-A3B gated_attn GQA 16/2 (d256_decode cohort) + for sq, sk in [(1, 1024), (1, 2048), (1, 4096), (1, 8192)]: + shapes.append( + _shape(f"bf16_decode_d256_q{sq}k{sk}", "bf16", sq, sk, 16, 2, 256, 1, g) + ) + + # prefill_d128 (uniform batch from gfx950 prefill_d128_b16) + for sq, sk in [(64, 64), (128, 256), (32, 256)]: + shapes.append( + _shape(f"prefill_d128_q{sq}k{sk}", "fp16", sq, sk, 16, 2, 128, 1, g) + ) + + # mixed_d128 split into individual shapes + for sq, sk in [(1, 1328), (5, 18), (129, 463)]: + shapes.append( + _shape(f"mixed_d128_q{sq}k{sk}", "fp16", sq, sk, 16, 2, 128, 1, g) + ) + + # bf16 decode + for sq, sk in [(1, 1024), (1, 2048), (1, 4096)]: + shapes.append( + _shape(f"bf16_decode_d128_q{sq}k{sk}", "bf16", sq, sk, 16, 2, 128, 1, g) + ) + + # GQA non-power-of-2 NQK ratios (from gfx950 gqa_nqk* scenarios) + for sq, sk in [(1024, 1024), (512, 512)]: + shapes.append( + _shape(f"gqa_nqk5_d128_q{sq}k{sk}", "bf16", sq, sk, 40, 8, 128, 1, g) + ) + shapes.append( + _shape(f"gqa_nqk7_d128_q{sq}k{sk}", "bf16", sq, sk, 28, 4, 128, 1, g) + ) + shapes.append( + _shape(f"gqa_nqk3_d128_q{sq}k{sk}", "bf16", sq, sk, 24, 8, 128, 1, g) + ) + shapes.append( + _shape(f"gqa_nqk8_d128_q{sq}k{sk}", "bf16", sq, sk, 32, 4, 128, 1, g) + ) + + # combo bf16 d64/b32/h64kv8 prefill (from gfx950 combo_bf16_d64_b32_gqa8_64x8) + shapes.append( + _shape("combo_bf16_d64_h64kv8_q512k1024", "bf16", 512, 1024, 64, 8, 64, 2, g) + ) + + return shapes + + +def fmha_scenarios() -> List[Shape]: + """FMHA matrix shapes adapted from gfx950 (causal-compatible subset only). + + Drops sliding-window / softcap / ALiBi / QQ-bias variants. Non-uniform + seq_lens are split per (q, k) pair. Batch counts are kept from the + gfx950 ``rep(n, q, k)`` helper where the layout is uniform. + """ + g = "fmha" + shapes: List[Shape] = [] + + # GQA_4to1_Prefill_Basic (32:8 → 16:4 to stay ≤ 16 NQK) + shapes.append( + _shape("fmha_gqa_4to1_prefill_2k_b1", "fp16", 2048, 2048, 16, 4, 128, 1, g) + ) + shapes.append( + _shape("fmha_gqa_4to1_prefill_2k_b4", "fp16", 2048, 2048, 16, 4, 128, 4, g) + ) + shapes.append( + _shape("fmha_gqa_4to1_prefill_2k_bf16", "bf16", 2048, 2048, 16, 4, 128, 2, g) + ) + + # GQA_16to1 + shapes.append( + _shape("fmha_gqa_16to1_prefill_2k_b1", "fp16", 2048, 2048, 16, 1, 128, 1, g) + ) + + # MQA decode (seqlen_q = 1) + shapes.append( + _shape("fmha_mqa_16to1_decode_1k_b8", "fp16", 1, 1024, 16, 1, 128, 8, g) + ) + shapes.append( + _shape("fmha_mqa_16to1_decode_4k_b8", "bf16", 1, 4096, 16, 1, 128, 8, g) + ) + + # Tiny sequences (split per pair) + for sq, sk in [(1, 10), (3, 99), (33, 33), (1, 33), (3, 10)]: + shapes.append( + _shape(f"fmha_tiny_seqs_q{sq}k{sk}", "fp16", sq, sk, 16, 1, 128, 1, g) + ) + + # Asymmetric seqlen (split per pair) + for sq, sk in [(100, 256), (51, 99), (256, 1024)]: + shapes.append( + _shape(f"fmha_asym_b1_q{sq}k{sk}", "fp16", sq, sk, 16, 1, 128, 1, g) + ) + for sq, sk in [(100, 256), (51, 99), (256, 1024)]: + shapes.append( + _shape(f"fmha_asym_b2_d64_q{sq}k{sk}", "fp16", sq, sk, 16, 2, 128, 2, g) + ) + + # Cross-attention (sq << sk) + for sq, sk in [ + (1, 1024), + (1, 4096), + (32, 1024), + (32, 4096), + (128, 1024), + (128, 4096), + ]: + shapes.append( + _shape(f"fmha_cross_attn_q{sq}k{sk}", "fp16", sq, sk, 16, 4, 128, 1, g) + ) + + # Paged decode (many sequences, short Q) + shapes.append(_shape("fmha_paged_decode_b80", "fp16", 1, 4096, 16, 4, 128, 80, g)) + shapes.append( + _shape("fmha_paged_decode_q4_b16", "fp16", 4, 4096, 16, 4, 128, 16, g) + ) + + # Padding / boundary stress (odd lengths) + for sq in [259, 500, 987, 1023]: + shapes.append( + _shape(f"fmha_pad_boundary_q{sq}", "fp16", sq, sq, 16, 4, 128, 1, g) + ) + + # Prefill odd lengths + for sq, sk in [(113, 203), (339, 339), (799, 799), (1023, 1024), (3131, 3131)]: + shapes.append( + _shape(f"fmha_prefill_odd_q{sq}k{sk}", "fp16", sq, sk, 16, 4, 128, 1, g) + ) + + # H256 high-LDS shapes + shapes.append(_shape("fmha_h256_2k", "bf16", 2048, 2048, 16, 2, 256, 1, g)) + shapes.append(_shape("fmha_h256_4k_b2", "bf16", 4096, 4096, 8, 4, 256, 2, g)) + + # Long sequence stress (8K / 16K) + shapes.append(_shape("fmha_long_8k", "bf16", 8192, 8192, 16, 4, 128, 1, g)) + shapes.append(_shape("fmha_long_16k", "bf16", 16384, 16384, 16, 4, 128, 1, g)) + + # Extreme batch (many short sequences) + shapes.append(_shape("fmha_batch_64_s128", "fp16", 128, 128, 8, 8, 128, 64, g)) + shapes.append(_shape("fmha_batch_128_s128", "fp16", 128, 128, 8, 8, 128, 128, g)) + + # CK benchmark standard + shapes.append(_shape("fmha_bench_1k_b4", "fp16", 1024, 1024, 16, 16, 128, 4, g)) + shapes.append(_shape("fmha_bench_4k_b2_d256", "fp16", 4096, 4096, 8, 8, 256, 2, g)) + + # Vision transformer shapes + shapes.append(_shape("fmha_vit_1k_b4", "fp16", 1024, 1024, 16, 8, 128, 4, g)) + shapes.append(_shape("fmha_vit_256_b4", "fp16", 256, 256, 16, 8, 128, 4, g)) + + return shapes + + +def creative_scenarios() -> List[Shape]: + """Exploratory sweep adapted from gfx950 creative scenarios (causal-only). + + Long-context decode, GQA/MQA variants, head_size=256, bf16, chunked + prefill, and batch sweeps. Sliding-window / softcap / ALiBi / QQ-bias + shapes are omitted entirely. + """ + g = "creative" + shapes: List[Shape] = [] + + # Long-context decode + shapes.append(_shape("creative_decode_8k", "fp16", 1, 8192, 16, 2, 128, 1, g)) + shapes.append(_shape("creative_decode_32k", "fp16", 1, 32768, 16, 2, 128, 1, g)) + shapes.append( + _shape("creative_decode_64k_bf16", "bf16", 1, 65536, 16, 2, 128, 1, g) + ) + + # Large decode batch (varied kv per seq → one shape each) + for sk in [512, 1024, 2048, 4096, 768, 1536, 3072, 6144, 384, 896, 1280, 2560]: + shapes.append( + _shape(f"creative_decode_b16_k{sk}", "fp16", 1, sk, 16, 2, 128, 1, g) + ) + + # Tiny + large prefill + shapes.append(_shape("creative_prefill_tiny", "fp16", 4, 4, 16, 2, 128, 1, g)) + shapes.append(_shape("creative_prefill_512", "fp16", 512, 512, 16, 2, 128, 1, g)) + shapes.append(_shape("creative_prefill_2k", "fp16", 2048, 2048, 16, 2, 128, 1, g)) + + # Chunked prefill (sq < sk) + for sq, sk in [(128, 2048), (256, 4096), (512, 8192)]: + shapes.append( + _shape( + f"creative_chunk_prefill_q{sq}k{sk}", "fp16", sq, sk, 16, 2, 128, 1, g + ) + ) + + # GQA / MQA variants + for sq, sk in [(1, 4096), (1, 8192)]: + shapes.append( + _shape(f"creative_gqa_h32k4_q{sq}k{sk}", "fp16", sq, sk, 32, 4, 128, 1, g) + ) + shapes.append( + _shape(f"creative_mqa_h16k1_q{sq}k{sk}", "fp16", sq, sk, 16, 1, 128, 1, g) + ) + for sq, sk in [(1, 2048), (1, 4096)]: + shapes.append( + _shape(f"creative_gqa_h64k8_q{sq}k{sk}", "fp16", sq, sk, 64, 8, 128, 1, g) + ) + + # D64 bf16 (from gfx950 creative_r1r4_bf16_d64_sinks -- sinks dropped) + for sq, sk in [(640, 704), (640, 768)]: + shapes.append( + _shape(f"creative_d64_bf16_q{sq}k{sk}", "bf16", sq, sk, 64, 8, 64, 1, g) + ) + + # head_size=256 with bf16 + for sq, sk in [(1, 4096), (1, 8192)]: + shapes.append( + _shape( + f"creative_d256_bf16_decode_q{sq}k{sk}", + "bf16", + sq, + sk, + 16, + 2, + 256, + 1, + g, + ) + ) + for sq, sk in [(128, 1024), (256, 2048)]: + shapes.append( + _shape( + f"creative_d256_prefill_q{sq}k{sk}", "fp16", sq, sk, 16, 2, 256, 1, g ) + ) + + # bf16 chunked prefill (from gfx950 creative_bf16_b64_chunk) + for sq, sk in [(64, 2048), (128, 4096)]: + shapes.append( + _shape(f"creative_bf16_chunk_q{sq}k{sk}", "bf16", sq, sk, 16, 2, 128, 1, g) + ) + return shapes -def select_shapes(shapes: List[Shape], selectors: Optional[List[str]]) -> List[Shape]: +def all_inline_scenarios() -> List[Shape]: + return default_scenarios() + fmha_scenarios() + creative_scenarios() + + +def select_shapes(selectors: Optional[List[str]]) -> List[Shape]: """Resolve ``--scenario`` selectors to a concrete shape list. - A selector is either a group name (``correctness`` / ``perf`` / ``all``) - or an exact shape name. Multiple ``--scenario`` flags union together. + A selector is either a group name (``default`` / ``fmha`` / ``creative`` / + ``all``) or an exact shape name. Multiple ``--scenario`` flags union. + No selector → all inline scenarios. """ + all_shapes = all_inline_scenarios() if not selectors: - return shapes + return all_shapes + wanted: List[Shape] = [] - seen = set() + seen: set = set() + + def _add(s: Shape) -> None: + if s.name not in seen: + seen.add(s.name) + wanted.append(s) + for sel in selectors: - if sel == "all": - picked = shapes - elif sel in ( - "correctness", - "perf", - "decode", - "gqa_nqk_nonpow2", - "short_prefill", - "long_prefill", - ): - picked = [s for s in shapes if s.group == sel] + if sel in ("all", "inline"): + for s in all_shapes: + _add(s) + elif sel in ("default", "fmha", "creative"): + for s in all_shapes: + if s.group == sel: + _add(s) else: - picked = [s for s in shapes if s.name == sel] - for s in picked: - if s.name not in seen: - seen.add(s.name) - wanted.append(s) + for s in all_shapes: + if s.name == sel: + _add(s) return wanted @@ -663,7 +943,7 @@ def main() -> int: "--scenario", action="append", default=None, - help="group (correctness|perf|decode|short_prefill|long_prefill|gqa_nqk_nonpow2|all) or exact shape name; repeatable", + help="group (default|fmha|creative|all) or exact shape name; repeatable", ) parser.add_argument("--attempts", type=int, default=30) parser.add_argument("--warmup", type=int, default=10) @@ -717,7 +997,7 @@ def main() -> int: if _q_major_grid_enabled(): print("HIPDNN_GFX942_Q_MAJOR_GRID -> enabled") - shapes = select_shapes(load_shapes(), args.scenario) + shapes = select_shapes(args.scenario) if not shapes: print(f"no shapes matched {args.scenario!r}", file=sys.stderr) return 2 diff --git a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx950/attention/prefill/parity_unified_attention.py b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx950/attention/prefill/parity_unified_attention.py index a4ec68b820a6..006122c73c7c 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx950/attention/prefill/parity_unified_attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx950/attention/prefill/parity_unified_attention.py @@ -891,7 +891,7 @@ def creative_scenarios() -> List[Scenario]: # --- head_size=256 with bf16 --- Scenario( name="creative_d256_bf16_decode", - seq_lens=[(1, 4096), (1, 8192)], + seq_lens=[(1, 1024), (1, 2048), (1, 4096), (1, 8192)], num_query_heads=16, num_kv_heads=2, head_size=256, From df94b362823a010d18f47220e8fa3ad66572c4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kocot?= Date: Thu, 16 Jul 2026 00:34:46 +0200 Subject: [PATCH 03/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../hip-kernel-provider/rocke/library/dispatch/attention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py index ee77ff5add2b..cc19290e1e38 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py @@ -40,7 +40,7 @@ from __future__ import annotations from dataclasses import asdict, dataclass -from typing import Any, Optional, Sequence, Tuple +from typing import Sequence, Tuple from rocke.core.arch import ArchTarget from kernels.common.attention_unified import ( From 0e65dafc22f697a5aca76d21c31c7b5e7e6d78e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kocot?= Date: Thu, 16 Jul 2026 00:34:55 +0200 Subject: [PATCH 04/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../library/tests/dispatch/attention/test_d256_decode_wiring.py | 1 - 1 file changed, 1 deletion(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py b/dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py index ed316716e32c..75324add11e5 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py @@ -15,7 +15,6 @@ from __future__ import annotations -import os import unittest import kernels.common.attention_unified as au From 034eb15bfcbffbf5c58dece176624277d0df4cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kocot?= Date: Thu, 16 Jul 2026 00:35:06 +0200 Subject: [PATCH 05/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../gfx942/attention/prefill/parity_unified_attention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py index 34a457ea881a..01481f0f9d95 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py @@ -90,7 +90,7 @@ def num_queries_per_kv(self) -> int: # gfx942 constraints vs. gfx950: # - causal-only (no sliding window / softcap / ALiBi / QQ-bias / sinks) # - BLOCK_SIZE = 64 (tile size T = BLOCK_SIZE) -# - head_size ∈ {64, 128} for the shipped paths +# - head_size ∈ {64, 128} for the shipped paths (+ select 256 decode shapes) # - Scenarios with non-uniform seq_lens are split into one Shape per unique # (seqlen_q, seqlen_k) pair (batch=1) and given a disambiguating suffix. # --------------------------------------------------------------------------- From 1d79977018d22504cb433cf22ccb229f504c31f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kocot?= Date: Thu, 16 Jul 2026 00:37:12 +0200 Subject: [PATCH 06/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../rocke/library/kernels/common/attention_unified.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py b/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py index 190982ac0295..d18bbf311e2a 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py @@ -2229,9 +2229,9 @@ def _enable_gfx942_3d_wide_kv_load(problem: UnifiedAttentionProblem) -> bool: def _d256_decode_cohort(problem: UnifiedAttentionProblem) -> bool: """Predicate: true when this problem belongs to the D256 bf16 decode cohort. - Covers gfx950 and gfx942, bf16, head_size=256, decode (all_decode=True). - No sliding window, softcap, sinks, alibi, or qq_bias — these features - are not validated for the D256 decode fast path. + Intended for bf16, head_size=256, decode-only (all_decode=True) shapes; the + architecture gate (gfx942/gfx950) is enforced by the dispatcher/caller. + Excludes sliding window, softcap, sinks, ALiBi, and QQ-bias. """ return ( problem.head_size == 256 From 3a4b0ca0333a574ac533b6d64be9037449cb9f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kocot?= Date: Thu, 16 Jul 2026 00:37:30 +0200 Subject: [PATCH 07/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../hip-kernel-provider/rocke/library/dispatch/attention.py | 1 - 1 file changed, 1 deletion(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py index cc19290e1e38..0c47f213d0e9 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py @@ -152,7 +152,6 @@ class AttentionSpec: name: str = "rocke_attention_unified" # Pinned codegen knobs from a specialized candidate; None for generic paths. # Stored as a sorted tuple of (key, value) pairs for hashability. - # tiled_overrides: Optional[Tuple[Tuple[str, Any], ...]] = None def kernel_name(self) -> str: from rocke.helpers.spec import kernel_name_join From 4eae68b6bb31b3236a1961c24a5e55a105fcc316 Mon Sep 17 00:00:00 2001 From: Bartlomiej Kocot Date: Wed, 15 Jul 2026 23:28:52 +0000 Subject: [PATCH 08/11] readme --- .../gfx942/attention/decode/TUNING_D256.md | 108 ++++++++++++++++++ .../rocke/library/dispatch/AGENTS.md | 67 +++++++++++ 2 files changed, 175 insertions(+) create mode 100644 dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md create mode 100644 dnn-providers/hip-kernel-provider/rocke/library/dispatch/AGENTS.md diff --git a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md new file mode 100644 index 000000000000..6506409f9024 --- /dev/null +++ b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md @@ -0,0 +1,108 @@ +# D256 bf16 decode tuning — gfx942 + +**Workload:** Qwen3-Next-80B-A3B gated attention decode, GQA 16/2, +`head_size=256`, `block_size=16`, `dtype=bf16`, `batch=1`, +`kv_len` sweep 512–32768. + +**Dispatcher candidate:** `attention_d256_decode` (priority 5, algorithm +`d256_decode`) registered in `dispatch/attention.py`. Routes D256 bf16 decode +to the 3D split-KV path on both gfx942 and gfx950. + +**Cohort predicate:** `_d256_decode_cohort()` in +`kernels/common/attention_unified.py` — `head_size==256`, `dtype=="bf16"`, +`all_decode==True`, no sliding_window / softcap / sinks / alibi / qq_bias / fp8. + +--- + +## Problem found + +`_num_segments()` in `kernels/common/attention_unified.py` had a gfx942 +short-KV cap block: + +```python +if arch == "gfx942" and max_seqlen_q == 1 and max_seqlen_k <= 2048: + if head_size == 64: return min(segments, 32) + if head_size == 128: return min(segments, 16) + return min(segments, 64) # ← D256 fell here — wrong +``` + +D256 inherited `min(segments, 64)` via the `else` branch, which was intended +for other head sizes. The formula produces 128 segments for typical D256 decode +shapes; capping to 64 at short kv_len was a regression. + +--- + +## Tuning workflow + +```bash +# Sweep num_segments for D256 bf16 decode shapes on gfx942 +python -m benchmarks.gfx942.attention.decode.benchmark_decode_live \ + --shapes library/benchmarks/gfx942/attention/decode/decode_shapes.json \ + --segments-sweep 8 16 32 64 128 \ + --output-json /tmp/seg_sweep_gfx942.json +``` + +The benchmark prints a `segments_sweep:` line per D256 shape: +``` +qwen3next_80b_b1_kv8192 ... segments_sweep: seg8=187.8us(0.52x) seg16=102.2us(0.95x) seg32=59.7us(1.63x) seg64=48.0us(2.03x) seg128=40.8us(2.39x) +``` + +--- + +## Sweep results (gfx942, 2026-07) + +| kv_len | seg8 | seg16 | seg32 | seg64 | seg128 | winner | +|---|---|---|---|---|---|---| +| 512 | 0.26x | 0.26x | 0.26x | 0.26x | 0.26x | — (2D path) | +| 1024 | 3.23x | 3.21x | 3.18x | 3.23x | **3.24x** | seg128 | +| 2048 | 3.21x | 3.19x | **3.23x** | 3.19x | 3.19x | seg32 ≈ seg128 | +| 4096 | 0.87x | 1.47x | 2.37x | 2.40x | **2.54x** | seg128 | +| 8192 | 0.52x | 0.95x | 1.63x | 2.03x | **2.39x** | seg128 | +| 16384 | 0.25x | 0.48x | 0.88x | 1.30x | **1.76x** | seg128 | +| 32768 | 0.13x | 0.25x | 0.47x | 0.79x | **1.22x** | seg128 | + +kv=512 routes to 2D (`max_seqlen_k <= 512` triggers `use_2d_kernel`); segment +count has no effect there. + +**Conclusion:** seg128 wins or ties at every kv_len. Do not cap below the +formula value for D256. + +--- + +## Fix applied + +```python +# kernels/common/attention_unified.py — _num_segments() +if arch == "gfx942" and max_seqlen_q == 1 and max_seqlen_k <= 2048: + if head_size == 64: return min(segments, 32) + if head_size == 128: return min(segments, 16) + # D256: seg128 wins sweep — do not cap below formula value. + if head_size != 256: + return min(segments, 64) +``` + +--- + +## Before / after speedup vs Triton (gfx942, batch=1) + +| kv_len | before | after | delta | +|---|---|---|---| +| 512 | 0.25x | 0.56x | +0.32x | +| 1024 | 3.09x | 3.16x | +0.07x | +| 2048 | 3.04x | 2.89x | −0.15x† | +| 4096 | 2.53x | 2.74x | +0.21x | +| 8192 | 2.26x | 2.62x | +0.37x | +| 16384 | 1.90x | 2.19x | +0.28x | +| 32768 | 1.40x | 1.66x | +0.26x | + +† kv=2048 delta is within run-to-run noise; the sweep showed seg128 ≈ seg32 +at this point, so no regression is expected structurally. + +Full post-tuning results saved in `decode_shapes_perf.csv`. + +--- + +## gfx950 + +No tuning needed. `_num_segments()` has no cap for gfx950 — it already returns +the raw formula value (128) for all D256 decode shapes. diff --git a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/AGENTS.md b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/AGENTS.md new file mode 100644 index 000000000000..1ade20903ca2 --- /dev/null +++ b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/AGENTS.md @@ -0,0 +1,67 @@ +# Attention dispatcher — agent guide + +This folder owns the **path-level dispatch** for unified attention: which kernel +family (2D tiled prefill vs 3D split-KV decode) and which specialized candidate +handles a given `AttentionRequest`. + +## What the dispatcher decides (and what it does NOT) + +**Decides:** kernel path (`"2d"` or `"3d"`), candidate name, algorithm tag, +and spec identity `(path, head_size, block_size)`. + +**Does NOT decide:** CTA geometry (`num_warps`, `tile_size`), `num_segments`, +`waves_per_eu`, or any other performance knob. Those live in +`builders/common/attention_spec_builder.py` and +`kernels/common/attention_unified.py`. The parity identity with C++ is +`(path, head_size, block_size)` only — C++ reads `num_segments` as a parameter +passed from Python, it does not recompute it. + +## Candidate registry — priority table + +| priority | candidate | scope | +|---|---|---| +| 5 | `attention_gfx942_dense_pipe` | gfx942 fp16 2D prefill flash | +| 5 | `attention_d256_decode` | gfx942/gfx950 bf16 D256 3D decode | +| 10 | `attention_unified_2d` | generic 2D prefill fallback | +| 10 | `attention_unified_3d` | generic 3D decode fallback | + +Lower priority number = higher precedence. Generic candidates (10) remain the +fallback for everything a specialized candidate (5) does not claim. + +## How to add a new specialized candidate + +Follow the `_make_d256_decode_candidate()` pattern in `attention.py`: + +1. **Add a cohort predicate** in `kernels/common/attention_unified.py` — + a pure function of `UnifiedAttentionProblem` that returns `True` for the + target shape family. This is the single source of truth for membership; + import it lazily inside the factory to keep `dispatch/` arch-neutral. + +2. **Add a factory function** `_make__candidate()` in `attention.py`. + The `support()` closure must check in order: request errors → arch/dtype + gates → `_selector_matches` → `supports_native_unified_attention` → + cohort predicate → path check (`select_path() == "2d"` or `"3d"`). + +3. **Register** with `ATTENTION_REGISTRY.register(_make__candidate())`. + +4. **Add CPU-only dispatch tests** in + `tests/dispatch/attention/test__wiring.py`. Cover: registration, + spec_id, algorithm, priority ordering, support gates (wrong arch/dtype/ + cohort/path), and routing for each target arch. Use `_PinnedArch` context + manager to avoid GPU dependency. + +5. **No C++ changes needed.** The dispatcher is Python-only. + +## How to tune `num_segments` for a new cohort + +See the worked example: +`benchmarks/gfx942/attention/decode/TUNING_D256.md` + +## Testing (CPU-only, no GPU) + +```bash +PYTHONPATH=library:platform/python python -m unittest discover \ + -s library/tests/dispatch/attention -p "test_*.py" -v +``` + +All dispatch tests complete in < 1 s. From eaddb05d079e0bc61b7b5d2fbca84365e9548186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kocot?= Date: Mon, 20 Jul 2026 00:27:10 +0200 Subject: [PATCH 09/11] Update dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py Co-authored-by: Anagha Rao <127366241+AnaghaRaoAMD@users.noreply.github.com> --- .../gfx942/attention/prefill/parity_unified_attention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py index 01481f0f9d95..43d76046d5c7 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py @@ -125,7 +125,7 @@ def default_scenarios() -> List[Shape]: """Core production scenarios adapted from the gfx950 default set. Sliding-window / softcap / ALiBi / QQ-bias / sinks scenarios are dropped - (unsupported on the gfx942 SDPA-fwd net). Decode shapes (seqlen_q == 1) + (the harness's torch reference is causal-only, not a kernel limitation). are included; they exercise the T=64 single-query path. Non-uniform seq_lens from the gfx950 mixed/prefill scenarios are split into one Shape per unique (q, k) pair. From f632ed5558a3432bbb5379aec52f1d82b321855b Mon Sep 17 00:00:00 2001 From: Bartlomiej Kocot Date: Sun, 19 Jul 2026 19:53:15 -0400 Subject: [PATCH 10/11] fixes --- .../gfx942/attention/decode/TUNING_D256.md | 108 ------------------ .../builders/gfx942/attention/README.md | 40 +++---- .../builders/gfx942/attention/__init__.py | 8 +- .../prefill/parity_unified_attention.py | 10 +- .../rocke/library/dispatch/attention.py | 2 - 5 files changed, 27 insertions(+), 141 deletions(-) delete mode 100644 dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md diff --git a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md deleted file mode 100644 index 6506409f9024..000000000000 --- a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/TUNING_D256.md +++ /dev/null @@ -1,108 +0,0 @@ -# D256 bf16 decode tuning — gfx942 - -**Workload:** Qwen3-Next-80B-A3B gated attention decode, GQA 16/2, -`head_size=256`, `block_size=16`, `dtype=bf16`, `batch=1`, -`kv_len` sweep 512–32768. - -**Dispatcher candidate:** `attention_d256_decode` (priority 5, algorithm -`d256_decode`) registered in `dispatch/attention.py`. Routes D256 bf16 decode -to the 3D split-KV path on both gfx942 and gfx950. - -**Cohort predicate:** `_d256_decode_cohort()` in -`kernels/common/attention_unified.py` — `head_size==256`, `dtype=="bf16"`, -`all_decode==True`, no sliding_window / softcap / sinks / alibi / qq_bias / fp8. - ---- - -## Problem found - -`_num_segments()` in `kernels/common/attention_unified.py` had a gfx942 -short-KV cap block: - -```python -if arch == "gfx942" and max_seqlen_q == 1 and max_seqlen_k <= 2048: - if head_size == 64: return min(segments, 32) - if head_size == 128: return min(segments, 16) - return min(segments, 64) # ← D256 fell here — wrong -``` - -D256 inherited `min(segments, 64)` via the `else` branch, which was intended -for other head sizes. The formula produces 128 segments for typical D256 decode -shapes; capping to 64 at short kv_len was a regression. - ---- - -## Tuning workflow - -```bash -# Sweep num_segments for D256 bf16 decode shapes on gfx942 -python -m benchmarks.gfx942.attention.decode.benchmark_decode_live \ - --shapes library/benchmarks/gfx942/attention/decode/decode_shapes.json \ - --segments-sweep 8 16 32 64 128 \ - --output-json /tmp/seg_sweep_gfx942.json -``` - -The benchmark prints a `segments_sweep:` line per D256 shape: -``` -qwen3next_80b_b1_kv8192 ... segments_sweep: seg8=187.8us(0.52x) seg16=102.2us(0.95x) seg32=59.7us(1.63x) seg64=48.0us(2.03x) seg128=40.8us(2.39x) -``` - ---- - -## Sweep results (gfx942, 2026-07) - -| kv_len | seg8 | seg16 | seg32 | seg64 | seg128 | winner | -|---|---|---|---|---|---|---| -| 512 | 0.26x | 0.26x | 0.26x | 0.26x | 0.26x | — (2D path) | -| 1024 | 3.23x | 3.21x | 3.18x | 3.23x | **3.24x** | seg128 | -| 2048 | 3.21x | 3.19x | **3.23x** | 3.19x | 3.19x | seg32 ≈ seg128 | -| 4096 | 0.87x | 1.47x | 2.37x | 2.40x | **2.54x** | seg128 | -| 8192 | 0.52x | 0.95x | 1.63x | 2.03x | **2.39x** | seg128 | -| 16384 | 0.25x | 0.48x | 0.88x | 1.30x | **1.76x** | seg128 | -| 32768 | 0.13x | 0.25x | 0.47x | 0.79x | **1.22x** | seg128 | - -kv=512 routes to 2D (`max_seqlen_k <= 512` triggers `use_2d_kernel`); segment -count has no effect there. - -**Conclusion:** seg128 wins or ties at every kv_len. Do not cap below the -formula value for D256. - ---- - -## Fix applied - -```python -# kernels/common/attention_unified.py — _num_segments() -if arch == "gfx942" and max_seqlen_q == 1 and max_seqlen_k <= 2048: - if head_size == 64: return min(segments, 32) - if head_size == 128: return min(segments, 16) - # D256: seg128 wins sweep — do not cap below formula value. - if head_size != 256: - return min(segments, 64) -``` - ---- - -## Before / after speedup vs Triton (gfx942, batch=1) - -| kv_len | before | after | delta | -|---|---|---|---| -| 512 | 0.25x | 0.56x | +0.32x | -| 1024 | 3.09x | 3.16x | +0.07x | -| 2048 | 3.04x | 2.89x | −0.15x† | -| 4096 | 2.53x | 2.74x | +0.21x | -| 8192 | 2.26x | 2.62x | +0.37x | -| 16384 | 1.90x | 2.19x | +0.28x | -| 32768 | 1.40x | 1.66x | +0.26x | - -† kv=2048 delta is within run-to-run noise; the sweep showed seg128 ≈ seg32 -at this point, so no regression is expected structurally. - -Full post-tuning results saved in `decode_shapes_perf.csv`. - ---- - -## gfx950 - -No tuning needed. `_num_segments()` has no cap for gfx950 — it already returns -the raw formula value (128) for all D256 decode shapes. diff --git a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/README.md b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/README.md index 18e9bd0879b1..4bef9f5ef095 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/README.md +++ b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/README.md @@ -15,9 +15,9 @@ torch reference — so it runs on any box with torch + a gfx942 GPU. ## What it shows -- A correct gfx942 tiled SDPA-forward over a canonical shape set - (`shapes.json`): fp16/bf16, `head_size` 64 / 128, MHA + GQA, and the - decode / short-prefill / long-prefill regimes — each gated against an fp32 +- A correct gfx942 tiled SDPA-forward over a canonical inline shape set + (`default` / `fmha` / `creative` groups): fp16/bf16, `head_size` 64 / 128, + MHA + GQA, and decode / prefill regimes — each gated against an fp32 paged reference. - The two shipped D128-fp16 flash geometries side by side: the provider's analytic-default **wide4** (workgroup 256, `num_warps=4`) and the **L4** @@ -38,8 +38,7 @@ torch reference — so it runs on any box with torch + a gfx942 GPU. | file | role | |------|------| -| `shapes.json` | the canonical shape set, grouped by regime: `decode`, `short_prefill`, `long_prefill`, and `d256_disabled` (off by default) | -| `parity_unified_attention.py` | per-shape parity + latency harness; builds the gfx942 spec **explicitly** (wide4 vs L4) and exposes the `HIPDNN_GFX942_*` lever knobs via `--scenario` | +| `parity_unified_attention.py` | per-shape parity + latency harness; defines inline scenario groups (`default` / `fmha` / `creative`), builds the gfx942 spec **explicitly** (wide4 vs L4), and exposes the `HIPDNN_GFX942_*` lever knobs via `--scenario` | | `final_shapes_check.py` | the definitive correctness + perf check over every shape via the **production dispatcher** (`run_unified_attention_torch`), timed eager + graph against PyTorch's flash SDPA | | `__init__.py` | package marker + module docstring | @@ -54,7 +53,7 @@ directory (so `python/` is the package root): PYTHONPATH=python python python/rocke/examples/gfx942/attention/final_shapes_check.py # 2) The explicit parity + latency harness (builds the spec by hand; default -# runs the whole shapes.json set): +# runs all inline scenario groups): PYTHONPATH=python python python/rocke/examples/gfx942/attention/parity_unified_attention.py ``` @@ -62,7 +61,7 @@ PYTHONPATH=python python python/rocke/examples/gfx942/attention/parity_unified_a | flag | default | meaning | |------|---------|---------| -| `--groups G [G ...]` | all non-`*_disabled` groups | which `shapes.json` groups to run (e.g. `--groups decode`, or `--groups d256_disabled` to include the off-by-default d256 set) | +| `--groups G [G ...]` | all non-`*_disabled` groups | which shape groups to run (e.g. `--groups decode`, or `--groups d256_disabled` to include the off-by-default d256 set) | | `--warmup N` | 10 | warm-up launches before timing | | `--iters N` | 50 | inner timed launches per measurement | | `--reps N` | 10 | timed measurements per cell, reduced per `--reduce` | @@ -78,20 +77,17 @@ correctness failure. | flag | default | meaning | |------|---------|---------| -| `--scenario S` (repeatable) | all shapes | a group (`correctness` / `perf` / `decode` / `all`) **or** an exact shape name; multiple flags union together | +| `--scenario S` (repeatable) | all shapes | a group (`default` / `fmha` / `creative` / `all`) **or** an exact shape name; multiple flags union together | | `--attempts N` | 30 | timed launches | | `--warmup N` | 10 | warm-up launches | | `--tol F` | `2e-2` fp16 / `4e-2` bf16 | absolute-tolerance override | | `--report PATH` | none | write a JSON results report | | `--debug-mismatch N` | 0 | on failure, print the `N` worst mismatch samples | -> **Note on `--scenario`:** the selector special-cases the group names -> `correctness`, `perf`, `decode`, and `all`. The current `shapes.json` groups -> are `decode` / `short_prefill` / `long_prefill` / `d256_disabled`, so -> `--scenario decode` selects the decode group and `--scenario all` (or no flag) -> runs everything; any other value is matched as an **exact shape name**, e.g. -> `--scenario fp16_h32kv8_b1_s2048x2048_d128`. To target the other regimes by -> group, prefer `final_shapes_check.py --groups short_prefill long_prefill`. +> **Note on `--scenario`:** the selector accepts the group names +> `default`, `fmha`, `creative`, and `all`. `--scenario all` (or no flag) +> runs all three groups; any other value is matched as an **exact shape name**, +> e.g. `--scenario decode_d128_q1k1024`. ```bash # Force the L4 (WG=64) flash geometry instead of the default wide4, on one shape: @@ -100,17 +96,17 @@ HIPDNN_GFX942_FLASH_WIDE=0 PYTHONPATH=python python \ --scenario fp16_h32kv8_b1_s2048x2048_d128 ``` -## The shape set (`shapes.json`) +## The shape set (inline scenarios) -Grouped by regime; every shape is causal (the kernel always applies a causal -mask), so non-causal *prefill* shapes are not included. +Shapes are defined inline in `parity_unified_attention.py` across three groups; +every shape is causal (the kernel always applies a causal mask), so non-causal +prefill shapes are not included. | group | what it covers | |-------|----------------| -| `decode` | `seqlen_q == 1`, long KV (a single query attends to all keys) — fp16, D64/D128, MHA + GQA, batch 1–64 | -| `short_prefill` | 1–2 KV tiles (`seqlen_q` 64 / 512 / 528) — fp16/bf16, D64/D128, MHA + GQA | -| `long_prefill` | square prefill `seqlen_q == seqlen_k` up to 8192 — fp16/bf16, D64/D128, MHA + GQA, batch 1–51 | -| `d256_disabled` | `head_size = 256` — **off by default** (no tiled d256 path on gfx942 → scalar fallback; see below) | +| `default` | core production shapes — decode (`seqlen_q == 1`) and prefill, fp16/bf16, D64/D128, MHA + GQA, varied batch sizes | +| `fmha` | integration-test net shapes — GQA ratios, asymmetric seq-lens, tiny seqs, cross-attention, large-batch decode, and select D256 shapes | +| `creative` | exploratory sweep — long-KV decode (up to 64 k), chunked prefill, non-standard GQA ratios, D64/D256 bf16, large-batch variants | ## Arch notes diff --git a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/__init__.py b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/__init__.py index 94143eaac1bd..086d7f6392c9 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/__init__.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/__init__.py @@ -8,8 +8,8 @@ harness it has **no** Triton/AITER dependency: the oracle is a fp32 torch reference, so the example runs on any box with torch + a gfx942 GPU. -Ships the canonical shapes we validate (``shapes.json``) and the definitive -correctness + perf check (``final_shapes_check.py``); see ``README.md``. The -exhaustive sweep / probe / regression harnesses that found & gated the levers -are archived under ``~/attention-archive/``. +Ships inline scenario groups (``default`` / ``fmha`` / ``creative``) and the +definitive correctness + perf check (``final_shapes_check.py``); see +``README.md``. The exhaustive sweep / probe / regression harnesses that found +& gated the levers are archived under ``~/attention-archive/``. """ diff --git a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py index 6a49c4adbc68..b77662a14773 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py @@ -12,9 +12,9 @@ The harness: - 1. Loads the canonical shapes we validate from the shipped ``shapes.json`` - (``--scenario`` selects subsets); these mirror the rocke-provider - integration-test net plus the case-study perf shapes. + 1. Defines shapes inline across three scenario groups (``default`` / + ``fmha`` / ``creative``); ``--scenario`` selects subsets by group name + or exact shape name, defaulting to all groups. 2. For each shape, builds the gfx942 tiled-2D kernel via ``UnifiedAttention2DTiledSpec`` / ``build_unified_attention_2d_tiled`` (auto-routes to ``instances/gfx942/attention_tiled_2d.py``), gated by @@ -37,7 +37,7 @@ PYTHONPATH=python .venv/bin/python \\ python/rocke/library/builders/gfx942/attention/parity_unified_attention.py \\ - --scenario correctness + --scenario default # force the L4 (WG=64) fallback instead of the default wide4: HIPDNN_GFX942_FLASH_WIDE=0 PYTHONPATH=python .venv/bin/python \\ @@ -77,7 +77,7 @@ class Shape: kv_heads: int # Hkv batch: int # B causal: bool - group: str # "correctness" | "perf" | "decode" + group: str # "default" | "fmha" | "creative" @property def num_queries_per_kv(self) -> int: diff --git a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py index 0c47f213d0e9..de7717159937 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py +++ b/dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py @@ -150,8 +150,6 @@ class AttentionSpec: num_query_heads: int num_kv_heads: int name: str = "rocke_attention_unified" - # Pinned codegen knobs from a specialized candidate; None for generic paths. - # Stored as a sorted tuple of (key, value) pairs for hashability. def kernel_name(self) -> str: from rocke.helpers.spec import kernel_name_join From ad5d2bdcddd075e77bca20bd49aa11767950060e Mon Sep 17 00:00:00 2001 From: Bartlomiej Kocot Date: Mon, 20 Jul 2026 09:28:50 +0000 Subject: [PATCH 11/11] gfx950 perf --- .../attention/prefill/prefill_bench_perf.json | 956 +++++++++--------- 1 file changed, 478 insertions(+), 478 deletions(-) diff --git a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/prefill/prefill_bench_perf.json b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/prefill/prefill_bench_perf.json index 0d4e8bdab152..52ecffe245d6 100644 --- a/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/prefill/prefill_bench_perf.json +++ b/dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/prefill/prefill_bench_perf.json @@ -6,34 +6,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.04494441986083984, - "aoTriton_ms": 0.038186779022216795, - "flydsl_ms": 0.21248931884765626, + "triton_ms": 0.04530444145202637, + "aoTriton_ms": 0.03762197971343994, + "flydsl_ms": 0.21236127853393555, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.054742140769958494, - "speedup": 0.8210205013667374, + "ms": 0.05295730113983154, + "speedup": 0.8554899981100224, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.029582679271697998, - "speedup": 1.5192815852835397, + "ms": 0.02966507911682129, + "speedup": 1.527197728804874, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.21151378386723826, + "speedup_flydsl_vs_triton": 0.21333663916883355, "best_variant": "fallback", - "best_speedup_vs_triton": 1.5192815852835397, - "best_speedup_vs_aoTriton": 1.2908492388906239, - "best_speedup_vs_flydsl": 7.182896346070541 + "best_speedup_vs_triton": 1.527197728804874, + "best_speedup_vs_aoTriton": 1.2682244859447136, + "best_speedup_vs_flydsl": 7.158628422922971 }, { "signature": "d128_b64_h32kv8_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -42,34 +42,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.04407966136932373, - "aoTriton_ms": 0.06277822017669678, - "flydsl_ms": 0.22260065078735353, + "triton_ms": 0.04453643798828125, + "aoTriton_ms": 0.0625582218170166, + "flydsl_ms": 0.2167757797241211, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.058950982093811034, - "speedup": 0.7477341310307268, + "ms": 0.05854057788848877, + "speedup": 0.7607789262537968, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.08023520469665528, - "speedup": 0.5493805560286837, + "ms": 0.08046321868896485, + "speedup": 0.5535005772070762, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.19802126010598348, + "speedup_flydsl_vs_triton": 0.2054493266958162, "best_variant": "prod", - "best_speedup_vs_triton": 0.7477341310307268, - "best_speedup_vs_aoTriton": 1.0649223803734993, - "best_speedup_vs_flydsl": 3.7760295567785502 + "best_speedup_vs_triton": 0.7607789262537968, + "best_speedup_vs_aoTriton": 1.068630069490958, + "best_speedup_vs_flydsl": 3.7030003382789833 }, { "signature": "d128_b64_h32kv8_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -78,34 +78,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.08524806022644044, - "aoTriton_ms": 0.14309745788574219, - "flydsl_ms": 0.24806970596313477, + "triton_ms": 0.08698328018188477, + "aoTriton_ms": 0.14490785598754882, + "flydsl_ms": 0.24641443252563477, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.16571046829223632, - "speedup": 0.5144398003637431, + "ms": 0.16628883361816407, + "speedup": 0.5230855150600047, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.25876741409301757, - "speedup": 0.32943893080678555, + "ms": 0.2592129707336426, + "speedup": 0.3355668504384585, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.3436455890309678, + "speedup_flydsl_vs_triton": 0.35299588295355144, "best_variant": "prod", - "best_speedup_vs_triton": 0.5144398003637431, - "best_speedup_vs_aoTriton": 0.8635390350438495, - "best_speedup_vs_flydsl": 1.4970068488712192 + "best_speedup_vs_triton": 0.5230855150600047, + "best_speedup_vs_aoTriton": 0.871422649582649, + "best_speedup_vs_flydsl": 1.4818459373613553 }, { "signature": "d128_b64_h32kv8_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -114,34 +114,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.263809871673584, - "aoTriton_ms": 0.438018798828125, - "flydsl_ms": 0.3631324768066406, + "triton_ms": 0.26673065185546874, + "aoTriton_ms": 0.43830917358398436, + "flydsl_ms": 0.3602244186401367, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.542783088684082, - "speedup": 0.48603185540132077, + "ms": 0.5445582580566406, + "speedup": 0.4898110494317865, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.9393407440185547, - "speedup": 0.28084576694181274, + "ms": 0.9365765380859375, + "speedup": 0.28479322405468405, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.726483827592365, + "speedup_flydsl_vs_triton": 0.7404568875768858, "best_variant": "prod", - "best_speedup_vs_triton": 0.48603185540132077, - "best_speedup_vs_aoTriton": 0.8069868202601034, - "best_speedup_vs_flydsl": 0.669019511435066 + "best_speedup_vs_triton": 0.4898110494317865, + "best_speedup_vs_aoTriton": 0.8048894073302162, + "best_speedup_vs_flydsl": 0.661498404093009 }, { "signature": "d128_b64_h32kv8_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -150,34 +150,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 0.8871473693847656, - "aoTriton_ms": 1.3932284545898437, - "flydsl_ms": 0.7676717376708985, + "triton_ms": 0.886360092163086, + "aoTriton_ms": 1.3923817443847657, + "flydsl_ms": 0.7604667663574218, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 1.9165232849121094, - "speedup": 0.46289412519475315, + "ms": 1.9168678283691407, + "speedup": 0.4624002130168754, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 3.483743896484375, - "speedup": 0.2546534405930446, + "ms": 3.4786669921875, + "speedup": 0.2547987761270916, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.155633750535553, + "speedup_flydsl_vs_triton": 1.1655474392506113, "best_variant": "prod", - "best_speedup_vs_triton": 0.46289412519475315, - "best_speedup_vs_aoTriton": 0.7269561844398548, - "best_speedup_vs_flydsl": 0.400554349490256 + "best_speedup_vs_triton": 0.4624002130168754, + "best_speedup_vs_aoTriton": 0.726383803712432, + "best_speedup_vs_flydsl": 0.396723631698917 }, { "signature": "d128_b64_h40kv8_q512_k512_ns1_tq512_sw0_sc0_sinks0_bfloat16", @@ -186,34 +186,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.044002838134765625, - "aoTriton_ms": 0.04145962238311768, - "flydsl_ms": 0.20985809326171875, + "triton_ms": 0.044145240783691406, + "aoTriton_ms": 0.04022439956665039, + "flydsl_ms": 0.21304689407348631, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.0542109203338623, - "speedup": 0.8116969397267306, + "ms": 0.05329651832580566, + "speedup": 0.8282950213338177, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.045933260917663574, - "speedup": 0.9579733129255013, + "ms": 0.04588764190673828, + "speedup": 0.9620289679171548, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.20967901428461325, + "speedup_flydsl_vs_triton": 0.2072090324323826, "best_variant": "fallback", - "best_speedup_vs_triton": 0.9579733129255013, - "best_speedup_vs_aoTriton": 0.9026056838732831, - "best_speedup_vs_flydsl": 4.568761047422568 + "best_speedup_vs_triton": 0.9620289679171548, + "best_speedup_vs_aoTriton": 0.8765845856364154, + "best_speedup_vs_flydsl": 4.6427945568979405 }, { "signature": "d128_b64_h40kv8_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -222,34 +222,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.04420683860778809, - "aoTriton_ms": 0.08162883758544921, - "flydsl_ms": 0.22243425369262695, + "triton_ms": 0.043613219261169435, + "aoTriton_ms": 0.08163359642028808, + "flydsl_ms": 0.22130861282348632, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.08035200119018554, - "speedup": 0.5501647495145107, + "ms": 0.07992318153381348, + "speedup": 0.5456892283838549, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.12070201873779297, - "speedup": 0.36624771540748474, + "ms": 0.12036441802978516, + "speedup": 0.3623431241147777, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.19874114653616146, + "speedup_flydsl_vs_triton": 0.19706968791112947, "best_variant": "prod", - "best_speedup_vs_triton": 0.5501647495145107, - "best_speedup_vs_aoTriton": 1.0158905363444717, - "best_speedup_vs_flydsl": 2.768247839480018 + "best_speedup_vs_triton": 0.5456892283838549, + "best_speedup_vs_aoTriton": 1.0214007357271053, + "best_speedup_vs_flydsl": 2.7690165553514188 }, { "signature": "d128_b64_h40kv8_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -258,34 +258,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.10507227897644043, - "aoTriton_ms": 0.18317228317260742, - "flydsl_ms": 0.2665970993041992, + "triton_ms": 0.10779308319091797, + "aoTriton_ms": 0.18331941604614257, + "flydsl_ms": 0.2638418388366699, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.22542627334594725, - "speedup": 0.46610484845833716, + "ms": 0.22508943557739258, + "speedup": 0.4788900150485092, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.3947103881835938, - "speedup": 0.26620094662309113, + "ms": 0.3917671203613281, + "speedup": 0.27514581389959436, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.39412386425310747, + "speedup_flydsl_vs_triton": 0.4085518948253192, "best_variant": "prod", - "best_speedup_vs_triton": 0.46610484845833716, - "best_speedup_vs_aoTriton": 0.8125596029860488, - "best_speedup_vs_flydsl": 1.1826354370640273 + "best_speedup_vs_triton": 0.4788900150485092, + "best_speedup_vs_aoTriton": 0.8144292315447732, + "best_speedup_vs_flydsl": 1.1721644694690838 }, { "signature": "d128_b64_h40kv8_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -294,34 +294,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.33019214630126953, - "aoTriton_ms": 0.5222876739501953, - "flydsl_ms": 0.4055417251586914, + "triton_ms": 0.32686485290527345, + "aoTriton_ms": 0.5218148040771484, + "flydsl_ms": 0.4034936141967773, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.7208232879638672, - "speedup": 0.45807641319965386, + "ms": 0.7182536315917969, + "speedup": 0.4550827709438435, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 1.3519033813476562, - "speedup": 0.2442424146998691, + "ms": 1.3523646545410157, + "speedup": 0.2416987547017852, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.8142001816756659, + "speedup_flydsl_vs_triton": 0.8100868053536697, "best_variant": "prod", - "best_speedup_vs_triton": 0.45807641319965386, - "best_speedup_vs_aoTriton": 0.7245710324169994, - "best_speedup_vs_flydsl": 0.5626090776065771 + "best_speedup_vs_triton": 0.4550827709438435, + "best_speedup_vs_aoTriton": 0.7265049296314732, + "best_speedup_vs_flydsl": 0.5617703781080131 }, { "signature": "d128_b64_h40kv8_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -330,34 +330,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 1.1060104370117188, - "aoTriton_ms": 1.7166990661621093, - "flydsl_ms": 0.9068356323242187, + "triton_ms": 1.102583770751953, + "aoTriton_ms": 1.7152835083007814, + "flydsl_ms": 0.8979777526855469, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 2.540103302001953, - "speedup": 0.4354194713813527, + "ms": 2.5480255126953124, + "speedup": 0.43272085199242577, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 4.979765625, - "speedup": 0.2221009019900849, + "ms": 4.9808740234375, + "speedup": 0.22136351282199584, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.2196371620036757, + "speedup_flydsl_vs_triton": 1.2278519901573273, "best_variant": "prod", - "best_speedup_vs_triton": 0.4354194713813527, - "best_speedup_vs_aoTriton": 0.6758382876826753, - "best_speedup_vs_flydsl": 0.3570073829711991 + "best_speedup_vs_triton": 0.43272085199242577, + "best_speedup_vs_aoTriton": 0.6731814496183545, + "best_speedup_vs_flydsl": 0.35242102098721223 }, { "signature": "d128_b64_h28kv4_q512_k512_ns1_tq512_sw0_sc0_sinks0_bfloat16", @@ -366,34 +366,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.043571639060974124, - "aoTriton_ms": 0.040881199836730955, - "flydsl_ms": 0.23406875610351563, + "triton_ms": 0.043930039405822754, + "aoTriton_ms": 0.04031879901885986, + "flydsl_ms": 0.21134849548339843, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.05508453845977783, - "speedup": 0.7909958089744129, + "ms": 0.05293409824371338, + "speedup": 0.8299005907981066, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.030811500549316407, - "speedup": 1.4141355754885758, + "ms": 0.030913100242614747, + "speedup": 1.4210816469732053, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.1861488896950638, + "speedup_flydsl_vs_triton": 0.2078559362598987, "best_variant": "fallback", - "best_speedup_vs_triton": 1.4141355754885758, - "best_speedup_vs_aoTriton": 1.3268162571731015, - "best_speedup_vs_flydsl": 7.596798336026148 + "best_speedup_vs_triton": 1.4210816469732053, + "best_speedup_vs_aoTriton": 1.3042625522004112, + "best_speedup_vs_flydsl": 6.8368586076671605 }, { "signature": "d128_b64_h28kv4_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -402,34 +402,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.04372446060180664, - "aoTriton_ms": 0.06314464092254639, - "flydsl_ms": 0.2212246322631836, + "triton_ms": 0.04390123844146729, + "aoTriton_ms": 0.06060860157012939, + "flydsl_ms": 0.21886457443237306, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.058229379653930664, - "speedup": 0.7509003335029536, + "ms": 0.05814698219299316, + "speedup": 0.7550045898470975, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.08373605728149414, - "speedup": 0.5221700426474444, + "ms": 0.08384324073791503, + "speedup": 0.5236109441272415, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.19764734222629016, + "speedup_flydsl_vs_triton": 0.200586314872224, "best_variant": "prod", - "best_speedup_vs_triton": 0.7509003335029536, - "best_speedup_vs_aoTriton": 1.084412049343959, - "best_speedup_vs_flydsl": 3.7991926683397224 + "best_speedup_vs_triton": 0.7550045898470975, + "best_speedup_vs_aoTriton": 1.0423344305120767, + "best_speedup_vs_flydsl": 3.76398853694503 }, { "signature": "d128_b64_h28kv4_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -438,34 +438,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.0806496238708496, - "aoTriton_ms": 0.1389558219909668, - "flydsl_ms": 0.24630250930786132, + "triton_ms": 0.08260961532592774, + "aoTriton_ms": 0.13859098434448242, + "flydsl_ms": 0.24371044158935548, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.16475366592407226, - "speedup": 0.48951641481542196, + "ms": 0.16432323455810546, + "speedup": 0.502726321984105, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.2672114944458008, - "speedup": 0.3018194409567511, + "ms": 0.2667170524597168, + "speedup": 0.30972753546908877, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.32744134072155584, + "speedup_flydsl_vs_triton": 0.33896625350637366, "best_variant": "prod", - "best_speedup_vs_triton": 0.48951641481542196, - "best_speedup_vs_aoTriton": 0.843415660656713, - "best_speedup_vs_flydsl": 1.4949743784236726 + "best_speedup_vs_triton": 0.502726321984105, + "best_speedup_vs_aoTriton": 0.8434046756514886, + "best_speedup_vs_flydsl": 1.4831161414558105 }, { "signature": "d128_b64_h28kv4_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -474,34 +474,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.24569210052490234, - "aoTriton_ms": 0.39886962890625, - "flydsl_ms": 0.34984195709228516, + "triton_ms": 0.24535205841064453, + "aoTriton_ms": 0.39729434967041016, + "flydsl_ms": 0.3501715087890625, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.5172180557250976, - "speedup": 0.4750261476863216, + "ms": 0.5166155624389649, + "speedup": 0.4749219269592395, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.9295486450195313, - "speedup": 0.26431333297219745, + "ms": 0.9285749053955078, + "speedup": 0.2642243043453148, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.7022945519942051, + "speedup_flydsl_vs_triton": 0.7006625389344298, "best_variant": "prod", - "best_speedup_vs_triton": 0.4750261476863216, - "best_speedup_vs_aoTriton": 0.7711827235943403, - "best_speedup_vs_flydsl": 0.676391617074998 + "best_speedup_vs_triton": 0.4749219269592395, + "best_speedup_vs_aoTriton": 0.7690328719382087, + "best_speedup_vs_flydsl": 0.6778183513014733 }, { "signature": "d128_b64_h28kv4_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -510,34 +510,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 0.7988545227050782, - "aoTriton_ms": 1.2386493682861328, - "flydsl_ms": 0.7192121124267579, + "triton_ms": 0.7977047729492187, + "aoTriton_ms": 1.2378363800048828, + "flydsl_ms": 0.7142520141601563, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 1.7971022033691406, - "speedup": 0.4445237011047092, + "ms": 1.7844523620605468, + "speedup": 0.4470305791901843, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 3.3761279296875, - "speedup": 0.23661855810630417, + "ms": 3.368626708984375, + "speedup": 0.23680414657453183, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h28kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.1107356354297089, + "speedup_flydsl_vs_triton": 1.116839374806929, "best_variant": "prod", - "best_speedup_vs_triton": 0.4445237011047092, - "best_speedup_vs_aoTriton": 0.6892481495843469, - "best_speedup_vs_flydsl": 0.4002065720460448 + "best_speedup_vs_triton": 0.4470305791901843, + "best_speedup_vs_aoTriton": 0.6936785796710906, + "best_speedup_vs_flydsl": 0.4002639853805868 }, { "signature": "d128_b64_h64kv8_q512_k512_ns1_tq512_sw0_sc0_sinks0_bfloat16", @@ -546,34 +546,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.04379563808441162, - "aoTriton_ms": 0.04252284049987793, - "flydsl_ms": 0.2295951271057129, + "triton_ms": 0.04382123947143555, + "aoTriton_ms": 0.04216201782226563, + "flydsl_ms": 0.20882768630981446, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.05434214115142822, - "speedup": 0.8059240426756829, + "ms": 0.05297011852264404, + "speedup": 0.8272822620304792, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.045822858810424805, - "speedup": 0.9557596191368142, + "ms": 0.04572524070739746, + "speedup": 0.9583599516042814, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.19075160103135255, + "speedup_flydsl_vs_triton": 0.20984401180609183, "best_variant": "fallback", - "best_speedup_vs_triton": 0.9557596191368142, - "best_speedup_vs_aoTriton": 0.9279831421212831, - "best_speedup_vs_flydsl": 5.01049330107443 + "best_speedup_vs_triton": 0.9583599516042814, + "best_speedup_vs_aoTriton": 0.9220731738093316, + "best_speedup_vs_flydsl": 4.567011197297648 }, { "signature": "d128_b64_h64kv8_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -582,34 +582,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.04899809837341309, - "aoTriton_ms": 0.11047634124755859, - "flydsl_ms": 0.22387027740478516, + "triton_ms": 0.04941810131072998, + "aoTriton_ms": 0.11047069549560547, + "flydsl_ms": 0.22591028213500977, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.09331294059753419, - "speedup": 0.5250943551842998, + "ms": 0.09379371643066406, + "speedup": 0.5268807249711845, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.13965262413024904, - "speedup": 0.3508569830217748, + "ms": 0.13936539649963378, + "speedup": 0.35459376970136086, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.21886826130482015, + "speedup_flydsl_vs_triton": 0.21875100523842672, "best_variant": "prod", - "best_speedup_vs_triton": 0.5250943551842998, - "best_speedup_vs_aoTriton": 1.18393376674358, - "best_speedup_vs_flydsl": 2.3991343105385 + "best_speedup_vs_triton": 0.5268807249711845, + "best_speedup_vs_aoTriton": 1.177804864756262, + "best_speedup_vs_flydsl": 2.4085865315083383 }, { "signature": "d128_b64_h64kv8_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -618,34 +618,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.1500327205657959, - "aoTriton_ms": 0.24794811248779297, - "flydsl_ms": 0.28379167556762697, + "triton_ms": 0.15025431632995606, + "aoTriton_ms": 0.2465560531616211, + "flydsl_ms": 0.2817244148254395, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.2901189422607422, - "speedup": 0.5171421052230196, + "ms": 0.2902532958984375, + "speedup": 0.5176661848571447, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.48578174591064455, - "speedup": 0.30884799980399663, + "ms": 0.4846656799316406, + "speedup": 0.3100164145130899, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.5286720276967511, + "speedup_flydsl_vs_triton": 0.5333379303425151, "best_variant": "prod", - "best_speedup_vs_triton": 0.5171421052230196, - "best_speedup_vs_aoTriton": 0.8546429631780178, - "best_speedup_vs_flydsl": 0.978190783946025 + "best_speedup_vs_triton": 0.5176661848571447, + "best_speedup_vs_aoTriton": 0.8494513469638377, + "best_speedup_vs_flydsl": 0.9706157304894744 }, { "signature": "d128_b64_h64kv8_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -654,34 +654,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.47394485473632814, - "aoTriton_ms": 0.7778615570068359, - "flydsl_ms": 0.5009763336181641, + "triton_ms": 0.4728183364868164, + "aoTriton_ms": 0.7772989654541016, + "flydsl_ms": 0.49553455352783204, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.9863083648681641, - "speedup": 0.48052401421099017, + "ms": 0.9807850646972657, + "speedup": 0.4820815013458214, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 1.781826934814453, - "speedup": 0.2659881526516948, + "ms": 1.7736672973632812, + "speedup": 0.2665766782697658, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.9460424034672287, + "speedup_flydsl_vs_triton": 0.9541581573287002, "best_variant": "prod", - "best_speedup_vs_triton": 0.48052401421099017, - "best_speedup_vs_aoTriton": 0.788659596444576, - "best_speedup_vs_flydsl": 0.5079307359267176 + "best_speedup_vs_triton": 0.4820815013458214, + "best_speedup_vs_aoTriton": 0.7925273267635115, + "best_speedup_vs_flydsl": 0.5052427604826817 }, { "signature": "d128_b64_h64kv8_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -690,34 +690,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 1.7028677368164062, - "aoTriton_ms": 2.63884521484375, - "flydsl_ms": 1.3335743713378907, + "triton_ms": 1.6922450256347656, + "aoTriton_ms": 2.63490966796875, + "flydsl_ms": 1.3214260864257812, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 3.6593307495117187, - "speedup": 0.4653495006002471, + "ms": 3.65565185546875, + "speedup": 0.46291197645181004, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 6.8523486328125, - "speedup": 0.24850862500810553, + "ms": 6.8215673828125, + "speedup": 0.24807275669496665, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.2769199629324213, + "speedup_flydsl_vs_triton": 1.2806202654981502, "best_variant": "prod", - "best_speedup_vs_triton": 0.4653495006002471, - "best_speedup_vs_aoTriton": 0.7211278224019141, - "best_speedup_vs_flydsl": 0.36443122052190435 + "best_speedup_vs_triton": 0.46291197645181004, + "best_speedup_vs_aoTriton": 0.7207769700572009, + "best_speedup_vs_flydsl": 0.36147481726110375 }, { "signature": "d128_b64_h128kv8_q512_k512_ns1_tq512_sw0_sc0_sinks0_bfloat16", @@ -726,34 +726,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.0437308406829834, - "aoTriton_ms": 0.07787360191345215, - "flydsl_ms": 0.23373918533325194, + "triton_ms": 0.04345004081726074, + "aoTriton_ms": 0.07788477897644043, + "flydsl_ms": 0.21163089752197264, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.05625016212463379, - "speedup": 0.7774349269623213, + "ms": 0.05568294048309326, + "speedup": 0.7803115359982339, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.08354244232177735, - "speedup": 0.5234565744983481, + "ms": 0.08225842475891114, + "speedup": 0.5282138692128766, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.18709246641993071, + "speedup_flydsl_vs_triton": 0.2053104784132455, "best_variant": "prod", - "best_speedup_vs_triton": 0.7774349269623213, - "best_speedup_vs_aoTriton": 1.3844155993880904, - "best_speedup_vs_flydsl": 4.15535131819451 + "best_speedup_vs_triton": 0.7803115359982339, + "best_speedup_vs_aoTriton": 1.3987188589670154, + "best_speedup_vs_flydsl": 3.8006415553113455 }, { "signature": "d128_b64_h128kv8_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -762,34 +762,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.08492566108703613, - "aoTriton_ms": 0.1791330337524414, - "flydsl_ms": 0.24456247329711914, + "triton_ms": 0.08457045555114746, + "aoTriton_ms": 0.18007461547851564, + "flydsl_ms": 0.24390565872192382, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.15975842475891114, - "speedup": 0.5315879974104406, + "ms": 0.15820158004760743, + "speedup": 0.5345740259085767, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.26060985565185546, - "speedup": 0.3258727912442688, + "ms": 0.2635706520080566, + "speedup": 0.3208644623626851, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.3472554883097697, + "speedup_flydsl_vs_triton": 0.3467342906035895, "best_variant": "prod", - "best_speedup_vs_triton": 0.5315879974104406, - "best_speedup_vs_aoTriton": 1.1212744118049998, - "best_speedup_vs_flydsl": 1.5308267696441324 + "best_speedup_vs_triton": 0.5345740259085767, + "best_speedup_vs_aoTriton": 1.1382605371218542, + "best_speedup_vs_flydsl": 1.5417397136521998 }, { "signature": "d128_b64_h128kv8_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -798,34 +798,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.25996583938598633, - "aoTriton_ms": 0.4551030349731445, - "flydsl_ms": 0.38356952667236327, + "triton_ms": 0.25761377334594726, + "aoTriton_ms": 0.4580598068237305, + "flydsl_ms": 0.36473087310791014, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.5086603546142578, - "speedup": 0.5110794207327819, + "ms": 0.5112283325195313, + "speedup": 0.5039113776740949, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.9293822479248047, - "speedup": 0.2797189638240431, + "ms": 0.9221965026855469, + "speedup": 0.27934802679878423, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.6777541522688362, + "speedup_flydsl_vs_triton": 0.7063119476308468, "best_variant": "prod", - "best_speedup_vs_triton": 0.5110794207327819, - "best_speedup_vs_aoTriton": 0.8947090742274804, - "best_speedup_vs_flydsl": 0.7540778894852989 + "best_speedup_vs_triton": 0.5039113776740949, + "best_speedup_vs_aoTriton": 0.8959984759964972, + "best_speedup_vs_flydsl": 0.7134402573315433 }, { "signature": "d128_b64_h128kv8_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -834,34 +834,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.8741985321044922, - "aoTriton_ms": 1.6216500854492188, - "flydsl_ms": 0.7871688079833984, + "triton_ms": 0.8720351409912109, + "aoTriton_ms": 1.6252706909179688, + "flydsl_ms": 0.7837214660644531, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 1.8524493408203124, - "speedup": 0.4719149467900561, + "ms": 1.8211102294921875, + "speedup": 0.4788480822681316, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 3.448607177734375, - "speedup": 0.2534932182907572, + "ms": 3.433183288574219, + "speedup": 0.2540019182469463, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.1105604328302212, + "speedup_flydsl_vs_triton": 1.1126850274629263, "best_variant": "prod", - "best_speedup_vs_triton": 0.4719149467900561, - "best_speedup_vs_aoTriton": 0.8754086007723754, - "best_speedup_vs_flydsl": 0.42493405386989946 + "best_speedup_vs_triton": 0.4788480822681316, + "best_speedup_vs_aoTriton": 0.8924614581793722, + "best_speedup_vs_flydsl": 0.4303536674345035 }, { "signature": "d128_b64_h128kv8_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -870,34 +870,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 3.2899957275390626, - "aoTriton_ms": 5.07345458984375, - "flydsl_ms": 2.4707867431640627, + "triton_ms": 3.2916650390625, + "aoTriton_ms": 5.080816650390625, + "flydsl_ms": 2.4647311401367187, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 6.960784912109375, - "speedup": 0.47264723290265725, + "ms": 6.964030151367187, + "speedup": 0.4726666840200679, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 13.448505859375, - "speedup": 0.2446365240823831, + "ms": 13.340902099609375, + "speedup": 0.24673481706749656, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h128kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.3315579487551927, + "speedup_flydsl_vs_triton": 1.3355067355865482, "best_variant": "prod", - "best_speedup_vs_triton": 0.47264723290265725, - "best_speedup_vs_aoTriton": 0.728862427715254, - "best_speedup_vs_flydsl": 0.35495806498283583 + "best_speedup_vs_triton": 0.4726666840200679, + "best_speedup_vs_aoTriton": 0.7295799328773946, + "best_speedup_vs_flydsl": 0.353923100067687 }, { "signature": "d128_b64_h64kv4_q512_k512_ns1_tq512_sw0_sc0_sinks0_bfloat16", @@ -906,34 +906,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.043572459220886234, - "aoTriton_ms": 0.042516441345214845, - "flydsl_ms": 0.23091592788696289, + "triton_ms": 0.04352283954620361, + "aoTriton_ms": 0.04244524002075195, + "flydsl_ms": 0.21005647659301757, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.054987740516662595, - "speedup": 0.7924031577126313, + "ms": 0.053204498291015624, + "speedup": 0.8180293197793972, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.04578125953674316, - "speedup": 0.9517531772125188, + "ms": 0.04603643894195557, + "speedup": 0.9453997864838939, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.18869403951301125, + "speedup_flydsl_vs_triton": 0.20719589441904568, "best_variant": "fallback", - "best_speedup_vs_triton": 0.9517531772125188, - "best_speedup_vs_aoTriton": 0.9286865799551007, - "best_speedup_vs_flydsl": 5.043896350244235 + "best_speedup_vs_triton": 0.9453997864838939, + "best_speedup_vs_aoTriton": 0.9219922521433178, + "best_speedup_vs_flydsl": 4.562830692831487 }, { "signature": "d128_b64_h64kv4_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -942,34 +942,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.04681325912475586, - "aoTriton_ms": 0.11070431709289551, - "flydsl_ms": 0.22523910522460938, + "triton_ms": 0.04762685775756836, + "aoTriton_ms": 0.11055312156677247, + "flydsl_ms": 0.2218622398376465, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.09327374458312988, - "speedup": 0.5018910662800046, + "ms": 0.09276412010192871, + "speedup": 0.5134189566530274, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.1385646152496338, - "speedup": 0.33784425439653926, + "ms": 0.137773380279541, + "speedup": 0.345689839800213, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.20783806203666758, + "speedup_flydsl_vs_triton": 0.2146686060341794, "best_variant": "prod", - "best_speedup_vs_triton": 0.5018910662800046, - "best_speedup_vs_aoTriton": 1.1868754448282142, - "best_speedup_vs_flydsl": 2.4148178700370053 + "best_speedup_vs_triton": 0.5134189566530274, + "best_speedup_vs_aoTriton": 1.1917659699170036, + "best_speedup_vs_flydsl": 2.3916816070034996 }, { "signature": "d128_b64_h64kv4_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -978,34 +978,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.1409382152557373, - "aoTriton_ms": 0.24619770050048828, - "flydsl_ms": 0.28387807846069335, + "triton_ms": 0.14402706146240235, + "aoTriton_ms": 0.24974409103393555, + "flydsl_ms": 0.28221883773803713, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.28835172653198243, - "speedup": 0.48877187922821463, + "ms": 0.28485004425048827, + "speedup": 0.5056241498623375, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.48250972747802734, - "speedup": 0.2920940392070238, + "ms": 0.48078319549560544, + "speedup": 0.29956758641269693, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.49647445840116905, + "speedup_flydsl_vs_triton": 0.5103382276561284, "best_variant": "prod", - "best_speedup_vs_triton": 0.48877187922821463, - "best_speedup_vs_aoTriton": 0.8538103914324278, - "best_speedup_vs_flydsl": 0.9844854472518898 + "best_speedup_vs_triton": 0.5056241498623375, + "best_speedup_vs_aoTriton": 0.8767563708514589, + "best_speedup_vs_flydsl": 0.9907628362165978 }, { "signature": "d128_b64_h64kv4_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -1014,34 +1014,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.4675344085693359, - "aoTriton_ms": 0.7772415161132813, - "flydsl_ms": 0.5011907196044922, + "triton_ms": 0.4639966583251953, + "aoTriton_ms": 0.7759101867675782, + "flydsl_ms": 0.49666576385498046, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.979204330444336, - "speedup": 0.4774635834761696, + "ms": 0.9803058624267578, + "speedup": 0.47331825311802844, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 1.7834877014160155, - "speedup": 0.2621461354615078, + "ms": 1.7833779907226563, + "speedup": 0.2601785267839801, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.9328472980072022, + "speedup_flydsl_vs_triton": 0.9342231578915029, "best_variant": "prod", - "best_speedup_vs_triton": 0.4774635834761696, - "best_speedup_vs_aoTriton": 0.7937480380224529, - "best_speedup_vs_flydsl": 0.5118346641472323 + "best_speedup_vs_triton": 0.47331825311802844, + "best_speedup_vs_aoTriton": 0.7914980584190368, + "best_speedup_vs_flydsl": 0.5066436740727828 }, { "signature": "d128_b64_h64kv4_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -1050,34 +1050,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 1.6826394653320313, - "aoTriton_ms": 2.6346820068359373, - "flydsl_ms": 1.3292518615722657, + "triton_ms": 1.677855224609375, + "aoTriton_ms": 2.6302423095703125, + "flydsl_ms": 1.320194854736328, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 3.640749816894531, - "speedup": 0.46216838562317936, + "ms": 3.6115850830078124, + "speedup": 0.4645758541044859, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 6.788587646484375, - "speedup": 0.24786296545842265, + "ms": 6.752616577148437, + "speedup": 0.24847482534213672, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h64kv4_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.2658545110794668, + "speedup_flydsl_vs_triton": 1.2709148339655358, "best_variant": "prod", - "best_speedup_vs_triton": 0.46216838562317936, - "best_speedup_vs_aoTriton": 0.7236646678137459, - "best_speedup_vs_flydsl": 0.365103873769081 + "best_speedup_vs_triton": 0.4645758541044859, + "best_speedup_vs_aoTriton": 0.7282792040385174, + "best_speedup_vs_flydsl": 0.3655444422305673 }, { "signature": "d128_b64_h32kv32_q512_k512_ns1_tq512_sw0_sc0_sinks0_bfloat16", @@ -1086,34 +1086,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.04412444114685059, - "aoTriton_ms": 0.04076759815216065, - "flydsl_ms": 0.2098573112487793, + "triton_ms": 0.04379404067993164, + "aoTriton_ms": 0.04099720001220703, + "flydsl_ms": 0.21101810455322265, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.05419174194335938, - "speedup": 0.8142281381722141, + "ms": 0.05316609859466553, + "speedup": 0.8237211651322062, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.036842761039733884, - "speedup": 1.197642084947532, + "ms": 0.036573159694671634, + "speedup": 1.19743661869915, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.21025925131835144, + "speedup_flydsl_vs_triton": 0.2075368877597229, "best_variant": "fallback", - "best_speedup_vs_triton": 1.197642084947532, - "best_speedup_vs_aoTriton": 1.1065293968656131, - "best_speedup_vs_flydsl": 5.696025632347534 + "best_speedup_vs_triton": 1.19743661869915, + "best_speedup_vs_aoTriton": 1.1209641265471504, + "best_speedup_vs_flydsl": 5.769753182795579 }, { "signature": "d128_b64_h32kv32_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -1122,34 +1122,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.04409403800964355, - "aoTriton_ms": 0.062225418090820314, - "flydsl_ms": 0.22093664169311522, + "triton_ms": 0.044235639572143555, + "aoTriton_ms": 0.06207181930541992, + "flydsl_ms": 0.2188134002685547, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.05861658096313477, - "speedup": 0.7522451375554511, + "ms": 0.0583909797668457, + "speedup": 0.7575765940009193, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.10173303604125977, - "speedup": 0.4334289010283776, + "ms": 0.10131540298461914, + "speedup": 0.4366131730123903, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.19957775076028778, + "speedup_flydsl_vs_triton": 0.20216147419605993, "best_variant": "prod", - "best_speedup_vs_triton": 0.7522451375554511, - "best_speedup_vs_aoTriton": 1.0615668308930406, - "best_speedup_vs_flydsl": 3.7691833618215815 + "best_speedup_vs_triton": 0.7575765940009193, + "best_speedup_vs_aoTriton": 1.063037810861742, + "best_speedup_vs_flydsl": 3.747383605177945 }, { "signature": "d128_b64_h32kv32_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -1158,34 +1158,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.09208494186401367, - "aoTriton_ms": 0.14362706184387208, - "flydsl_ms": 0.2510353660583496, + "triton_ms": 0.0914377212524414, + "aoTriton_ms": 0.14257424354553222, + "flydsl_ms": 0.2466640853881836, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.17913301467895507, - "speedup": 0.5140590193775821, + "ms": 0.1812649917602539, + "speedup": 0.5044422553108295, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.46751754760742187, - "speedup": 0.19696574456995167, + "ms": 0.46714229583740235, + "speedup": 0.1957384764069148, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.3668205930896997, + "speedup_flydsl_vs_triton": 0.3706973437521023, "best_variant": "prod", - "best_speedup_vs_triton": 0.5140590193775821, - "best_speedup_vs_aoTriton": 0.801790011189633, - "best_speedup_vs_flydsl": 1.4013908408132305 + "best_speedup_vs_triton": 0.5044422553108295, + "best_speedup_vs_aoTriton": 0.786551457956674, + "best_speedup_vs_flydsl": 1.3607927432255003 }, { "signature": "d128_b64_h32kv32_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -1194,34 +1194,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.2745643997192383, - "aoTriton_ms": 0.43816768646240234, - "flydsl_ms": 0.36884136199951173, + "triton_ms": 0.2736651420593262, + "aoTriton_ms": 0.4387900161743164, + "flydsl_ms": 0.36355484008789063, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.5957004928588867, - "speedup": 0.4609101436219205, + "ms": 0.5921171188354493, + "speedup": 0.46218076349077547, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 1.740249786376953, - "speedup": 0.15777298286061406, + "ms": 1.7290013122558594, + "speedup": 0.15827931426047925, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.7443969901607774, + "speedup_flydsl_vs_triton": 0.7527478990326926, "best_variant": "prod", - "best_speedup_vs_triton": 0.4609101436219205, - "best_speedup_vs_aoTriton": 0.7355503171728922, - "best_speedup_vs_flydsl": 0.6191724976243812 + "best_speedup_vs_triton": 0.46218076349077547, + "best_speedup_vs_aoTriton": 0.741052744830803, + "best_speedup_vs_flydsl": 0.6139914360235266 }, { "signature": "d128_b64_h32kv32_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -1230,34 +1230,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 0.9736331176757812, - "aoTriton_ms": 1.3939646911621093, - "flydsl_ms": 0.8177291107177734, + "triton_ms": 0.9738137817382813, + "aoTriton_ms": 1.3924674987792969, + "flydsl_ms": 0.8154657745361328, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 2.2362603759765625, - "speedup": 0.43538450537120527, + "ms": 2.2351527404785156, + "speedup": 0.435681089753983, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 6.579153442382813, - "speedup": 0.14798759843533218, + "ms": 6.578958740234375, + "speedup": 0.14801943897030567, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h32kv32_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.1906548328958972, + "speedup_flydsl_vs_triton": 1.194181058416857, "best_variant": "prod", - "best_speedup_vs_triton": 0.43538450537120527, - "best_speedup_vs_aoTriton": 0.6233463268128483, - "best_speedup_vs_flydsl": 0.3656681124892157 + "best_speedup_vs_triton": 0.435681089753983, + "best_speedup_vs_aoTriton": 0.6229853886769227, + "best_speedup_vs_flydsl": 0.36483671105248616 }, { "signature": "d128_b64_h40kv40_q512_k512_ns1_tq512_sw0_sc0_sinks0_bfloat16", @@ -1266,34 +1266,34 @@ "num_seqs": 1, "total_q": 512, "max_seqlen_k": 512, - "triton_ms": 0.043777241706848144, - "aoTriton_ms": 0.04000842094421387, - "flydsl_ms": 0.2411896324157715, + "triton_ms": 0.04303324222564697, + "aoTriton_ms": 0.04191162109375, + "flydsl_ms": 0.21084770202636718, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.054942140579223635, - "speedup": 0.796788061865258, + "ms": 0.05351652145385742, + "speedup": 0.804111348357175, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.03990520000457764, - "speedup": 1.0970310060299493, + "ms": 0.03968597888946533, + "speedup": 1.0843437261684925, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.18150548706580943, + "speedup_flydsl_vs_triton": 0.20409633025199167, "best_variant": "fallback", - "best_speedup_vs_triton": 1.0970310060299493, - "best_speedup_vs_aoTriton": 1.0025866538602586, - "best_speedup_vs_flydsl": 6.044065244331665 + "best_speedup_vs_triton": 1.0843437261684925, + "best_speedup_vs_aoTriton": 1.0560813230910493, + "best_speedup_vs_flydsl": 5.312901632428597 }, { "signature": "d128_b64_h40kv40_q1024_k1024_ns1_tq1024_sw0_sc0_sinks0_bfloat16", @@ -1302,34 +1302,34 @@ "num_seqs": 1, "total_q": 1024, "max_seqlen_k": 1024, - "triton_ms": 0.04385245800018311, - "aoTriton_ms": 0.08130962371826173, - "flydsl_ms": 0.22213586807250976, + "triton_ms": 0.04425084114074707, + "aoTriton_ms": 0.08166241645812988, + "flydsl_ms": 0.2209870147705078, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.0785359811782837, - "speedup": 0.5583741024465475, + "ms": 0.07835837841033935, + "speedup": 0.5647237990176197, "max_abs": 0.015625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.11019071578979492, - "speedup": 0.3979687189239986, + "ms": 0.10902667999267578, + "speedup": 0.40587167419680914, "max_abs": 0.015625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.1974127743560475, + "speedup_flydsl_vs_triton": 0.20024181595783358, "best_variant": "prod", - "best_speedup_vs_triton": 0.5583741024465475, - "best_speedup_vs_aoTriton": 1.0353168381977886, - "best_speedup_vs_flydsl": 2.828459831274553 + "best_speedup_vs_triton": 0.5647237990176197, + "best_speedup_vs_aoTriton": 1.0421657277092728, + "best_speedup_vs_flydsl": 2.8202091372190607 }, { "signature": "d128_b64_h40kv40_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -1338,34 +1338,34 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.11193553924560547, - "aoTriton_ms": 0.1822602653503418, - "flydsl_ms": 0.2665699005126953, + "triton_ms": 0.11295233726501465, + "aoTriton_ms": 0.1828402328491211, + "flydsl_ms": 0.26466745376586914, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.24078643798828125, - "speedup": 0.4648747669544961, + "ms": 0.23846317291259767, + "speedup": 0.4736678451662401, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 0.3662621307373047, - "speedup": 0.305615923274059, + "ms": 0.36528209686279295, + "speedup": 0.30921947238887465, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.4199106464395239, + "speedup_flydsl_vs_triton": 0.4267707859725543, "best_variant": "prod", - "best_speedup_vs_triton": 0.4648747669544961, - "best_speedup_vs_aoTriton": 0.7569374208659216, - "best_speedup_vs_flydsl": 1.107080210745378 + "best_speedup_vs_triton": 0.4736678451662401, + "best_speedup_vs_aoTriton": 0.7667441081820057, + "best_speedup_vs_flydsl": 1.1098881665173346 }, { "signature": "d128_b64_h40kv40_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -1374,34 +1374,34 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.3363090133666992, - "aoTriton_ms": 0.5225525283813477, - "flydsl_ms": 0.4169034576416016, + "triton_ms": 0.3392945861816406, + "aoTriton_ms": 0.5222820663452148, + "flydsl_ms": 0.4198842239379883, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.7758271026611329, - "speedup": 0.4334844867021781, + "ms": 0.7759901428222656, + "speedup": 0.4372408455442885, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 1.28006103515625, - "speedup": 0.2627288888030623, + "ms": 1.2757288360595702, + "speedup": 0.26596136780104673, "max_abs": 0.0078125, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.8066831953593755, + "speedup_flydsl_vs_triton": 0.8080670023738501, "best_variant": "prod", - "best_speedup_vs_triton": 0.4334844867021781, - "best_speedup_vs_aoTriton": 0.6735425026903051, - "best_speedup_vs_flydsl": 0.5373664521535766 + "best_speedup_vs_triton": 0.4372408455442885, + "best_speedup_vs_aoTriton": 0.6730524494108675, + "best_speedup_vs_flydsl": 0.5410947907287521 }, { "signature": "d128_b64_h40kv40_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -1410,34 +1410,34 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 1.235236587524414, - "aoTriton_ms": 1.7191558837890626, - "flydsl_ms": 0.9735499572753906, + "triton_ms": 1.2324427032470704, + "aoTriton_ms": 1.7143052673339845, + "flydsl_ms": 0.9693681335449219, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 2.8946142578125, - "speedup": 0.4267361649969552, + "ms": 2.936159973144531, + "speedup": 0.4197464424689247, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w2_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_ksb" }, "fallback": { - "ms": 4.756542663574219, - "speedup": 0.25969210724922154, + "ms": 4.775755310058594, + "speedup": 0.25806236359122625, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d128_b64_t128_h40kv40_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.2687963039733352, + "speedup_flydsl_vs_triton": 1.2713876809010631, "best_variant": "prod", - "best_speedup_vs_triton": 0.4267361649969552, - "best_speedup_vs_aoTriton": 0.593915365112674, - "best_speedup_vs_flydsl": 0.336331500699204 + "best_speedup_vs_triton": 0.4197464424689247, + "best_speedup_vs_aoTriton": 0.5838596272048555, + "best_speedup_vs_flydsl": 0.3301482693079425 }, { "signature": "d64_b32_h64kv8_q2048_k2048_ns1_tq2048_sw0_sc0_sinks0_bfloat16", @@ -1446,9 +1446,9 @@ "num_seqs": 1, "total_q": 2048, "max_seqlen_k": 2048, - "triton_ms": 0.09678019523620605, - "aoTriton_ms": 0.1319981575012207, - "flydsl_ms": 0.17625856399536133, + "triton_ms": 0.09536895751953126, + "aoTriton_ms": 0.1331269359588623, + "flydsl_ms": 0.14998629570007324, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", @@ -1458,18 +1458,18 @@ "error": "ValueError('use_fast_paged_kv_desc is restricted to bf16 h64kv8 HD=64 BS=32 T=64 num_warps=4')" }, "fallback": { - "ms": 0.2011308479309082, - "speedup": 0.48118026763080946, + "ms": 0.20134199142456055, + "speedup": 0.4736665056542087, "max_abs": 0.001953125, "ok": true, "kernel": "rocke_uattn2d_tiled_d64_b32_t64_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.5490808108407887, + "speedup_flydsl_vs_triton": 0.6358511427620029, "best_variant": "fallback", - "best_speedup_vs_triton": 0.48118026763080946, - "best_speedup_vs_aoTriton": 0.6562800229757112, - "best_speedup_vs_flydsl": 0.8763377960595536 + "best_speedup_vs_triton": 0.4736665056542087, + "best_speedup_vs_aoTriton": 0.661198069100964, + "best_speedup_vs_flydsl": 0.7449330099442797 }, { "signature": "d64_b32_h64kv8_q4096_k4096_ns1_tq4096_sw0_sc0_sinks0_bfloat16", @@ -1478,9 +1478,9 @@ "num_seqs": 1, "total_q": 4096, "max_seqlen_k": 4096, - "triton_ms": 0.3134895706176758, - "aoTriton_ms": 0.3490867614746094, - "flydsl_ms": 0.23817441940307618, + "triton_ms": 0.30757747650146483, + "aoTriton_ms": 0.34462265014648436, + "flydsl_ms": 0.23331274032592775, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", @@ -1490,18 +1490,18 @@ "error": "ValueError('use_fast_paged_kv_desc is restricted to bf16 h64kv8 HD=64 BS=32 T=64 num_warps=4')" }, "fallback": { - "ms": 0.6903694152832032, - "speedup": 0.4540895985217946, + "ms": 0.688012466430664, + "speedup": 0.4470521851110406, "max_abs": 0.001953125, "ok": true, "kernel": "rocke_uattn2d_tiled_d64_b32_t64_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.316218473013844, + "speedup_flydsl_vs_triton": 1.318305533044584, "best_variant": "fallback", - "best_speedup_vs_triton": 0.4540895985217946, - "best_speedup_vs_aoTriton": 0.5056521244229903, - "best_speedup_vs_flydsl": 0.3449956126827726 + "best_speedup_vs_triton": 0.4470521851110406, + "best_speedup_vs_aoTriton": 0.500895938607552, + "best_speedup_vs_flydsl": 0.3391112104935098 }, { "signature": "d64_b32_h64kv8_q8192_k8192_ns1_tq8192_sw0_sc0_sinks0_bfloat16", @@ -1510,9 +1510,9 @@ "num_seqs": 1, "total_q": 8192, "max_seqlen_k": 8192, - "triton_ms": 1.0929367065429687, - "aoTriton_ms": 1.5019953918457032, - "flydsl_ms": 0.786251220703125, + "triton_ms": 1.0870700836181642, + "aoTriton_ms": 1.5029534912109375, + "flydsl_ms": 0.7879878997802734, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", @@ -1522,18 +1522,18 @@ "error": "ValueError('use_fast_paged_kv_desc is restricted to bf16 h64kv8 HD=64 BS=32 T=64 num_warps=4')" }, "fallback": { - "ms": 2.6061056518554686, - "speedup": 0.4193754408094817, + "ms": 2.5890548706054686, + "speedup": 0.4198713962998958, "max_abs": 0.001953125, "ok": true, "kernel": "rocke_uattn2d_tiled_d64_b32_t64_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 1.390060425681225, + "speedup_flydsl_vs_triton": 1.3795517468241434, "best_variant": "fallback", - "best_speedup_vs_triton": 0.4193754408094817, - "best_speedup_vs_aoTriton": 0.5763371069689088, - "best_speedup_vs_flydsl": 0.3016958349878632 + "best_speedup_vs_triton": 0.4198713962998958, + "best_speedup_vs_aoTriton": 0.5805027573090644, + "best_speedup_vs_flydsl": 0.3043534954498654 }, { "signature": "d64_b32_h64kv8_q1024_k1024_ns2_tq2048_sw0_sc0_sinks0_bfloat16", @@ -1542,33 +1542,33 @@ "num_seqs": 2, "total_q": 2048, "max_seqlen_k": 1024, - "triton_ms": 0.055994181632995604, - "aoTriton_ms": 0.09300733566284179, - "flydsl_ms": 0.14775670051574707, + "triton_ms": 0.05494696140289307, + "aoTriton_ms": 0.09310653686523437, + "flydsl_ms": 0.15140392303466796, "flydsl_ok": true, "flydsl_max_abs": 0.015625, "flydsl_skip_reason": "", "flydsl_error": null, "variants": { "prod": { - "ms": 0.07463913917541504, - "speedup": 0.7501986524978468, + "ms": 0.0730239200592041, + "speedup": 0.7524515440741177, "max_abs": 0.00390625, "ok": true, "kernel": "rocke_uattn2d_tiled_d64_b32_t64_h64kv8_bf16_w4_mw32_mfma32_stqk_s1_mask1_hlpv_skipqreg_mlim_fastkvdesc" }, "fallback": { - "ms": 0.11481156349182128, - "speedup": 0.4877050702038772, + "ms": 0.1151971435546875, + "speedup": 0.4769819780887893, "max_abs": 0.001953125, "ok": true, "kernel": "rocke_uattn2d_tiled_d64_b32_t64_h64kv8_bf16_w4" } }, - "speedup_flydsl_vs_triton": 0.3789620466452421, + "speedup_flydsl_vs_triton": 0.36291636505555736, "best_variant": "prod", - "best_speedup_vs_triton": 0.7501986524978468, - "best_speedup_vs_aoTriton": 1.2460933591993644, - "best_speedup_vs_flydsl": 1.9796142097578722 + "best_speedup_vs_triton": 0.7524515440741177, + "best_speedup_vs_aoTriton": 1.275014225335319, + "best_speedup_vs_flydsl": 2.0733469651029046 } ]