Merged
test(gmm): 补充五个算子的 TTK 用例和 golden #15761
test(gmm): 补充五个算子的 TTK 用例和 golden #15761
Merged
zhoushaolongAdd on 17 days ago
Total: 35 files changed+4388-582
@@ -0,0 +1,87 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""Importable TorchAir models for the GMM family TestSpecs."""
13+ 
14+import torch
15+ 
16+ 
17+class GroupedMatmulGraph(torch.nn.Module):
18+ preserve_input_views = True
19+ 
20+ def __init__(self):
21+ super().__init__()
22+ import torch_npu
23+ 
24+ self._api = torch_npu.npu_grouped_matmul
25+ 
26+ def forward(self, **kwargs):
27+ return self._api(**kwargs)
28+ 
29+ 
30+class InplaceGraph(torch.nn.Module):
31+ """Trace the documented x1 and MX scale transposes inside the graph."""
32+ 
33+ def __init__(self):
34+ super().__init__()
35+ import torch_npu
36+ 
37+ self._api = torch_npu.npu_add_quant_gmm_
38+ 
39+ def forward(self, input, x1, x2, x2_scale, group_list, x1_scale=None, **kwargs):
40+ if kwargs.get("x1_scale_dtype") is not None:
41+ x1_scale = x1_scale.transpose(0, 1)
42+ return self._api(
43+ input,
44+ x1.transpose(0, 1),
45+ x2,
46+ x2_scale,
47+ group_list,
48+ x1_scale=x1_scale,
49+ **kwargs,
50+ )
51+ 
52+ 
53+class SwigluGraph(torch.nn.Module):
54+ preserve_input_views = True
55+ 
56+ def __init__(self):
57+ super().__init__()
58+ import torch_npu
59+ 
60+ self._api = torch_npu.npu_grouped_matmul_swiglu_quant_v2
61+ self._fp4_e2m1 = torch_npu.float4_e2m1fn_x2
62+ 
63+ def forward(self, x, weight, weight_scale, x_scale, group_list, **kwargs):
64+ if (
65+ x.dtype == torch.float8_e4m3fn
66+ and kwargs.get("weight_dtype") == self._fp4_e2m1
67+ ):
68+ weight = [value.transpose(-1, -2) for value in weight]
69+ weight_scale = [value.transpose(-3, -2) for value in weight_scale]
70+ return self._api(x, weight, weight_scale, x_scale, group_list, **kwargs)
71+ 
72+ 
73+class RoutingGraph(torch.nn.Module):
74+ preserve_input_views = True
75+ 
76+ def __init__(self):
77+ super().__init__()
78+ import torch_npu
79+ 
80+ self._api = torch_npu.npu_grouped_matmul_finalize_routing
81+ self._fp4_e2m1 = torch_npu.float4_e2m1fn_x2
82+ 
83+ def forward(self, x, w, group_list, *, scale=None, **kwargs):
84+ if x.dtype == torch.float8_e4m3fn and kwargs.get("w_dtype") == self._fp4_e2m1:
85+ w = w.transpose(-1, -2)
86+ scale = scale.transpose(-3, -2)
87+ return self._api(x, w, group_list, scale=scale, **kwargs)
@@ -0,0 +1,153 @@
1+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
2+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
3+# CANN Open Software License Agreement Version 2.0 (the "License").
4+# Please refer to the License for details. You may not use this file except in compliance with the License.
5+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
6+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
7+# See LICENSE in the root of the software repository for the full text of the License.
8+"""CPU conversions for TTK tensor formats and packed dtypes."""
9+ 
10+import numpy as np
11+import torch
12+ 
13+ 
14+def _nd(value, fmt, ori_shape):
15+ if value is None:
16+ return None
17+ if fmt != "FRACTAL_NZ":
18+ return value
19+ shape = tuple(ori_shape)
20+ # [..., N1, M1, M0, N0] -> [..., M1, M0, N1, N0].
21+ d = value.ndim
22+ order = list(range(d - 4)) + [d - 3, d - 2, d - 4, d - 1]
23+ dense = value.transpose(order).reshape(
24+ value.shape[:-4]
25+ + (value.shape[-3] * value.shape[-2], value.shape[-4] * value.shape[-1])
26+ )
27+ return dense[tuple(slice(0, n) for n in shape)]
28+ 
29+ 
30+def _cast(value, dtype):
31+ if dtype == "bfloat16":
32+ return value.astype(_resolve_bf16_dtype())
33+ if dtype in ("int8", "uint8"):
34+ info = np.iinfo(dtype)
35+ return np.clip(np.rint(value), info.min, info.max).astype(dtype)
36+ return value.astype(dtype)
37+ 
38+ 
39+def _resolve_bf16_dtype():
40+ import ml_dtypes
41+ 
42+ return ml_dtypes.bfloat16
43+ 
44+ 
45+def _numpy(tensor):
46+ if tensor is None:
47+ return None
48+ if tensor.dtype in (torch.bfloat16, torch.float8_e4m3fn, torch.float8_e5m2):
49+ return tensor.detach().float().cpu().numpy()
50+ return tensor.detach().cpu().numpy()
51+ 
52+ 
53+def _decode(tensor, semantic):
54+ a = _numpy(tensor)
55+ if a is None:
56+ return None
57+ if semantic in ("hifloat8", "float8_e8m0"):
58+ import en_dtypes
59+ 
60+ return (
61+ np.ascontiguousarray(a)
62+ .view(getattr(en_dtypes, semantic))
63+ .astype(np.float32)
64+ )
65+ if semantic == "int4" or semantic.startswith("float4"):
66+ trans = tensor.ndim >= 2 and tensor.stride(-2) == 1 and tensor.stride(-1) > 1
67+ if trans:
68+ a = a.swapaxes(-1, -2)
69+ bits = a.dtype.itemsize * 8
70+ raw = np.ascontiguousarray(a).view(np.dtype(f"uint{bits}"))
71+ codes = (
72+ raw[..., None].astype(np.uint64)
73+ >> (np.arange(bits // 4, dtype=np.uint64) * 4)
74+ ) & 15
75+ codes = codes.astype(np.uint8).reshape(
76+ a.shape[:-1] + (a.shape[-1] * (bits // 4),)
77+ )
78+ if semantic == "int4":
79+ values = np.where(
80+ codes >= 8, codes.astype(np.int32) - 16, codes.astype(np.int32)
81+ )
82+ else:
83+ import en_dtypes
84+ 
85+ values = codes.view(getattr(en_dtypes, semantic)).astype(np.float32)
86+ return values.swapaxes(-1, -2) if trans else values
87+ return a
88+ 
89+ 
90+def _np(t):
91+ if t is None:
92+ return None
93+ if isinstance(t, torch.Tensor):
94+ if "float8" in str(t.dtype) or t.dtype == torch.bfloat16:
95+ return t.detach().float().cpu().numpy()
96+ return t.detach().cpu().numpy()
97+ return np.asarray(t)
98+ 
99+ 
100+def _whole(t):
101+ if isinstance(t, torch.Tensor):
102+ size = t.untyped_storage().nbytes() // t.element_size()
103+ return _np(t.as_strided((size,), (1,), 0))
104+ a = t
105+ storage = t
106+ while getattr(a, "base", None) is not None:
107+ a = a.base
108+ if isinstance(a, np.ndarray):
109+ storage = a
110+ return np.asarray(storage).reshape(-1)
111+ 
112+ 
113+def _numeric(t, semantic, carrier=""):
114+ a = _np(t)
115+ if carrier:
116+ bits = np.ascontiguousarray(a).view(np.uint32)
117+ codes = (
118+ (bits[..., None].astype(np.uint64) >> (np.arange(8, dtype=np.uint64) * 4))
119+ & 15
120+ ).astype(np.uint8)
121+ codes = codes.reshape(a.shape[:-1] + (a.shape[-1] * 8,))
122+ if carrier == "int4":
123+ return np.where(codes >= 8, codes.astype(np.int32) - 16, codes)
124+ import en_dtypes
125+ 
126+ return codes.view(en_dtypes.float4_e2m1).astype(np.float32)
127+ return (
128+ a.astype(np.float32)
129+ if semantic not in ("int64", "uint64", "int32", "int8")
130+ else a
131+ )
132+ 
133+ 
134+def _weights(weight, semantic, trans, c0, carrier, k, n):
135+ values = []
136+ for t in weight:
137+ if c0:
138+ # Each TensorList element may have its own K/N and no expert axis.
139+ tk, tn = t.shape[-2:]
140+ if carrier:
141+ tk, tn = (tk * 8, tn) if trans else (tk, tn * 8)
142+ sr, sc = (tn, tk) if trans else (tk, tn)
143+ batch = tuple(t.shape[:-2])
144+ last = c0 // 8 if carrier else c0
145+ raw = _whole(t).reshape(
146+ batch + ((sc + c0 - 1) // c0, (sr + 15) // 16, 16, last)
147+ )
148+ decoded = _numeric(raw, semantic, carrier)
149+ dense = _nd(decoded, "FRACTAL_NZ", batch + (sr, sc))
150+ values.append(dense.swapaxes(-1, -2) if trans else dense)
151+ else:
152+ values.append(_numeric(t, semantic, carrier))
153+ return values
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,output_inplace_indexes,scalar_dtypes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+gmm_aclnn_none_bfloat16_bfloat16_bfloat16_nz_nt_g0_matrix0019,aclnnGroupedMatmulWeightNz,"([(17, 256)], [(3, 256, 128)], None, None, None, None, None, None, (3,), None, None, None, [(17, 128)], None, None)","('bfloat16', 'bfloat16', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32', 'bfloat16', 'bfloat16', 'bfloat16')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, [(3, 8, 16, 16, 16)], None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 0, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': [], 'quantGroupSize': 0}","(12,)",,,"((-1, 1), (-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_reference': {'gmm_semantic': ['bfloat16', 'bfloat16', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 16, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
3+gmm_aclnn_hif8_tt_uint8_uint8_float16_nd_nt_g2_matrix0432,aclnnGroupedMatmulV5,"([(17, 256)], [(256, 128)], None, [(3,)], None, None, None, [(3,)], (3,), None, None, None, [(3, 17, 128)], None, None)","('hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)","((1, 17), None, None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 2, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [85, 85, 86], 'gmm_reference': {'gmm_semantic': ['hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 0, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
4+gmm_aclnn_hif8_kt_uint8_uint8_float16_nd_nt_g2_matrix0441,aclnnGroupedMatmulV5,"([(17, 256)], [(256, 128)], None, [(3,)], None, None, None, [(3, 17)], (3,), None, None, None, [(3, 17, 128)], None, None)","('hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)","((1, 17), None, None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 2, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [85, 85, 86], 'gmm_reference': {'gmm_semantic': ['hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 0, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
5+gmm_aclnn_hif8_kc_uint8_uint8_float16_nd_nt_g2_matrix0450,aclnnGroupedMatmulV5,"([(17, 256)], [(256, 128)], None, [(3, 128)], None, None, None, [(3, 17)], (3,), None, None, None, [(3, 17, 128)], None, None)","('hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)","((1, 17), None, None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 2, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [85, 85, 86], 'gmm_reference': {'gmm_semantic': ['hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 0, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
6+gmm_aclnn_hif8_gb_uint8_uint8_float16_nd_nt_g2_matrix0459,aclnnGroupedMatmulV5,"([(17, 256)], [(256, 128)], None, [(5, 1)], None, None, None, [(17, 5)], (3,), None, None, None, [(3, 17, 128)], None, None)","('hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)","((1, 17), None, None, None, None, None, None, (1, 17), None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 2, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [85, 85, 86], 'gmm_reference': {'gmm_semantic': ['hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 0, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
7+gmm_aclnn_mxfp4_uint8_uint8_float16_nd_nt_g0_matrix0508,aclnnGroupedMatmulV5,"([(17, 256)], [(3, 256, 128)], None, [(3, 4, 128, 2)], None, None, None, [(17, 4, 2)], (3,), None, None, None, [(17, 128)], None, None)","('float4_e2m1', 'float4_e2m1', 'float32', 'float8_e8m0', 'float32', 'float16', 'float16', 'float8_e8m0', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 0, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-2, 2), (-2, 2), (-1, 1), (0.5, 2), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.5, 2), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_reference': {'gmm_semantic': ['float4_e2m1', 'float4_e2m1', 'float32', 'float8_e8m0', 'float32', 'float16', 'float16', 'float8_e8m0', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 0, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
8+gmm_aclnn_a4w4_pg_int32_int32_float16_nz_nt_g0_matrix0874,aclnnGroupedMatmulWeightNz,"([(17, 256)], [(3, 256, 128)], None, [(3, 2, 128)], None, None, None, [(17,)], (3,), None, None, None, [(17, 128)], None, None)","('int4', 'int4', 'float32', 'uint64', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, [(3, 2, 16, 16, 64)], None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 0, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': [], 'quantGroupSize': 0}","(12,)",,,"((-2, 2), (-2, 2), (0.25, 1.25), (16, 256), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_reference': {'gmm_semantic': ['int4', 'int4', 'float32', 'uint64', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 64, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
9+gmm_aclnn_weight_float16_int8_float16_nd_nt_gm1_mmm_matrix0881,aclnnGroupedMatmulV5,"([(5, 256), (5, 256), (7, 256)], [(256, 128), (256, 128), (256, 128)], None, None, None, [(128,), (128,), (128,)], None, None, None, None, None, None, [(5, 128), (5, 128), (7, 128)], None, None)","('float16', 'int8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 0, 'groupType': -1, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-1, 1), (-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [], 'gmm_reference': {'gmm_semantic': ['float16', 'int8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': False, 'gmm_nz_c0': 0, 'gmm_weight_carrier': '', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
10+gmm_aclnn_mx_a8w4_float8_e4m3fn_float32_float16_nz_wt_g0_weight_mx4_graphcarrier__matrix1095,aclnnGroupedMatmulWeightNz,"([(17, 256)], [(3, 32, 128)], None, None, None, [(3, 4, 128, 2)], None, [(17, 4, 2)], (3,), None, None, None, [(17, 128)], None, None)","('float8_e4m3fn', 'float32', 'float32', 'float32', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, [(3, 8, 8, 16, 4)], None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, (4096, 1, 32), None, None, None, (1024, 2, 8, 1), None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 0, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': [], 'quantGroupSize': 0}","(12,)",,,"((-1, 1), (0, 255), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.5, 2), (0.25, 1.25), (0.5, 2), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), None, None, None)","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_reference': {'gmm_semantic': ['float8_e4m3fn', 'float4_e2m1', 'float32', 'float32', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': True, 'gmm_nz_c0': 32, 'gmm_weight_carrier': 'float4_e2m1', 'gmm_k': 256, 'gmm_n': 128, 'gmm_scale_nz': False}}"
11+gmm_fullquant_multi_077_mxfp8_nz_wt_float16_s3_gl1,aclnnGroupedMatmulWeightNz,"([(12, 128)], [(128, 32), (128, 32), (128, 32), (128, 32), (128, 32), (128, 32)], None, [(2, 32, 2), (2, 32, 2), (2, 32, 2), (2, 32, 2), (2, 32, 2), (2, 32, 2)], None, None, None, [(12, 2, 2)], (6,), None, None, None, [(12, 32)], None, None)","('float8_e4m3fn', 'float8_e4m3fn', 'float32', 'float8_e8m0', 'float32', 'float16', 'float16', 'float8_e8m0', 'int64', 'float32', 'float32', 'float32', 'float16', 'float16', 'float16')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, [(4, 2, 16, 32), (4, 2, 16, 32), (4, 2, 16, 32), (4, 2, 16, 32), (4, 2, 16, 32), (4, 2, 16, 32)], None, [(32, 2, 2), (32, 2, 2), (32, 2, 2), (32, 2, 2), (32, 2, 2), (32, 2, 2)], None, None, None, None, None, None, None, None, None, None, None)","(None, (1, 128), None, (2, 4, 1), None, None, None, None, None, None, None, None, None, None, None)",,"{'splitItem': 3, 'groupType': 0, 'groupListType': 1, 'actType': 0, 'tuningConfigOptional': [], 'quantGroupSize': 0}","(12,)",,,"((-1, 1), (-1, 1), (0, 0), (0.5, 2), (0, 0), (0, 0), (0, 0), (0.5, 2), (0, 0), (0, 0), (0, 0), (0, 0), None, None, None)","((0.001, 0.001),)",0.001,"{'ttk_group_list': [2, 2, 2, 2, 2, 2], 'gmm_reference': {'gmm_semantic': ['float8_e4m3fn', 'float8_e4m3fn', 'float32', 'float8_e8m0', 'float32', 'float16', 'float16', 'float8_e8m0', 'int64', 'float32', 'float32', 'float32'], 'gmm_transpose_weight': True, 'gmm_nz_c0': 32, 'gmm_weight_carrier': '', 'gmm_k': 128, 'gmm_n': 32, 'gmm_scale_nz': False}}"
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+gmm_torch_none_float16_float16_float16_nz_nt_g0_matrix0006,torch_npu.npu_grouped_matmul,"([(17, 256)], [(3, 256, 128)], [(0,)], [(0,)], [(0,)], [(0,)], [(0,)], [(0,)], (3,), None, None, None)","('float16', 'float16', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'output_dtype': 5}",,"((-1, 1), (-1, 1), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25))","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_graph_reference': {'weight_format': 'nz', 'scale_nz': False, 'strides': {}, 'empty_tensorlists': ('bias', 'scale', 'offset', 'antiquant_scale', 'antiquant_offset', 'per_token_scale')}}"
3+gmm_torch_hif8_tt_uint8_uint8_bfloat16_nd_nt_g2_matrix0435,torch_npu.npu_grouped_matmul,"([(17, 256)], [(256, 128)], [(0,)], [(3,)], [(0,)], [(0,)], [(0,)], [(3,)], (3,), None, None, None)","('uint8', 'uint8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'split_item': 3, 'group_type': 2, 'group_list_type': 1, 'output_dtype': 15, 'x_dtype': 290, 'weight_dtype': 290}",,"((0, 255), (0, 255), (0, 0), (0.25, 1.25), (0, 0), (0, 0), (0, 0), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25))","((0.001, 0.001),)",.001,"{'ttk_group_list': [85, 85, 86], 'gmm_graph_reference': {'weight_format': 'nd', 'scale_nz': False, 'strides': {'x': ((1, 17),)}, 'empty_tensorlists': ('bias', 'offset', 'antiquant_scale', 'antiquant_offset')}}"
4+gmm_torch_mxfp4_uint8_uint8_float32_nd_nt_g0_matrix0516,torch_npu.npu_grouped_matmul,"([(17, 128)], [(3, 256, 64)], [(0,)], [(3, 4, 128, 2)], [(0,)], [(0,)], [(0,)], [(17, 4, 2)], (3,), None, None, None)","('uint8', 'uint8', 'float32', 'uint8', 'float32', 'float16', 'float16', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'output_dtype': 6, 'scale_dtype': 293, 'per_token_scale_dtype': 293, 'x_dtype': 296, 'weight_dtype': 296}",,"((0, 255), (0, 255), (0, 0), (0, 255), (0, 0), (0, 0), (0, 0), (0, 255), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25))","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_graph_reference': {'weight_format': 'nd', 'scale_nz': False, 'strides': {}, 'empty_tensorlists': ('bias', 'offset', 'antiquant_scale', 'antiquant_offset')}}"
5+gmm_torch_a4w4_pg_int32_int32_float16_nz_wt_g0_matrix0875,torch_npu.npu_grouped_matmul,"([(17, 32)], [(3, 32, 128)], [(0,)], [(3, 2, 128)], [(0,)], [(0,)], [(0,)], [(17,)], (3,), None, None, None)","('int32', 'int32', 'float32', 'uint64', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'output_dtype': 5}",,"((-8, 7), (-8, 7), (0, 0), (16, 256), (0, 0), (0, 0), (0, 0), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25))","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_graph_reference': {'weight_format': 'nz', 'scale_nz': False, 'strides': {'weight': ((4096, 1, 32),)}, 'empty_tensorlists': ('bias', 'offset', 'antiquant_scale', 'antiquant_offset')}}"
6+gmm_torch_weight_float16_int8_float16_nd_nt_gm1_mmm_matrix0881,torch_npu.npu_grouped_matmul,"([(5, 256), (5, 256), (7, 256)], [(256, 128), (256, 128), (256, 128)], [(0,)], [(0,)], [(0,)], [(128,), (128,), (128,)], [(0,)], [(0,)], None, None, None, None)","('float16', 'int8', 'float32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'split_item': 0, 'group_type': -1, 'group_list_type': 1, 'output_dtype': 5}",,"((-1, 1), (-1, 1), (0, 0), (0, 0), (0, 0), (0.25, 1.25), (0, 0), (0, 0), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25))","((0.001, 0.001),)",.001,"{'ttk_group_list': None, 'gmm_graph_reference': {'weight_format': 'nd', 'scale_nz': False, 'strides': {}, 'empty_tensorlists': ('bias', 'scale', 'offset', 'antiquant_offset', 'per_token_scale')}}"
7+gmm_torch_mx_a8w4_float8_e4m3fn_uint8_float16_nz_wt_g0_matrix1060,torch_npu.npu_grouped_matmul,"([(17, 256)], [(3, 128, 128)], [(0,)], [(0,)], [(0,)], [(3, 4, 128, 2)], [(0,)], [(17, 4, 2)], (3,), None, None, None)","('float8_e4m3fn', 'uint8', 'float32', 'float32', 'float32', 'uint8', 'float8_e4m3fn', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'output_dtype': 5, 'weight_dtype': 296, 'per_token_scale_dtype': 293}",,"((-1, 1), (0, 255), (0, 0), (0, 0), (0, 0), (0, 255), (0, 0), (0, 255), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25))","((0.001, 0.001),)",.001,"{'ttk_group_list': [5, 5, 7], 'gmm_graph_reference': {'weight_format': 'nz', 'scale_nz': False, 'strides': {'weight': ((16384, 1, 128),), 'antiquant_scale': ((1024, 2, 8, 1),)}, 'empty_tensorlists': ('bias', 'scale', 'offset', 'antiquant_offset')}}"
8+gmm_level2_e2e_GEN_Perchannel_fp8_bf16_scale_fp32_E12_M820_K34_N534_TypeM_Nontrans_random_listcount_20250530_case6_torchapi,torch_npu.npu_grouped_matmul,"([(820, 34)], [(4, 34, 534)], [(0,)], [(4, 534)], [(0,)], [(0,)], [(0,)], [(0,)], (4,), None, None, None)","('float8_e4m3fn', 'float8_e4m3fn', 'int32', 'float32', 'float32', 'float16', 'float16', 'float32', 'int64', 'float16', 'float16', 'float16')","('ND',)",,,,"{'split_item': 2, 'group_type': 0, 'group_list_type': 1, 'act_type': 0, 'output_dtype': 15}",,"(((-3.75, 3.25),), ((-3.75, 3.25),), (0, 0), ((-1, 1),), (0, 0), (0, 0), (0, 0), (0, 0), (-10.0, 10.0), None, None, None)","((0.001, 0.001),)","(0.001,)","{'gmm_graph_reference': {'weight_format': 'nd', 'scale_nz': False, 'strides': {}, 'empty_tensorlists': ('bias', 'offset', 'antiquant_scale', 'antiquant_offset', 'per_token_scale')}, 'ttk_group_list': [211, 26, 187, 396]}"
9+gmm_fullquant_multi_096_mxfp8_nz_nt_float32_s3_gl2,torch_npu.npu_grouped_matmul,"([(10, 256)], [(256, 128), (256, 128), (256, 128), (256, 128)], [(0,)], [(4, 128, 2), (4, 128, 2), (4, 128, 2), (4, 128, 2)], [(0,)], [(0,)], [(0,)], [(10, 4, 2)], (4, 2), None, None, None)","('float8_e4m3fn', 'float8_e4m3fn', 'float32', 'uint8', 'float32', 'float16', 'float16', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'split_item': 3, 'group_type': 0, 'group_list_type': 2, 'output_dtype': 6, 'scale_dtype': 293, 'per_token_scale_dtype': 293}",,"((-1, 1), (-1, 1), (0, 0), (0, 255), (0, 0), (0, 0), (0, 0), (0, 255), (0, 0), (0, 0), (0, 0), (0, 0))","((0.001, 0.001),)",0.001,"{'ttk_group_list': [(0, 3), (1, 5), (2, 2), (3, 0)], 'gmm_graph_reference': {'weight_format': 'nz', 'scale_nz': False, 'strides': {}, 'empty_tensorlists': ('bias', 'offset', 'antiquant_scale', 'antiquant_offset')}}"
10+gmm_level2_e2e_GEN_General_GB_float8_e4m3fn_float8_e4m3fn_E1_M5_K6_N34_split3_TypeK_Xtrans_no_bias_output_bf16_20251112_case_000004_torchapi,torch_npu.npu_grouped_matmul,"([(5, 6)], [(6, 34)], [(0,)], [(1, 1)], [(0,)], [(0,)], [(0,)], [(5, 1)], (1,), None, None, None)","('float8_e4m3fn', 'float8_e4m3fn', 'float32', 'float32', 'float32', 'float32', 'float32', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND',)",,,,"{'split_item': 3, 'group_type': 2, 'group_list_type': 0, 'act_type': 0, 'output_dtype': 15}",,"(((-10, 10),), ((-10, 10),), (0, 0), ((-1, 1),), (0, 0), (0, 0), (0, 0), ((-1, 1),), (0, 1024), None, None, None)","((0.001, 0.001),)","(0.001,)","{'gmm_graph_reference': {'weight_format': 'nd', 'scale_nz': False, 'strides': {'x': ((1, 5),), 'per_token_scale': ((1, 5),)}, 'empty_tensorlists': ('bias', 'offset', 'antiquant_scale', 'antiquant_offset')}, 'ttk_group_list': [6]}"
11+gmm_level2_e2e_GEN_General_KT_int8_int8_E3_M13_K22_N2652_split3_TypeM_Wtrans_listcount_with_bias_output_bf16_20251114_case_000008_torchapi,torch_npu.npu_grouped_matmul,"([(13, 22)], [(3, 22, 2652)], [(3, 2652)], [(3,)], [(0,)], [(0,)], [(0,)], [(13,)], (3,), None, None, None)","('int8', 'int8', 'int32', 'float32', 'float32', 'float32', 'float32', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND',)",,,,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'act_type': 0, 'output_dtype': 15}",,"(((-10, 10),), ((-10, 10),), ((-10, 10),), ((-1, 1),), (0, 0), (0, 0), (0, 0), ((-1, 1),), (0, 1024), None, None, None)","((0.001, 0.001),)","(0.001,)","{'gmm_graph_reference': {'weight_format': 'nd', 'scale_nz': False, 'strides': {'weight': ((58344, 1, 22),)}, 'empty_tensorlists': ('offset', 'antiquant_scale', 'antiquant_offset')}, 'ttk_group_list': [4, 4, 5]}"
@@ -0,0 +1,11 @@
1+testcase_name,op_name,input_shapes,input_ori_shapes,output_shapes,output_ori_shapes,input_dtypes,output_dtypes,input_formats,input_ori_formats,output_formats,output_ori_formats,attributes,input_data_ranges,precision_tolerances,absolute_precision,is_enabled,attributes1
2+gmm_kernel_none_float16_float16_float16_nz_wt_g0_matrix0010,grouped_matmul,"[[(17, 256)], [(3, 16, 8, 16, 16)], [(3, 128)], [(0,)], [(0,)], [(0,)], [(0,)], (3,), None]","[[(17, 256)], [(3, 128, 256)], [(3, 128)], [(0,)], [(0,)], [(0,)], [(0,)], (3,), None]","(((17, 128),),)","(((17, 128),),)","['float16', 'float16', 'float16', 'uint64', 'float32', 'float16', 'float16', 'int64', 'float32']","('float16',)","['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'transpose_x': False, 'transpose_weight': True}","[(-1, 1), (-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [5, 5, 7]}"
3+gmm_kernel_hif8_tt_uint8_uint8_float32_nd_nt_g2_matrix0438,grouped_matmul,"[[(256, 17)], [(256, 128)], [(0,)], [(3,)], [(0,)], [(0,)], [(0,)], (3,), (3,)]","[[(256, 17)], [(256, 128)], [(0,)], [(3,)], [(0,)], [(0,)], [(0,)], (3,), (3,)]","(((3, 17, 128),),)","(((3, 17, 128),),)","['hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'int64', 'float32']","('float32',)","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 2, 'group_list_type': 1, 'transpose_x': True, 'transpose_weight': False}","[(-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [85, 85, 86]}"
4+gmm_kernel_hif8_kt_uint8_uint8_float32_nd_nt_g2_matrix0447,grouped_matmul,"[[(256, 17)], [(256, 128)], [(0,)], [(3,)], [(0,)], [(0,)], [(0,)], (3,), (3, 17)]","[[(256, 17)], [(256, 128)], [(0,)], [(3,)], [(0,)], [(0,)], [(0,)], (3,), (3, 17)]","(((3, 17, 128),),)","(((3, 17, 128),),)","['hifloat8', 'hifloat8', 'float32', 'float32', 'float32', 'float16', 'float16', 'int64', 'float32']","('float32',)","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 2, 'group_list_type': 1, 'transpose_x': True, 'transpose_weight': False}","[(-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [85, 85, 86]}"
5+gmm_kernel_mxfp8_float8_e4m3fn_float8_e5m2_float32_nd_nt_g2_matrix0483,grouped_matmul,"[[(256, 17)], [(256, 128)], [(0,)], [(7, 128, 2)], [(0,)], [(0,)], [(0,)], (3,), (7, 17, 2)]","[[(256, 17)], [(256, 128)], [(0,)], [(7, 128, 2)], [(0,)], [(0,)], [(0,)], (3,), (7, 17, 2)]","(((3, 17, 128),),)","(((3, 17, 128),),)","['float8_e4m3fn', 'float8_e5m2', 'float32', 'float8_e8m0', 'float32', 'float16', 'float16', 'int64', 'float8_e8m0']","('float32',)","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 2, 'group_list_type': 1, 'transpose_x': True, 'transpose_weight': False}","[(-1, 1), (-1, 1), (0.25, 1.25), (0.5, 2), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.5, 2)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [85, 85, 86]}"
6+gmm_kernel_a8w8_static_int8_int8_int8_nd_wt_g0_matrix0655,grouped_matmul,"[[(17, 256)], [(3, 128, 256)], [(3, 128)], [(3, 128)], [(0,)], [(0,)], [(0,)], (3,), None]","[[(17, 256)], [(3, 128, 256)], [(3, 128)], [(3, 128)], [(0,)], [(0,)], [(0,)], (3,), None]","(((17, 128),),)","(((17, 128),),)","['int8', 'int8', 'int32', 'int64', 'float32', 'float16', 'float16', 'int64', 'float32']","('int8',)","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'transpose_x': False, 'transpose_weight': True}","[(-4, 4), (-4, 4), (-1, 1), (16, 256), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [5, 5, 7]}"
7+gmm_kernel_a4w4_pg_int32_int32_bfloat16_nz_nt_g0_matrix0878,grouped_matmul,"[[(17, 256)], [(3, 2, 16, 16, 64)], [(0,)], [(3, 2, 128)], [(0,)], [(0,)], [(0,)], (3,), (17,)]","[[(17, 256)], [(3, 256, 128)], [(0,)], [(3, 2, 128)], [(0,)], [(0,)], [(0,)], (3,), (17,)]","(((17, 128),),)","(((17, 128),),)","['int4', 'int4', 'float16', 'uint64', 'float32', 'float16', 'float16', 'int64', 'float32']","('bfloat16',)","['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'transpose_x': False, 'transpose_weight': False}","[(-2, 2), (-2, 2), (0.25, 1.25), (16, 256), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [5, 5, 7]}"
8+gmm_kernel_weight_float16_int8_float16_nd_wt_gm1_mmm_ao_matrix0891,grouped_matmul,"[[(5, 256), (5, 256), (7, 256)], [(128, 256), (128, 256), (128, 256)], [(0,)], [(0,)], [(0,)], [(128,), (128,), (128,)], [(128,), (128,), (128,)], None, None]","[[(5, 256), (5, 256), (7, 256)], [(128, 256), (128, 256), (128, 256)], [(0,)], [(0,)], [(0,)], [(128,), (128,), (128,)], [(128,), (128,), (128,)], None, None]","(((5, 128), (5, 128), (7, 128)),)","(((5, 128), (5, 128), (7, 128)),)","['float16', 'int8', 'float16', 'uint64', 'float32', 'float16', 'float16', 'int64', 'float32']","('float16',)","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 0, 'group_type': -1, 'group_list_type': 1, 'transpose_x': False, 'transpose_weight': True}","[(-1, 1), (-1, 1), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25), (-0.5, 0.5), (0.25, 1.25), (0.25, 1.25)]","((0.001, 0.001),)",.001,True,{'ttk_group_list': []}
9+gmm_kernel_mx_a8w4_float8_e4m3fn_uint8_float16_nz_wt_g0_matrix1062,grouped_matmul,"[[(17, 256)], [(3, 8, 8, 16, 32)], [(0,)], [(0,)], [(0,)], [(3, 128, 4, 2)], [(0,)], (3,), (17, 4, 2)]","[[(17, 256)], [(3, 128, 256)], [(0,)], [(0,)], [(0,)], [(3, 128, 4, 2)], [(0,)], (3,), (17, 4, 2)]","(((17, 128),),)","(((17, 128),),)","['float8_e4m3fn', 'float4_e1m2', 'float16', 'uint64', 'float32', 'float8_e8m0', 'float16', 'int64', 'float8_e8m0']","('float16',)","['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'transpose_x': False, 'transpose_weight': True}","[(-1, 1), (-2, 2), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.5, 2), (0.25, 1.25), (0.25, 1.25), (0.5, 2)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [5, 5, 7]}"
10+gmm_kernel_native_mx_a16w4_bfloat16_uint8_bfloat16_nz_nt_g0_matrix1093,grouped_matmul,"[[(17, 256)], [(3, 8, 16, 16, 16)], [(3, 128)], [(0,)], [(0,)], [(3, 8, 128)], [(0,)], (3,), None]","[[(17, 256)], [(3, 256, 128)], [(3, 128)], [(0,)], [(0,)], [(3, 8, 128)], [(0,)], (3,), None]","(((17, 128),),)","(((17, 128),),)","['bfloat16', 'float4_e2m1', 'bfloat16', 'uint64', 'float32', 'float8_e8m0', 'bfloat16', 'int64', 'float32']","('bfloat16',)","['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 3, 'group_type': 0, 'group_list_type': 1, 'transpose_x': False, 'transpose_weight': False}","[(-1, 1), (-2, 2), (-1, 1), (0.25, 1.25), (0.25, 1.25), (0.5, 2), (0.25, 1.25), (0.25, 1.25), (0.25, 1.25)]","((0.001, 0.001),)",.001,True,"{'ttk_group_list': [5, 5, 7]}"
11+gmm_fullquant_multi_040_mxfp4_e2m1_nz_wt_bfloat16_s2_gl0,grouped_matmul,"([(17, 128)], [(2, 6, 16, 64), (2, 6, 16, 64), (2, 6, 16, 64)], [(0,)], [(96, 2, 2), (96, 2, 2), (96, 2, 2)], [(0,)], [(0,)], [(0,)], (3,), (17, 2, 2))","([(17, 128)], [(96, 128), (96, 128), (96, 128)], [(0,)], [(96, 2, 2), (96, 2, 2), (96, 2, 2)], [(0,)], [(0,)], [(0,)], (3,), (17, 2, 2))","(((17, 96),),)","(((17, 96),),)","['float4_e2m1', 'float4_e2m1', 'float32', 'float8_e8m0', 'float32', 'float16', 'float16', 'int64', 'float8_e8m0']","('bfloat16',)","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","('ND',)",,"{'split_item': 2, 'group_type': 0, 'group_list_type': 0, 'transpose_x': False, 'transpose_weight': True}","((-2, 2), (-2, 2), (0, 0), (0.5, 2), (0, 0), (0, 0), (0, 0), (0, 0), (0.5, 2))","((0.001, 0.001),)",0.001,True,"{'ttk_group_list': [5, 8, 17]}"
@@ -0,0 +1,115 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""ACLNN reference for an NZ allocation exposed through a logical weight view."""
13+ 
14+from pathlib import Path
15+from runpy import run_path
16+ 
17+import numpy as np
18+ 
19+_ASSETS = Path(__file__).resolve().parent
20+_REFERENCE = run_path(str(_ASSETS / "gmmaq_reference.py"))
21+grouped_matmul_activation_quant_golden = _REFERENCE[
22+ "grouped_matmul_activation_quant_golden"
23+]
24+_make_valid_group_list = run_path(str(_ASSETS / "inputs.py"))["_make_valid_group_list"]
25+as_numpy = _REFERENCE["as_numpy"]
26+ 
27+ 
28+def _nz_storage(weight, transpose):
29+ e, k, n = weight.shape
30+ rows, cols = (n, k) if transpose else (k, n)
31+ shape = (e, (cols + 31) // 32, (rows + 15) // 16, 16, 32)
32+ if hasattr(weight, "untyped_storage"):
33+ size = weight.untyped_storage().nbytes() // weight.element_size()
34+ return as_numpy(weight.as_strided((size,), (1,), 0)).reshape(shape)
35+ backing = weight
36+ while isinstance(backing.base, np.ndarray):
37+ backing = backing.base
38+ return np.asarray(backing).reshape(shape)
39+ 
40+ 
41+class AclnnGroupedMatmulActivationQuantWeightNzTestSpec:
42+ @staticmethod
43+ def customize_inputs(
44+ x,
45+ groupList,
46+ weight,
47+ weightScale,
48+ bias,
49+ xScaleOptional,
50+ activationType,
51+ groupListType,
52+ *args,
53+ ttk_group_list=None,
54+ **kwargs,
55+ ):
56+ groups = as_numpy(groupList)
57+ values = (
58+ ttk_group_list
59+ if ttk_group_list is not None
60+ else _make_valid_group_list(groups, x.shape[0], groupListType, groups.dtype)
61+ )
62+ groupList[...] = (
63+ groupList.new_tensor(values) if hasattr(groupList, "new_tensor") else values
64+ )
65+ 
66+ @staticmethod
67+ def golden(
68+ x,
69+ groupList,
70+ weight,
71+ weightScale,
72+ bias,
73+ xScaleOptional,
74+ activationType,
75+ groupListType,
76+ tuningConfig,
77+ quantMode,
78+ roundMode,
79+ scaleAlg,
80+ dstTypeMax,
81+ y=None,
82+ yScale=None,
83+ *,
84+ tensor_dtypes=(),
85+ **kwargs,
86+ ):
87+ (w,) = weight
88+ (ws,) = weightScale
89+ transpose = (
90+ w.stride(-2) == 1 if hasattr(w, "stride") else w.strides[-2] == w.itemsize
91+ )
92+ scale = as_numpy(ws)
93+ if transpose:
94+ scale = scale.swapaxes(-3, -2)
95+ return grouped_matmul_activation_quant_golden(
96+ as_numpy(x),
97+ as_numpy(groupList),
98+ _nz_storage(w, transpose),
99+ scale,
100+ bias,
101+ activationType,
102+ x_scale=as_numpy(xScaleOptional),
103+ transpose_weight=transpose,
104+ group_list_type=groupListType,
105+ quant_mode=quantMode,
106+ round_mode=roundMode,
107+ scale_alg=scaleAlg,
108+ dst_type_max=dstTypeMax,
109+ output_dtypes=tensor_dtypes[-2:],
110+ )
111+ 
112+ 
113+__spec__ = {
114+ "aclnnGroupedMatmulActivationQuantWeightNz": "AclnnGroupedMatmulActivationQuantWeightNzTestSpec"
115+}
@@ -0,0 +1,119 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""Torch extension reference and device-side preparation of FRACTAL_NZ weight."""
13+ 
14+from pathlib import Path
15+from runpy import run_path
16+ 
17+import en_dtypes
18+import numpy as np
19+ 
20+_ASSETS = Path(__file__).resolve().parent
21+_REFERENCE = run_path(str(_ASSETS / "gmmaq_reference.py"))
22+grouped_matmul_activation_quant_golden = _REFERENCE[
23+ "grouped_matmul_activation_quant_golden"
24+]
25+_make_valid_group_list = run_path(str(_ASSETS / "inputs.py"))["_make_valid_group_list"]
26+as_numpy = _REFERENCE["as_numpy"]
27+ 
28+ 
29+def _decode_scale(tensor):
30+ return as_numpy(tensor).view(en_dtypes.float8_e8m0).astype(np.float32)
johan_lee
johan_leejohan_lee17 days ago

【review】 问题分类:可测 位置:gmm/grouped_matmul_activation_quant/tests/assets/gmmaq_e2e_golden.py:28,代码:return as_numpy(tensor).view(en_dtypes.float8_e8m0).astype(np.float32) 问题:Torch 接口允许原生 float8_e8m0fnu 的 weight_scale 和 x_scale。as_numpy 已把这种张量按数值转换成 FP32,这里再把 FP32 内存按单字节 E8M0 重解释,末维会从 2 变成 8,且缩放值来自 FP32 的各个字节。 可能导致的结果:例如有效的 x_scale 形状 [12, 2, 2] 会变为 [12, 2, 8],参考路径把每行的 4 个缩放因子当成 16 个执行反量化,导致原生 E8M0 用例的期望结果错误。当前表格使用 uint8 载体,无法捕获这类误判。 建议的修改方法:仅对 int8 或 uint8 载体按 E8M0 字节重解释,原生 E8M0 保留按数值转换得到的 FP32 数组,并增加一组原生 E8M0 端到端用例验证形状和数值。

likedislike
31+ 
32+ 
33+class GmmaqTorchTestSpec:
34+ @staticmethod
35+ def customize_inputs(
36+ x,
37+ group_list,
38+ weight,
39+ weight_scale,
40+ activation_type,
41+ *,
42+ group_list_type=0,
43+ ttk_group_list=None,
44+ **kwargs,
45+ ):
46+ group_list[...] = group_list.new_tensor(
47+ ttk_group_list
48+ if ttk_group_list is not None
49+ else _make_valid_group_list(
50+ as_numpy(group_list), x.shape[0], group_list_type, np.int64
51+ )
52+ )
53+ 
54+ @staticmethod
55+ def npu_preprocess(
56+ x,
57+ group_list,
58+ weight,
59+ weight_scale,
60+ activation_type,
61+ *,
62+ ttk_transpose_weight=False,
63+ **kwargs,
64+ ):
65+ import torch_npu
66+ 
67+ (source,) = weight
68+ if ttk_transpose_weight:
69+ # TTK generates dense TensorList members. Restore the API's transpose views.
70+ source = source.transpose(-1, -2).contiguous()
71+ weight_scale[0] = (
72+ weight_scale[0].transpose(-3, -2).contiguous().transpose(-3, -2)
73+ )
74+ converted = torch_npu.npu_format_cast(source, 29)
75+ weight[0] = converted.transpose(-1, -2) if ttk_transpose_weight else converted
76+ 
77+ @staticmethod
78+ def golden(
79+ x,
80+ group_list,
81+ weight,
82+ weight_scale,
83+ activation_type,
84+ *,
85+ bias=None,
86+ x_scale,
87+ group_list_type=0,
88+ y_dtype=None,
89+ scale_alg=0,
90+ **kwargs,
91+ ):
92+ return grouped_matmul_activation_quant_golden(
93+ as_numpy(x),
94+ as_numpy(group_list),
95+ as_numpy(weight[0]),
96+ _decode_scale(weight_scale[0]),
97+ bias,
98+ activation_type,
99+ x_scale=_decode_scale(x_scale),
100+ group_list_type=group_list_type,
101+ y_dtype=y_dtype
102+ if y_dtype is not None
103+ else (35 if str(x.dtype).endswith("e5m2") else 36),
104+ scale_alg=scale_alg,
105+ )
106+ 
107+ @staticmethod
108+ def pre_compare(y, y_scale, expected_y, expected_scale):
109+ if y_scale.dtype in (np.int8, np.uint8):
110+ # Integer carrier outputs are compared as E8M0 encodings.
111+ expected_scale = expected_scale.astype(en_dtypes.float8_e8m0).view(
112+ y_scale.dtype
113+ )
114+ return y, y_scale, expected_y, expected_scale
115+ 
116+ 
117+__spec__ = {
118+ "torch.ops.cann_ops_transformer.grouped_matmul_activation_quant": "GmmaqTorchTestSpec"
119+}
@@ -0,0 +1,75 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""Kernel reference for the physical NZ and scale descriptors in the ST table."""
13+ 
14+from pathlib import Path
15+from runpy import run_path
16+ 
17+_ASSETS = Path(__file__).resolve().parent
18+_REFERENCE = run_path(str(_ASSETS / "gmmaq_reference.py"))
19+grouped_matmul_activation_quant_golden = _REFERENCE[
20+ "grouped_matmul_activation_quant_golden"
21+]
22+_make_valid_group_list = run_path(str(_ASSETS / "inputs.py"))["_make_valid_group_list"]
23+ 
24+ 
25+class GroupedMatmulActivationQuantTestSpec:
26+ @staticmethod
27+ def customize_inputs(
28+ x,
29+ group_list,
30+ weight,
31+ weight_scale,
32+ bias,
33+ x_scale,
34+ *,
35+ group_list_type=0,
36+ ttk_group_list=None,
37+ **kwargs,
38+ ):
39+ group_list[...] = (
40+ ttk_group_list
41+ if ttk_group_list is not None
42+ else _make_valid_group_list(
43+ group_list, x.shape[0], group_list_type, group_list.dtype
44+ )
45+ )
46+ 
47+ return x, group_list, weight, weight_scale, bias, x_scale
48+ 
49+ @staticmethod
50+ def golden(
51+ x,
52+ group_list,
53+ weight,
54+ weight_scale,
55+ bias,
56+ x_scale,
57+ *,
58+ activation_type="gelu_tanh",
59+ **kwargs,
60+ ):
61+ # The kernel's y_dtype controls quantization even when TTK promotes outputs for comparison.
62+ kwargs.pop("output_dtypes", None)
63+ return grouped_matmul_activation_quant_golden(
64+ x,
65+ group_list,
66+ weight,
67+ weight_scale,
68+ bias,
69+ activation_type,
70+ x_scale=x_scale,
71+ **kwargs,
72+ )
73+ 
74+ 
75+__spec__ = {"grouped_matmul_activation_quant": "GroupedMatmulActivationQuantTestSpec"}
@@ -0,0 +1,545 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""Shared CPU math and tensor conversion for GMMAQ precision tests."""
13+ 
14+import numpy as np
15+import torch
16+ 
17+try:
18+ import ml_dtypes
19+except ModuleNotFoundError:
20+ ml_dtypes = None
21+ 
22+ 
23+MXFP_GROUP_SIZE = 64
24+MXFP_SCALE_PAIR = 2
25+FLOAT_EPS = 1e-6
26+MXFP_SCALE_ELEMENT_NUM = 32
27+N_ALIGN_SIZE = 64
28+FP8_E4M3_MAX = 448.0
29+FP8_E5M2_MAX = 57344.0
30+FP4_E2M1_MAX = 6.0
31+FP4_E1M2_MAX = 3.5
32+QUANT_DTYPE_E5M2 = 35
33+QUANT_DTYPE_E4M3FN = 36
34+QUANT_DTYPE_E2M1 = 40
35+QUANT_DTYPE_E1M2 = 41
36+SCALE_ALG_OCP = 0
37+SCALE_ALG_DYNAMIC_DTYPE_RANGE = 2
38+BF16_EXP_MASK = 0x7F80
39+BF16_EXP_BIAS = 0x7F00
40+FP8_E4M3_MAX_EXP = 0x0400
41+FP8_E5M2_MAX_EXP = 0x0780
42+FP4_E2M1_MAX_EXP = 0x0100
43+FP4_E1M2_MAX_EXP = 0x0000
44+MAX_EXP_FOR_FP8 = 0x00FF
45+NAN_CUSTOMIZATION = 0x7F81
46+SPECIAL_EXP_THRESHOLD = 0x0040
47+GELU_TANH_NEG_SQRT_EIGHT_OVER_PI = -1.595769121 * 0.044715
48+GELU_TANH_APPROX_FACTOR = 1.0 / 0.044715
49+ 
50+ 
51+def grouped_matmul_activation_quant_golden(
52+ x,
53+ group_list,
54+ weight,
55+ weight_scale,
56+ bias,
57+ activation_type: str,
58+ *,
59+ x_scale=None,
60+ transpose_weight: bool = False,
61+ group_list_type: int = 0,
62+ tuning_config=None,
63+ quant_mode: str = "",
64+ y_dtype: int = QUANT_DTYPE_E4M3FN,
65+ round_mode: str = "rint",
66+ scale_alg: int = 0,
67+ dst_type_max: float = 0.0,
68+ **kwargs,
69+):
70+ del bias, tuning_config, round_mode
71+ if activation_type != "gelu_tanh":
72+ raise ValueError("activation_type only supports gelu_tanh.")
73+ if quant_mode in (None, ""):
74+ quant_mode = "mx"
75+ if quant_mode != "mx":
76+ raise ValueError("quant_mode 参数当前仅支持为 mx")
77+ if x_scale is None:
78+ raise ValueError("x_scale is required for mx quant mode.")
79+ 
80+ output_dtypes = kwargs.get("output_dtypes", [])
81+ y_dtype = output_dtypes[0] if output_dtypes else _ge_dtype_to_name(y_dtype)
82+ y_scale_dtype = output_dtypes[1] if len(output_dtypes) > 1 else "float8_e8m0"
83+ y_dtype = _normalize_dtype_name(y_dtype)
84+ y_scale_dtype = _normalize_dtype_name(y_scale_dtype)
85+ 
86+ x_fp32 = _to_float32(x)
87+ x_scale_fp32 = _to_float32(x_scale)
88+ weight_fp32 = _to_float32(_first_tensor(weight))
89+ weight_scale_fp32 = _to_float32(_first_tensor(weight_scale))
90+ group_list_cumsum = _get_group_list_cumsum(group_list, group_list_type)
91+ 
92+ m, k = x_fp32.shape
93+ n = _get_n_size(weight_fp32, weight_scale_fp32, transpose_weight)
94+ if n % N_ALIGN_SIZE != 0:
95+ raise ValueError(
96+ "N must be a multiple of {}, actual is {}.".format(N_ALIGN_SIZE, n)
97+ )
98+ 
99+ x_dequant = _dequant_x(x_fp32, x_scale_fp32)
100+ mm_out = np.zeros((m, n), dtype=np.float32)
@@ -9,531 +9,17 @@
9# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.9# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10# See LICENSE in the root of the software repository for the full text of the License.10# See LICENSE in the root of the software repository for the full text of the License.
11# ----------------------------------------------------------------------------11# ----------------------------------------------------------------------------
12+"""Legacy Kernel golden registration for GMMAQ."""
13+ 
14+from pathlib import Path
15+from runpy import run_path
16+ 
17+grouped_matmul_activation_quant_golden = run_path(
18+ str(Path(__file__).with_name("gmmaq_reference.py"))
19+)["grouped_matmul_activation_quant_golden"]
20+ 
12__golden__ = {21__golden__ = {
13 "kernel": {22 "kernel": {
14 "grouped_matmul_activation_quant": "grouped_matmul_activation_quant_golden"23 "grouped_matmul_activation_quant": "grouped_matmul_activation_quant_golden"
15 }24 }
16}25}
17- 
18-import numpy as np
19-import torch
20- 
21-try:
22- import ml_dtypes
23-except ModuleNotFoundError:
24- ml_dtypes = None
25- 
26- 
27-MXFP_GROUP_SIZE = 64
28-MXFP_SCALE_PAIR = 2
29-FLOAT_EPS = 1e-6
30-MXFP_SCALE_ELEMENT_NUM = 32
31-N_ALIGN_SIZE = 64
32-FP8_E4M3_MAX = 448.0
33-FP8_E5M2_MAX = 57344.0
34-FP4_E2M1_MAX = 6.0
35-FP4_E1M2_MAX = 3.5
36-QUANT_DTYPE_E5M2 = 35
37-QUANT_DTYPE_E4M3FN = 36
38-QUANT_DTYPE_E2M1 = 40
39-QUANT_DTYPE_E1M2 = 41
40-SCALE_ALG_OCP = 0
41-SCALE_ALG_DYNAMIC_DTYPE_RANGE = 2
42-BF16_EXP_MASK = 0x7F80
43-BF16_EXP_BIAS = 0x7F00
44-FP8_E4M3_MAX_EXP = 0x0400
45-FP8_E5M2_MAX_EXP = 0x0780
46-FP4_E2M1_MAX_EXP = 0x0100
47-FP4_E1M2_MAX_EXP = 0x0000
48-MAX_EXP_FOR_FP8 = 0x00FF
49-NAN_CUSTOMIZATION = 0x7F81
50-SPECIAL_EXP_THRESHOLD = 0x0040
51-GELU_TANH_NEG_SQRT_EIGHT_OVER_PI = -1.595769121 * 0.044715
52-GELU_TANH_APPROX_FACTOR = 1.0 / 0.044715
53- 
54- 
55-def grouped_matmul_activation_quant_golden(
56- x,
57- group_list,
58- weight,
59- weight_scale,
60- bias,
61- activation_type: str,
62- *,
63- x_scale=None,
64- transpose_weight: bool = False,
65- group_list_type: int = 0,
66- tuning_config=None,
67- quant_mode: str = "",
68- y_dtype: int = QUANT_DTYPE_E4M3FN,
69- round_mode: str = "rint",
70- scale_alg: int = 0,
71- dst_type_max: float = 0.0,
72- **kwargs,
73-):
74- del bias, tuning_config, round_mode
75- if activation_type != "gelu_tanh":
76- raise ValueError("activation_type only supports gelu_tanh.")
77- if quant_mode in (None, ""):
78- quant_mode = "mx"
79- if quant_mode != "mx":
80- raise ValueError("quant_mode 参数当前仅支持为 mx")
81- if x_scale is None:
82- raise ValueError("x_scale is required for mx quant mode.")
83- 
84- output_dtypes = kwargs.get("output_dtypes", [])
85- y_dtype = output_dtypes[0] if output_dtypes else _ge_dtype_to_name(y_dtype)
86- y_scale_dtype = output_dtypes[1] if len(output_dtypes) > 1 else "float8_e8m0"
87- y_dtype = _normalize_dtype_name(y_dtype)
88- y_scale_dtype = _normalize_dtype_name(y_scale_dtype)
89- 
90- x_fp32 = _to_float32(x)
91- x_scale_fp32 = _to_float32(x_scale)
92- weight_fp32 = _to_float32(_first_tensor(weight))
93- weight_scale_fp32 = _to_float32(_first_tensor(weight_scale))
94- group_list_cumsum = _get_group_list_cumsum(group_list, group_list_type)
95- 
96- m, k = x_fp32.shape
97- n = _get_n_size(weight_fp32, weight_scale_fp32, transpose_weight)
98- if n % N_ALIGN_SIZE != 0:
99- raise ValueError(
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,output_inplace_indexes,scalar_dtypes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+gmmaq_mxfp8_s0016_nontrans,aclnnGroupedMatmulActivationQuantWeightNz,"((12, 128), (3,), ((3, 128, 128),), ((3, 2, 128, 2),), None, (12, 2, 2), (12, 128), (12, 2, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (3, 4, 8, 16, 32), None, None, None, None, None)",,,"{'activationType': 'gelu_tanh', 'groupListType': 0, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 0, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [4, 8, 12]}"
3+gmmaq_mxfp8_s0018_nontrans,aclnnGroupedMatmulActivationQuantWeightNz,"((17, 66), (2,), ((2, 66, 192),), ((2, 2, 192, 2),), None, (17, 2, 2), (17, 192), (17, 3, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (2, 6, 5, 16, 32), None, None, None, None, None)",,,"{'activationType': 'gelu_tanh', 'groupListType': 0, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 1, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 17), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [9, 17]}"
4+gmmaq_mxfp8_s0022_nontrans,aclnnGroupedMatmulActivationQuantWeightNz,"((5, 34), (8,), ((8, 34, 64),), ((8, 1, 64, 2),), None, (5, 1, 2), (5, 64), (5, 1, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (8, 2, 3, 16, 32), None, None, None, None, None)",,,"{'activationType': 'gelu_tanh', 'groupListType': 1, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 0, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 5), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [1, 1, 1, 1, 1, 0, 0, 0]}"
5+gmmaq_mxfp8_s0023_nontrans,aclnnGroupedMatmulActivationQuantWeightNz,"((33, 130), (3,), ((3, 130, 192),), ((3, 3, 192, 2),), None, (33, 3, 2), (33, 192), (33, 3, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e5m2', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (3, 6, 9, 16, 32), None, None, None, None, None)",,,"{'activationType': 'gelu_tanh', 'groupListType': 1, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 0, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 33), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [11, 11, 11]}"
6+gmmaq_mxfp8_s0033_trans,aclnnGroupedMatmulActivationQuantWeightNz,"((131, 258), (2,), ((2, 258, 128),), ((2, 5, 128, 2),), None, (131, 5, 2), (131, 128), (131, 2, 2))","('float8_e5m2', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (2, 9, 8, 16, 32), None, None, None, None, None)","(None, None, (33024, 1, 258), (1280, 2, 10, 1), None, None, None, None)",,"{'activationType': 'gelu_tanh', 'groupListType': 0, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 1, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 131), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [66, 131]}"
7+gmmaq_mxfp8_s0034_trans,aclnnGroupedMatmulActivationQuantWeightNz,"((6, 74), (8,), ((8, 74, 64),), ((8, 2, 64, 2),), None, (6, 2, 2), (6, 64), (6, 1, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (8, 3, 4, 16, 32), None, None, None, None, None)","(None, None, (4736, 1, 74), (256, 2, 4, 1), None, None, None, None)",,"{'activationType': 'gelu_tanh', 'groupListType': 1, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 0, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 6), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [1, 1, 1, 1, 1, 1, 0, 0]}"
8+gmmaq_mxfp8_s0035_trans,aclnnGroupedMatmulActivationQuantWeightNz,"((35, 132), (3,), ((3, 132, 192),), ((3, 3, 192, 2),), None, (35, 3, 2), (35, 192), (35, 3, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e5m2', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (3, 5, 12, 16, 32), None, None, None, None, None)","(None, None, (25344, 1, 132), (1152, 2, 6, 1), None, None, None, None)",,"{'activationType': 'gelu_tanh', 'groupListType': 1, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 0, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 35), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [12, 12, 11]}"
9+gmmaq_mxfp8_s0036_trans,aclnnGroupedMatmulActivationQuantWeightNz,"((67, 256), (4,), ((4, 256, 384),), ((4, 4, 384, 2),), None, (67, 4, 2), (67, 384), (67, 6, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (4, 8, 24, 16, 32), None, None, None, None, None)","(None, None, (98304, 1, 256), (3072, 2, 8, 1), None, None, None, None)",,"{'activationType': 'gelu_tanh', 'groupListType': 1, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 1, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 67), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [17, 17, 17, 16]}"
10+gmmaq_mxfp8_s0614_nontrans,aclnnGroupedMatmulActivationQuantWeightNz,"((15, 82), (3,), ((3, 82, 192),), ((3, 2, 192, 2),), None, (15, 2, 2), (15, 192), (15, 3, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e5m2', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (3, 6, 6, 16, 32), None, None, None, None, None)",,,"{'activationType': 'gelu_tanh', 'groupListType': 0, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 1, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 15), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [5, 10, 15]}"
11+gmmaq_mxfp8_s0617_trans,aclnnGroupedMatmulActivationQuantWeightNz,"((71, 194), (2,), ((2, 194, 320),), ((2, 4, 320, 2),), None, (71, 4, 2), (71, 320), (71, 5, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0', 'float8_e5m2', 'float8_e8m0')","('ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, (2, 7, 20, 16, 32), None, None, None, None, None)","(None, None, (62080, 1, 194), (2560, 2, 8, 1), None, None, None, None)",,"{'activationType': 'gelu_tanh', 'groupListType': 1, 'tuningConfig': [], 'quantMode': 'mx', 'roundMode': 'rint', 'scaleAlg': 1, 'dstTypeMax': 0}","(6, 7)",,,"((-0.5, 0.5), (0, 71), (-0.5, 0.5), (0.5, 1), None, (0.5, 1), None, None)","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_group_list': [36, 35]}"
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+gmmaq_mxfp8_s0016_nontrans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((12, 128), (3,), ((3, 128, 128),), ((3, 2, 128, 2),), [(0,)], (12, 2, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 12), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': False, 'ttk_group_list': [4, 8, 12]}"
3+gmmaq_mxfp8_s0018_nontrans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((17, 66), (2,), ((2, 66, 192),), ((2, 2, 192, 2),), [(0,)], (17, 2, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 17), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': False, 'ttk_group_list': [9, 17]}"
4+gmmaq_mxfp8_s0022_nontrans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((5, 34), (8,), ((8, 34, 64),), ((8, 1, 64, 2),), [(0,)], (5, 1, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 5), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': False, 'ttk_group_list': [1, 1, 1, 1, 1, 0, 0, 0]}"
5+gmmaq_mxfp8_s0023_nontrans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((33, 130), (3,), ((3, 130, 192),), ((3, 3, 192, 2),), [(0,)], (33, 3, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 33), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': False, 'ttk_group_list': [11, 11, 11]}"
6+gmmaq_mxfp8_s0033_trans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((131, 258), (2,), ((2, 258, 128),), ((2, 5, 128, 2),), [(0,)], (131, 5, 2))","('float8_e5m2', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 131), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': True, 'ttk_group_list': [66, 131]}"
7+gmmaq_mxfp8_s0034_trans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((6, 74), (8,), ((8, 74, 64),), ((8, 2, 64, 2),), [(0,)], (6, 2, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 6), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': True, 'ttk_group_list': [1, 1, 1, 1, 1, 1, 0, 0]}"
8+gmmaq_mxfp8_s0035_trans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((35, 132), (3,), ((3, 132, 192),), ((3, 3, 192, 2),), [(0,)], (35, 3, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 35), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': True, 'ttk_group_list': [12, 12, 11]}"
9+gmmaq_mxfp8_s0036_trans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((67, 256), (4,), ((4, 256, 384),), ((4, 4, 384, 2),), [(0,)], (67, 4, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 67), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': True, 'ttk_group_list': [17, 17, 17, 16]}"
10+gmmaq_mxfp8_s0614_nontrans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((15, 82), (3,), ((3, 82, 192),), ((3, 2, 192, 2),), [(0,)], (15, 2, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 15), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': False, 'ttk_group_list': [5, 10, 15]}"
11+gmmaq_mxfp8_s0617_trans,torch.ops.cann_ops_transformer.grouped_matmul_activation_quant,"((71, 194), (2,), ((2, 194, 320),), ((2, 4, 320, 2),), [(0,)], (71, 4, 2))","('float8_e4m3fn', 'int64', 'float8_e4m3fn', 'uint8', 'float32', 'uint8')","('ND',)",,,,"{'activation_type': 'gelu_tanh', 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (0, 71), (-0.5, 0.5), (126, 128), (0, 0), (126, 128))","((0.001, 0.001), (0.001, 0.001))",0.001,"{'ttk_transpose_weight': True, 'ttk_group_list': [36, 35]}"
@@ -0,0 +1,11 @@
1+testcase_name,op_name,input_shapes,input_ori_shapes,output_shapes,output_ori_shapes,input_dtypes,output_dtypes,input_formats,input_ori_formats,output_formats,output_ori_formats,attributes,input_data_ranges,precision_tolerances,absolute_precision,is_enabled,attributes1
2+gmmaq_mxfp8_s0016_nontrans,grouped_matmul_activation_quant,"[(12, 128), (3,), [(3, 4, 8, 16, 32)], [(3, 2, 128, 2)], [(0,)], (12, 2, 2)]","[(12, 128), (3,), [(3, 128, 128)], [(3, 2, 128, 2)], [(0,)], (12, 2, 2)]","[(12, 128), (12, 2, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': False, 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [4, 8, 12]}"
3+gmmaq_mxfp8_s0018_nontrans,grouped_matmul_activation_quant,"[(17, 66), (2,), [(2, 6, 5, 16, 32)], [(2, 2, 192, 2)], [(0,)], (17, 2, 2)]","[(17, 66), (2,), [(2, 66, 192)], [(2, 2, 192, 2)], [(0,)], (17, 2, 2)]","[(17, 192), (17, 3, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': False, 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 17), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [9, 17]}"
4+gmmaq_mxfp8_s0022_nontrans,grouped_matmul_activation_quant,"[(5, 34), (8,), [(8, 2, 3, 16, 32)], [(8, 1, 64, 2)], [(0,)], (5, 1, 2)]","[(5, 34), (8,), [(8, 34, 64)], [(8, 1, 64, 2)], [(0,)], (5, 1, 2)]","[(5, 64), (5, 1, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': False, 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [1, 1, 1, 1, 1, 0, 0, 0]}"
5+gmmaq_mxfp8_s0023_nontrans,grouped_matmul_activation_quant,"[(33, 130), (3,), [(3, 6, 9, 16, 32)], [(3, 3, 192, 2)], [(0,)], (33, 3, 2)]","[(33, 130), (3,), [(3, 130, 192)], [(3, 3, 192, 2)], [(0,)], (33, 3, 2)]","[(33, 192), (33, 3, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e5m2', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': False, 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 33), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [11, 11, 11]}"
6+gmmaq_mxfp8_s0033_trans,grouped_matmul_activation_quant,"[(131, 258), (2,), [(2, 9, 8, 16, 32)], [(2, 128, 5, 2)], [(0,)], (131, 5, 2)]","[(131, 258), (2,), [(2, 128, 258)], [(2, 128, 5, 2)], [(0,)], (131, 5, 2)]","[(131, 128), (131, 2, 2)]",,"['float8_e5m2', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': True, 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 131), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [66, 131]}"
7+gmmaq_mxfp8_s0034_trans,grouped_matmul_activation_quant,"[(6, 74), (8,), [(8, 3, 4, 16, 32)], [(8, 64, 2, 2)], [(0,)], (6, 2, 2)]","[(6, 74), (8,), [(8, 64, 74)], [(8, 64, 2, 2)], [(0,)], (6, 2, 2)]","[(6, 64), (6, 1, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': True, 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 6), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [1, 1, 1, 1, 1, 1, 0, 0]}"
8+gmmaq_mxfp8_s0035_trans,grouped_matmul_activation_quant,"[(35, 132), (3,), [(3, 5, 12, 16, 32)], [(3, 192, 3, 2)], [(0,)], (35, 3, 2)]","[(35, 132), (3,), [(3, 192, 132)], [(3, 192, 3, 2)], [(0,)], (35, 3, 2)]","[(35, 192), (35, 3, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e5m2', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': True, 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 0, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 35), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [12, 12, 11]}"
9+gmmaq_mxfp8_s0036_trans,grouped_matmul_activation_quant,"[(67, 256), (4,), [(4, 8, 24, 16, 32)], [(4, 384, 4, 2)], [(0,)], (67, 4, 2)]","[(67, 256), (4,), [(4, 384, 256)], [(4, 384, 4, 2)], [(0,)], (67, 4, 2)]","[(67, 384), (67, 6, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': True, 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 36, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 67), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [17, 17, 17, 16]}"
10+gmmaq_mxfp8_s0614_nontrans,grouped_matmul_activation_quant,"[(15, 82), (3,), [(3, 6, 6, 16, 32)], [(3, 2, 192, 2)], [(0,)], (15, 2, 2)]","[(15, 82), (3,), [(3, 82, 192)], [(3, 2, 192, 2)], [(0,)], (15, 2, 2)]","[(15, 192), (15, 3, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e5m2', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': False, 'group_list_type': 0, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 15), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [5, 10, 15]}"
11+gmmaq_mxfp8_s0617_trans,grouped_matmul_activation_quant,"[(71, 194), (2,), [(2, 7, 20, 16, 32)], [(2, 320, 4, 2)], [(0,)], (71, 4, 2)]","[(71, 194), (2,), [(2, 320, 194)], [(2, 320, 4, 2)], [(0,)], (71, 4, 2)]","[(71, 320), (71, 5, 2)]",,"['float8_e4m3fn', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float8_e8m0']","['float8_e5m2', 'float8_e8m0']","['ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND']",,"('ND', 'ND')",,"{'activation_type': 'gelu_tanh', 'transpose_weight': True, 'group_list_type': 1, 'quant_mode': 'mx', 'y_dtype': 35, 'round_mode': 'rint', 'scale_alg': 1, 'dst_type_max': 0}","[(-0.5, 0.5), (0, 71), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1)]","((0.001, 0.001), (0.001, 0.001))",0.001,,"{'ttk_group_list': [36, 35]}"
@@ -0,0 +1,22 @@
1+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
2+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
3+# CANN Open Software License Agreement Version 2.0 (the "License").
4+# Please refer to the License for details. You may not use this file except in compliance with the License.
5+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
6+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
7+# See LICENSE in the root of the software repository for the full text of the License.
8+"""TTK ACLNN golden entry point for grouped_matmul_finalize_routing."""
9+ 
10+from pathlib import Path
11+from runpy import run_path
12+ 
13+ 
14+_SHARED = Path(__file__).resolve().parents[3] / "common/tests/ttk/fused_spec.py"
15+_make_spec = run_path(str(_SHARED))["make_spec"]
16+AclnnSpec = _make_spec("routing", "aclnn")
17+ 
18+ 
19+__spec__ = {
20+ "aclnnGroupedMatmulFinalizeRoutingV3": "AclnnSpec",
21+ "aclnnGroupedMatmulFinalizeRoutingWeightNzV2": "AclnnSpec",
22+}
@@ -0,0 +1,30 @@
1+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
2+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
3+# CANN Open Software License Agreement Version 2.0 (the "License").
4+# Please refer to the License for details. You may not use this file except in compliance with the License.
5+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
6+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
7+# See LICENSE in the root of the software repository for the full text of the License.
8+"""TTK E2E golden entry point for grouped_matmul_finalize_routing."""
9+ 
10+import sys
11+from pathlib import Path
12+from runpy import run_path
13+ 
14+ 
15+_SHARED = Path(__file__).resolve().parents[3] / "common/tests/ttk/fused_spec.py"
16+_make_spec = run_path(str(_SHARED))["make_spec"]
17+sys.path.insert(0, str(_SHARED.parent))
18+try:
19+ from gmm_ttk_graph_models import RoutingGraph
20+finally:
21+ sys.path.pop(0)
22+ 
23+ 
24+E2ESpec = _make_spec("routing", "e2e")
25+E2ESpec.torch_graph = RoutingGraph
26+ 
27+ 
28+__spec__ = {
29+ "torch_npu.npu_grouped_matmul_finalize_routing": "E2ESpec",
30+}
@@ -0,0 +1,21 @@
1+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
2+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
3+# CANN Open Software License Agreement Version 2.0 (the "License").
4+# Please refer to the License for details. You may not use this file except in compliance with the License.
5+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
6+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
7+# See LICENSE in the root of the software repository for the full text of the License.
8+"""TTK KERNEL golden entry point for grouped_matmul_finalize_routing."""
9+ 
10+from pathlib import Path
11+from runpy import run_path
12+ 
13+ 
14+_SHARED = Path(__file__).resolve().parents[3] / "common/tests/ttk/fused_spec.py"
15+_make_spec = run_path(str(_SHARED))["make_spec"]
16+KernelSpec = _make_spec("routing", "kernel")
17+ 
18+ 
19+__spec__ = {
20+ "grouped_matmul_finalize_routing": "KernelSpec",
21+}
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,output_inplace_indexes,scalar_dtypes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+grouped_matmul_finalize_routing_aclnn_hifloat8_hifloat8_float32_nz_nt_g0_s0316,aclnnGroupedMatmulFinalizeRoutingWeightNzV2,"((12, 128), (3, 128, 128), (3, 1, 128), None, None, None, None, None, (3,), None, (12,), (12,), (6, 128))","('hifloat8', 'hifloat8', 'float32', 'bfloat16', 'float32', 'float32', 'float32', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 4, 8, 16, 32), None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': False, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('hifloat8', 'hifloat8'), 'sd': 'float32', 'out': 'float32', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
3+grouped_matmul_finalize_routing_aclnn_float8_e4m3fn_float8_e4m3fn_float32_nz_wt_g0_s0406,aclnnGroupedMatmulFinalizeRoutingWeightNzV2,"((65, 384), (3, 512, 384), (3, 1, 512), (3, 512), None, None, None, (65,), (3,), None, (65,), (65,), (6, 512))","('float8_e4m3fn', 'float8_e4m3fn', 'float32', 'bfloat16', 'float32', 'float32', 'float32', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 12, 32, 16, 32), None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': True, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (22, 22, 21), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float32', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 384, 512), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [22, 44, 65]}"
4+grouped_matmul_finalize_routing_aclnn_hifloat8_hifloat8_float32_nz_wt_g1_s0412,aclnnGroupedMatmulFinalizeRoutingWeightNzV2,"((17, 192), (3, 256, 192), (3, 1, 256), None, None, None, None, None, (3,), None, (17,), (17,), (6, 256))","('hifloat8', 'hifloat8', 'float32', 'bfloat16', 'float32', 'float32', 'float32', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 6, 16, 16, 32), None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': True, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (6, 6, 5), 'types': ('hifloat8', 'hifloat8'), 'sd': 'float32', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 192, 256), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [6, 6, 5]}"
5+grouped_matmul_finalize_routing_aclnn_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g0_s0444,aclnnGroupedMatmulFinalizeRoutingV3,"((12, 192), (3, 192, 64), (3, 3, 64, 2), None, None, None, None, (12, 3, 2), (3,), None, (12,), (12,), (6, 64))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'bfloat16', 'float32', 'float32', 'float32', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': False, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 192, 64), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
6+grouped_matmul_finalize_routing_aclnn_float8_e4m3fn_float8_e5m2_float32_nd_wt_g0_s0469,aclnnGroupedMatmulFinalizeRoutingV3,"((12, 128), (3, 128, 128), (3, 128, 2, 2), None, None, None, None, (12, 2, 2), (3,), (6, 128), (12,), (12,), (6, 128))","('float8_e4m3fn', 'float8_e5m2', 'float8_e8m0', 'bfloat16', 'float32', 'float32', 'float32', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': True, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e4m3fn', 'float8_e5m2'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 3, 12]}"
7+grouped_matmul_finalize_routing_aclnn_float8_e5m2_float8_e4m3fn_float32_nd_nt_g1_s0481,aclnnGroupedMatmulFinalizeRoutingV3,"((12, 128), (3, 128, 128), (3, 2, 128, 2), None, None, None, None, (12, 2, 2), (3,), (6, 128), (12,), (12,), (6, 128))","('float8_e5m2', 'float8_e4m3fn', 'float8_e8m0', 'bfloat16', 'float32', 'float32', 'float32', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': False, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e5m2', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
8+grouped_matmul_finalize_routing_aclnn_float4_e2m1_float4_e2m1_bfloat16_nz_nt_g1_s0557,aclnnGroupedMatmulFinalizeRoutingWeightNzV2,"((12, 128), (3, 128, 128), (3, 2, 128, 2), None, None, None, None, (12, 2, 2), (3,), (6, 128), (12,), (12,), (6, 128))","('float4_e2m1', 'float4_e2m1', 'float8_e8m0', 'bfloat16', 'float32', 'float32', 'float32', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int32', 'bfloat16')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 2, 8, 16, 64), None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': False, 'dtype': 2, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float4_e2m1', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'bfloat16', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 64, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
9+grouped_matmul_finalize_routing_aclnn_int8_int8_float32_nz_nt_g1_s0582,aclnnGroupedMatmulFinalizeRoutingWeightNzV2,"((12, 128), (3, 128, 128), (3, 1, 128), (3, 128), None, None, None, None, (3,), None, (12,), (12,), (6, 128))","('int8', 'int8', 'float32', 'bfloat16', 'float32', 'float32', 'float32', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 4, 8, 16, 32), None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': False, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(12,)",,,"((-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('int8', 'int8'), 'sd': 'float32', 'out': 'float32', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 4, 5]}"
10+grouped_matmul_finalize_routing_aclnn_float8_e4m3fn_float8_e4m3fn_float32_nz_wt_g0_s0624,aclnnGroupedMatmulFinalizeRoutingWeightNzV2,"((12, 130), (3, 128, 130), (3, 128, 3, 2), None, None, None, None, (12, 3, 2), (3,), None, (12,), (12,), (6, 128))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'bfloat16', 'float32', 'float32', 'float32', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 5, 8, 16, 32), None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': True, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 0, 'tuningConfigOptional': []}","(12,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 130, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
11+grouped_matmul_finalize_routing_aclnn_int8_int8_float32_nz_wt_g1_s0719,aclnnGroupedMatmulFinalizeRoutingWeightNzV2,"((12, 128), (3, 128, 128), (3, 1, 128), (3, 128), None, None, None, None, (3,), (6, 128), (12,), (12,), (6, 128))","('int8', 'int8', 'bfloat16', 'bfloat16', 'float32', 'float32', 'float32', 'float32', 'int64', 'bfloat16', 'float32', 'int32', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 4, 8, 16, 32), None, None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None, None, None, None)",,"{'transposeX1': False, 'transposeX2': True, 'dtype': 0, 'sharedInputWeight': 0.5, 'sharedInputOffset': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(12,)",,,"((-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('int8', 'int8'), 'sd': 'bfloat16', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+grouped_matmul_finalize_routing_e2e_hifloat8_hifloat8_float32_nz_nt_g0_s0316,torch_npu.npu_grouped_matmul_finalize_routing,"((12, 128), (3, 128, 128), (3,), (3, 1, 128), None, None, None, None, (12,), (12,))","('uint8', 'uint8', 'int64', 'float32', 'bfloat16', 'float32', 'float32', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, None, None, None, None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 0, 'x_dtype': 290, 'w_dtype': 290}",,"((0, 255), (0, 255), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('hifloat8', 'hifloat8'), 'sd': 'float32', 'out': 'float32', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
3+grouped_matmul_finalize_routing_e2e_float8_e4m3fn_float8_e4m3fn_float32_nz_wt_g0_s0390,torch_npu.npu_grouped_matmul_finalize_routing,"((17, 192), (3, 192, 256), (3,), (3, 1, 256), (3, 256), None, None, None, (17,), (17,))","('float8_e4m3fn', 'float8_e4m3fn', 'int64', 'float32', 'bfloat16', 'float32', 'float32', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, (49152, 1, 192), None, None, None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 0}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (6, 6, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float32', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 192, 256), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [6, 12, 17]}"
4+grouped_matmul_finalize_routing_e2e_hifloat8_hifloat8_float32_nz_wt_g1_s0420,torch_npu.npu_grouped_matmul_finalize_routing,"((65, 384), (3, 384, 512), (3,), (3, 1, 512), (3, 512), None, None, None, (65,), (65,))","('uint8', 'uint8', 'int64', 'float32', 'bfloat16', 'float32', 'float32', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, (196608, 1, 384), None, None, None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 1, 'x_dtype': 290, 'w_dtype': 290}",,"((0, 255), (0, 255), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (22, 22, 21), 'types': ('hifloat8', 'hifloat8'), 'sd': 'float32', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 384, 512), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [22, 22, 21]}"
5+grouped_matmul_finalize_routing_e2e_float8_e4m3fn_float8_e4m3fn_float32_nd_wt_g0_s0452,torch_npu.npu_grouped_matmul_finalize_routing,"((12, 320), (3, 320, 192), (3,), (3, 5, 192, 2), None, None, (12, 5, 2), None, (12,), (12,))","('float8_e4m3fn', 'float8_e4m3fn', 'int64', 'uint8', 'bfloat16', 'float32', 'uint8', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, (61440, 1, 320), None, (1920, 2, 10, 1), None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 0, 'scale_dtype': 293, 'pertoken_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 12), (0, 255), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 320, 192), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
6+grouped_matmul_finalize_routing_e2e_float8_e4m3fn_float8_e5m2_float32_nd_nt_g1_s0465,torch_npu.npu_grouped_matmul_finalize_routing,"((12, 128), (3, 128, 128), (3,), (3, 2, 128, 2), None, None, (12, 2, 2), (6, 128), (12,), (12,))","('float8_e4m3fn', 'float8_e5m2', 'int64', 'uint8', 'bfloat16', 'float32', 'uint8', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, None, None, None, None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 1, 'scale_dtype': 293, 'pertoken_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 12), (0, 255), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e4m3fn', 'float8_e5m2'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
7+grouped_matmul_finalize_routing_e2e_float8_e5m2_float8_e4m3fn_float32_nd_wt_g0_s0485,torch_npu.npu_grouped_matmul_finalize_routing,"((12, 128), (3, 128, 128), (3,), (3, 2, 128, 2), None, None, (12, 2, 2), (6, 128), (12,), (12,))","('float8_e5m2', 'float8_e4m3fn', 'int64', 'uint8', 'bfloat16', 'float32', 'uint8', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, (16384, 1, 128), None, (512, 2, 4, 1), None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 0, 'scale_dtype': 293, 'pertoken_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 12), (0, 255), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e5m2', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 3, 12]}"
8+grouped_matmul_finalize_routing_e2e_float4_e2m1_float4_e2m1_float32_nz_nt_g1_s0558,torch_npu.npu_grouped_matmul_finalize_routing,"((17, 96), (3, 192, 128), (3,), (3, 3, 256, 2), (3, 256), None, (17, 3, 2), None, (17,), (17,))","('uint8', 'uint8', 'int64', 'uint8', 'bfloat16', 'float32', 'uint8', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, None, None, None, None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 1, 'scale_dtype': 293, 'pertoken_scale_dtype': 293, 'x_dtype': 296, 'w_dtype': 296}",,"((0, 255), (0, 255), (0, 12), (0, 255), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (6, 6, 5), 'types': ('float4_e2m1', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 64, 'shape': (3, 192, 256), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [6, 6, 5]}"
9+grouped_matmul_finalize_routing_e2e_float8_e4m3fn_float4_e2m1_float32_nz_wt_g1_s0611,torch_npu.npu_grouped_matmul_finalize_routing,"((12, 128), (3, 64, 128), (3,), (3, 2, 128, 2), None, None, (12, 2, 2), (6, 128), (12,), (12,))","('float8_e4m3fn', 'uint8', 'int64', 'uint8', 'bfloat16', 'float32', 'uint8', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, (8192, 1, 64), None, (512, 2, 4, 1), None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 1, 'scale_dtype': 293, 'pertoken_scale_dtype': 293, 'w_dtype': 296}",,"((-0.5, 0.5), (0, 255), (0, 12), (0, 255), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e4m3fn', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ_C0_32', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
10+grouped_matmul_finalize_routing_e2e_float8_e4m3fn_float8_e4m3fn_float32_nz_nt_g1_s0623,torch_npu.npu_grouped_matmul_finalize_routing,"((12, 130), (3, 130, 128), (3,), (3, 3, 128, 2), None, None, (12, 3, 2), None, (12,), (12,))","('float8_e4m3fn', 'float8_e4m3fn', 'int64', 'uint8', 'bfloat16', 'float32', 'uint8', 'bfloat16', 'float32', 'int64')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, None, None, None, None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 1, 'scale_dtype': 293, 'pertoken_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 12), (0, 255), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 130, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
11+grouped_matmul_finalize_routing_e2e_int8_int8_float32_nz_wt_g1_s0719,torch_npu.npu_grouped_matmul_finalize_routing,"((12, 128), (3, 128, 128), (3,), (3, 1, 128), (3, 128), None, None, (6, 128), (12,), (12,))","('int8', 'int8', 'int64', 'bfloat16', 'bfloat16', 'float32', 'float32', 'bfloat16', 'float32', 'int32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,"(None, (16384, 1, 128), None, None, None, None, None, None, None, None)",,"{'dtype': 6, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'output_bs': 6, 'group_list_type': 1}",,"((-3, 3), (-3, 3), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0.25, 1), (0, 11))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('int8', 'int8'), 'sd': 'bfloat16', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
@@ -0,0 +1,11 @@
1+testcase_name,op_name,input_shapes,input_ori_shapes,output_shapes,output_ori_shapes,input_dtypes,output_dtypes,input_formats,input_ori_formats,output_formats,output_ori_formats,attributes,input_data_ranges,precision_tolerances,absolute_precision,is_enabled,attributes1
2+grouped_matmul_finalize_routing_kernel_hifloat8_hifloat8_float32_nz_nt_g0_s0316,grouped_matmul_finalize_routing,"[(12, 128), (3, 4, 8, 16, 32), (3, 1, 128), None, None, (3,), None, (12,), (12,), None]","[(12, 128), (3, 128, 128), (3, 1, 128), None, None, (3,), None, (12,), (12,), None]","[(6, 128)]",,"['hifloat8', 'hifloat8', 'float32', 'bfloat16', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': False, 'output_bs': 6, 'group_list_type': 0}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 4, 5), 'types': ('hifloat8', 'hifloat8'), 'sd': 'float32', 'out': 'float32', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
3+grouped_matmul_finalize_routing_kernel_float8_e4m3fn_float8_e4m3fn_float32_nz_wt_g0_s0406,grouped_matmul_finalize_routing,"((65, 384), (3, 12, 32, 16, 32), (3, 1, 512), (3, 512), (65,), (3,), None, (65,), (65,), None)","((65, 384), (3, 512, 384), (3, 1, 512), (3, 512), (65,), (3,), None, (65,), (65,), None)","[(6, 512)]",,"['float8_e4m3fn', 'float8_e4m3fn', 'float32', 'bfloat16', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': True, 'output_bs': 6, 'group_list_type': 0}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (22, 22, 21), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float32', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 384, 512), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [22, 44, 65]}"
4+grouped_matmul_finalize_routing_kernel_hifloat8_hifloat8_float32_nz_wt_g1_s0412,grouped_matmul_finalize_routing,"((17, 192), (3, 6, 16, 16, 32), (3, 1, 256), None, None, (3,), None, (17,), (17,), None)","((17, 192), (3, 256, 192), (3, 1, 256), None, None, (3,), None, (17,), (17,), None)","[(6, 256)]",,"['hifloat8', 'hifloat8', 'float32', 'bfloat16', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': True, 'output_bs': 6, 'group_list_type': 1}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (6, 6, 5), 'types': ('hifloat8', 'hifloat8'), 'sd': 'float32', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 192, 256), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [6, 6, 5]}"
5+grouped_matmul_finalize_routing_kernel_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g0_s0444,grouped_matmul_finalize_routing,"[(12, 192), (3, 192, 64), (3, 3, 64, 2), None, (12, 3, 2), (3,), None, (12,), (12,), None]","[(12, 192), (3, 192, 64), (3, 3, 64, 2), None, (12, 3, 2), (3,), None, (12,), (12,), None]","[(6, 64)]",,"['float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'bfloat16', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': False, 'output_bs': 6, 'group_list_type': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 192, 64), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
6+grouped_matmul_finalize_routing_kernel_float8_e4m3fn_float8_e5m2_float32_nd_wt_g0_s0469,grouped_matmul_finalize_routing,"[(12, 128), (3, 128, 128), (3, 128, 2, 2), None, (12, 2, 2), (3,), (6, 128), (12,), (12,), None]","[(12, 128), (3, 128, 128), (3, 128, 2, 2), None, (12, 2, 2), (3,), (6, 128), (12,), (12,), None]","[(6, 128)]",,"['float8_e4m3fn', 'float8_e5m2', 'float8_e8m0', 'bfloat16', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': True, 'output_bs': 6, 'group_list_type': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e4m3fn', 'float8_e5m2'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 3, 12]}"
7+grouped_matmul_finalize_routing_kernel_float8_e5m2_float8_e4m3fn_float32_nd_nt_g1_s0481,grouped_matmul_finalize_routing,"[(12, 128), (3, 128, 128), (3, 2, 128, 2), None, (12, 2, 2), (3,), (6, 128), (12,), (12,), None]","[(12, 128), (3, 128, 128), (3, 2, 128, 2), None, (12, 2, 2), (3,), (6, 128), (12,), (12,), None]","[(6, 128)]",,"['float8_e5m2', 'float8_e4m3fn', 'float8_e8m0', 'bfloat16', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': False, 'output_bs': 6, 'group_list_type': 1}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e5m2', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
8+grouped_matmul_finalize_routing_kernel_float4_e2m1_float4_e2m1_bfloat16_nz_nt_g1_s0557,grouped_matmul_finalize_routing,"[(12, 128), (3, 2, 8, 16, 64), (3, 2, 128, 2), None, (12, 2, 2), (3,), (6, 128), (12,), (12,), None]","[(12, 128), (3, 128, 128), (3, 2, 128, 2), None, (12, 2, 2), (3,), (6, 128), (12,), (12,), None]","[(6, 128)]",,"['float4_e2m1', 'float4_e2m1', 'float8_e8m0', 'bfloat16', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int32', 'float32']",['bfloat16'],"['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 2, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': False, 'output_bs': 6, 'group_list_type': 1}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float4_e2m1', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'bfloat16', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 64, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
9+grouped_matmul_finalize_routing_kernel_int8_int8_float32_nz_nt_g1_s0582,grouped_matmul_finalize_routing,"[(12, 128), (3, 4, 8, 16, 32), (3, 1, 128), (3, 128), None, (3,), None, (12,), (12,), None]","[(12, 128), (3, 128, 128), (3, 1, 128), (3, 128), None, (3,), None, (12,), (12,), None]","[(6, 128)]",,"['int8', 'int8', 'float32', 'bfloat16', 'float32', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': False, 'output_bs': 6, 'group_list_type': 1}","[(-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 4, 5), 'types': ('int8', 'int8'), 'sd': 'float32', 'out': 'float32', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 4, 5]}"
10+grouped_matmul_finalize_routing_kernel_float8_e4m3fn_float8_e4m3fn_float32_nz_wt_g0_s0624,grouped_matmul_finalize_routing,"[(12, 130), (3, 5, 8, 16, 32), (3, 128, 3, 2), None, (12, 3, 2), (3,), None, (12,), (12,), None]","[(12, 130), (3, 128, 130), (3, 128, 3, 2), None, (12, 3, 2), (3,), None, (12,), (12,), None]","[(6, 128)]",,"['float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'bfloat16', 'float8_e8m0', 'int64', 'bfloat16', 'float32', 'int64', 'float32']",['float32'],"['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': True, 'output_bs': 6, 'group_list_type': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 130, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 7, 12]}"
11+grouped_matmul_finalize_routing_kernel_int8_int8_float32_nz_wt_g1_s0719,grouped_matmul_finalize_routing,"[(12, 128), (3, 4, 8, 16, 32), (3, 1, 128), (3, 128), None, (3,), (6, 128), (12,), (12,), None]","[(12, 128), (3, 128, 128), (3, 1, 128), (3, 128), None, (3,), (6, 128), (12,), (12,), None]","[(6, 128)]",,"['int8', 'int8', 'bfloat16', 'bfloat16', 'float32', 'int64', 'bfloat16', 'float32', 'int32', 'float32']",['float32'],"['ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dtype': 0, 'shared_input_weight': 0.5, 'shared_input_offset': 0, 'transpose_x': False, 'transpose_w': True, 'output_bs': 6, 'group_list_type': 1}","[(-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (0.25, 1), (0, 11), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('int8', 'int8'), 'sd': 'bfloat16', 'out': 'float32', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 6, 'resweight': 0.5}, 'ttk_group_list': [3, 0, 9]}"
@@ -0,0 +1,23 @@
1+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
2+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
3+# CANN Open Software License Agreement Version 2.0 (the "License").
4+# Please refer to the License for details. You may not use this file except in compliance with the License.
5+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
6+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
7+# See LICENSE in the root of the software repository for the full text of the License.
8+"""TTK ACLNN golden entry point for grouped_matmul_swiglu_quant_v2."""
9+ 
10+from pathlib import Path
11+from runpy import run_path
12+ 
13+ 
14+_SHARED = Path(__file__).resolve().parents[3] / "common/tests/ttk/fused_spec.py"
15+_make_spec = run_path(str(_SHARED))["make_spec"]
16+AclnnSpec = _make_spec("swiglu", "aclnn")
17+ 
18+ 
19+__spec__ = {
20+ "aclnnGroupedMatmulSwigluQuantV2": "AclnnSpec",
21+ "aclnnGroupedMatmulSwigluQuantWeightNzV2": "AclnnSpec",
22+ "aclnnGroupedMatmulSwigluQuantWeightNzV3": "AclnnSpec",
23+}
@@ -0,0 +1,34 @@
1+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
2+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
3+# CANN Open Software License Agreement Version 2.0 (the "License").
4+# Please refer to the License for details. You may not use this file except in compliance with the License.
5+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
6+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
7+# See LICENSE in the root of the software repository for the full text of the License.
8+"""TTK E2E golden entry point for grouped_matmul_swiglu_quant_v2."""
9+ 
10+import sys
11+from pathlib import Path
12+from runpy import run_path
13+ 
14+ 
15+_SHARED = Path(__file__).resolve().parents[3] / "common/tests/ttk/fused_spec.py"
16+_make_spec = run_path(str(_SHARED))["make_spec"]
17+sys.path.insert(0, str(_SHARED.parent))
18+try:
19+ from gmm_ttk_graph_models import SwigluGraph
20+finally:
21+ sys.path.pop(0)
22+ 
23+ 
24+E2ESpec = _make_spec("swiglu", "e2e")
25+ 
26+ 
27+class GraphSpec(E2ESpec):
28+ torch_graph = SwigluGraph
29+ 
30+ 
31+__spec__ = {
32+ "torch_npu.npu_grouped_matmul_swiglu_quant_v2": "GraphSpec",
33+ "torch.ops.cann_ops_transformer.grouped_matmul_swiglu_quant": "E2ESpec",
34+}
@@ -0,0 +1,21 @@
1+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
2+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
3+# CANN Open Software License Agreement Version 2.0 (the "License").
4+# Please refer to the License for details. You may not use this file except in compliance with the License.
5+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
6+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
7+# See LICENSE in the root of the software repository for the full text of the License.
8+"""TTK KERNEL golden entry point for grouped_matmul_swiglu_quant_v2."""
9+ 
10+from pathlib import Path
11+from runpy import run_path
12+ 
13+ 
14+_SHARED = Path(__file__).resolve().parents[3] / "common/tests/ttk/fused_spec.py"
15+_make_spec = run_path(str(_SHARED))["make_spec"]
16+KernelSpec = _make_spec("swiglu", "kernel")
17+ 
18+ 
19+__spec__ = {
20+ "grouped_matmul_swiglu_quant_v2": "KernelSpec",
21+}
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,output_inplace_indexes,scalar_dtypes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+grouped_matmul_swiglu_quant_v2_aclnn_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nd_wt_g1_s0142,aclnnGroupedMatmulSwigluQuantV2,"((7, 320), [(3, 320, 512)], [(3, 5, 512, 2)], None, None, (7, 5, 2), None, (3,), (7, 256), (7, 4, 2))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float8_e8m0', 'float32', 'int64', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None)","(None, (163840, 1, 320), (5120, 2, 10, 1), None, None, None, None, None, None, None)",,"{'dequantMode': 2, 'dequantDtype': 0, 'quantMode': 2, 'groupListType': 1, 'tuningConfigOptional': []}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0, 7), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (2, 2, 3), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 320, 512), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [2, 2, 3]}"
3+grouped_matmul_swiglu_quant_v2_aclnn_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_wt_g1_s0194,aclnnGroupedMatmulSwigluQuantWeightNzV3,"((9, 128), [(3, 128, 512)], [(3, 2, 512, 2)], None, None, (9, 2, 2), None, (3,), (9, 256), (9, 4, 2))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float8_e8m0', 'float32', 'int64', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 4, 32, 16, 32), None, None, None, None, None, None, None, None)","(None, (65536, 1, 128), (2048, 2, 4, 1), None, None, None, None, None, None, None)",,"{'dequantMode': 2, 'dequantDtype': 0, 'quantMode': 2, 'groupListType': 1, 'tuningConfigOptional': [], 'swigluMode': 2, 'clampLimit': 7.0, 'gluAlpha': 1.702, 'gluBias': 1.0, 'roundMode': 'rint', 'scaleAlg': 0, 'dstTypeMax': 0.0}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0, 9), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 3, 3), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 512), 'gltype': 1, 'mode': 2, 'alg': 0, 'dstmax': 0.0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 3, 3]}"
4+grouped_matmul_swiglu_quant_v2_aclnn_float4_e1m2_float4_e2m1_float4_e1m2_nz_nt_g0_s0228,aclnnGroupedMatmulSwigluQuantWeightNzV2,"((12, 128), [(3, 128, 128)], [(3, 2, 128, 2)], None, None, (12, 2, 2), None, (3,), (12, 64), (12, 1, 2))","('float4_e1m2', 'float4_e2m1', 'float8_e8m0', 'float32', 'float32', 'float8_e8m0', 'float32', 'int64', 'float4_e1m2', 'float8_e8m0')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 2, 8, 16, 64), None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None)",,"{'dequantMode': 2, 'dequantDtype': 0, 'quantMode': 2, 'groupListType': 0, 'tuningConfigOptional': []}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0, 12), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float4_e1m2', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'float4_e1m2', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 64, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 7, 12]}"
5+grouped_matmul_swiglu_quant_v2_aclnn_float4_e1m2_float4_e1m2_float4_e2m1_nz_wt_g0_s0238,aclnnGroupedMatmulSwigluQuantWeightNzV2,"((17, 192), [(3, 192, 256)], [(3, 3, 256, 2)], None, None, (17, 3, 2), None, (3,), (17, 128), (17, 2, 2))","('float4_e1m2', 'float4_e1m2', 'float8_e8m0', 'float32', 'float32', 'float8_e8m0', 'float32', 'int64', 'float4_e2m1', 'float8_e8m0')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 3, 16, 16, 64), None, None, None, None, None, None, None, None)","(None, (49152, 1, 192), (1536, 2, 6, 1), None, None, None, None, None, None, None)",,"{'dequantMode': 2, 'dequantDtype': 0, 'quantMode': 2, 'groupListType': 0, 'tuningConfigOptional': []}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0, 12), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (6, 6, 5), 'types': ('float4_e1m2', 'float4_e1m2'), 'sd': 'float8_e8m0', 'out': 'float4_e2m1', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 64, 'shape': (3, 192, 256), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [6, 12, 17]}"
6+grouped_matmul_swiglu_quant_v2_aclnn_hifloat8_hifloat8_hifloat8_nz_nt_g1_s0297,aclnnGroupedMatmulSwigluQuantWeightNzV2,"((12, 128), [(3, 128, 128)], [(3, 128)], None, None, (12,), None, (3,), (12, 64), (12,))","('hifloat8', 'hifloat8', 'bfloat16', 'float32', 'float32', 'float32', 'float32', 'int64', 'hifloat8', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 4, 8, 16, 32), None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None)",,"{'dequantMode': 0, 'dequantDtype': 0, 'quantMode': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('hifloat8', 'hifloat8'), 'sd': 'bfloat16', 'out': 'hifloat8', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
7+grouped_matmul_swiglu_quant_v2_aclnn_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_nt_g0_s0618,aclnnGroupedMatmulSwigluQuantWeightNzV2,"((12, 130), [(3, 130, 128)], [(3, 3, 128, 2)], None, None, (12, 3, 2), None, (3,), (12, 64), (12, 1, 2))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float8_e8m0', 'float32', 'int64', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 4, 9, 16, 32), None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None)",,"{'dequantMode': 2, 'dequantDtype': 0, 'quantMode': 2, 'groupListType': 0, 'tuningConfigOptional': []}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0, 12), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 130, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 7, 12]}"
8+grouped_matmul_swiglu_quant_v2_aclnn_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_nt_g1_s0629,aclnnGroupedMatmulSwigluQuantWeightNzV3,"((2049, 256), [(3, 256, 512)], [(3, 4, 512, 2)], None, None, (2049, 4, 2), None, (3,), (2049, 256), (2049, 4, 2))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float8_e8m0', 'float32', 'int64', 'float8_e4m3fn', 'float8_e8m0')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 16, 16, 16, 32), None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None)",,"{'dequantMode': 2, 'dequantDtype': 0, 'quantMode': 2, 'groupListType': 1, 'tuningConfigOptional': [], 'swigluMode': 2, 'clampLimit': 7.0, 'gluAlpha': 1.702, 'gluBias': 1.0, 'roundMode': 'rint', 'scaleAlg': 1, 'dstTypeMax': 0.0}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (0, 2049), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (683, 0, 1366), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 256, 512), 'gltype': 1, 'mode': 2, 'alg': 1, 'dstmax': 0.0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [683, 0, 1366]}"
9+grouped_matmul_swiglu_quant_v2_aclnn_int8_int8_int8_nd_nt_g1_s0685,aclnnGroupedMatmulSwigluQuantV2,"((12, 128), [(3, 128, 128)], [(3, 128)], None, None, (12,), None, (3,), (12, 64), (12,))","('int8', 'int8', 'float16', 'float32', 'float32', 'float32', 'float32', 'int64', 'int8', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None)",,"{'dequantMode': 0, 'dequantDtype': 0, 'quantMode': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(8, 9)",,,"((-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('int8', 'int8'), 'sd': 'float16', 'out': 'int8', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
10+grouped_matmul_swiglu_quant_v2_aclnn_int8_int8_int8_nz_wt_g0_s0690,aclnnGroupedMatmulSwigluQuantWeightNzV2,"((31, 256), [(3, 256, 384)], [(3, 384)], None, None, (31,), None, (3,), (31, 192), (31,))","('int8', 'int8', 'float16', 'float32', 'float32', 'float32', 'float32', 'int64', 'int8', 'float32')","('ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, (3, 8, 24, 16, 32), None, None, None, None, None, None, None, None)","(None, (98304, 1, 256), None, None, None, None, None, None, None, None)",,"{'dequantMode': 0, 'dequantDtype': 0, 'quantMode': 0, 'groupListType': 0, 'tuningConfigOptional': []}","(8, 9)",,,"((-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (11, 10, 10), 'types': ('int8', 'int8'), 'sd': 'float16', 'out': 'int8', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 256, 384), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [11, 21, 31]}"
11+grouped_matmul_swiglu_quant_v2_aclnn_float8_e5m2_float8_e4m3fn_float8_e5m2_nd_nt_g1_s0747,aclnnGroupedMatmulSwigluQuantV2,"((12, 128), [(3, 128, 128)], [(3, 128)], None, None, (12,), None, (3,), (12, 64), (12,))","('float8_e5m2', 'float8_e4m3fn', 'float32', 'float32', 'float32', 'float32', 'float32', 'int64', 'float8_e5m2', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')","(None, None, None, None, None, None, None, None, None, None)","(None, None, None, None, None, None, None, None, None, None)",,"{'dequantMode': 0, 'dequantDtype': 0, 'quantMode': 0, 'groupListType': 1, 'tuningConfigOptional': []}","(8, 9)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), None, None)","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e5m2', 'float8_e4m3fn'), 'sd': 'float32', 'out': 'float8_e5m2', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+grouped_matmul_swiglu_quant_v2_e2e_float8_e4m3fn_float8_e5m2_float8_e5m2_nd_wt_g0_s0149,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((12, 128), [(3, 128, 128)], [(3, 2, 128, 2)], (12, 2, 2), (3,), None, None, None)","('float8_e4m3fn', 'float8_e5m2', 'uint8', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 2, 'dequant_dtype': 6, 'quant_mode': 2, 'quant_dtype': 291, 'group_list_type': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 255), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e4m3fn', 'float8_e5m2'), 'sd': 'float8_e8m0', 'out': 'float8_e5m2', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 3, 12]}"
3+grouped_matmul_swiglu_quant_v2_e2e_float4_e2m1_float4_e2m1_float4_e2m1_nd_nt_g1_s0173,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((12, 64), [(3, 128, 64)], [(3, 2, 128, 2)], (12, 2, 2), (3,), None, None, None)","('uint8', 'uint8', 'uint8', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 2, 'dequant_dtype': 6, 'quant_mode': 2, 'quant_dtype': 296, 'group_list_type': 1, 'weight_scale_dtype': 293, 'x_scale_dtype': 293, 'x_dtype': 296, 'weight_dtype': 296}",,"((0, 255), (0, 255), (0, 255), (0, 255), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float4_e2m1', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'float4_e2m1', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
4+grouped_matmul_swiglu_quant_v2_e2e_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_nt_g0_s0188,torch.ops.cann_ops_transformer.grouped_matmul_swiglu_quant,"((19, 256), [(3, 256, 128)], [(3, 4, 128, 2)], (19, 4, 2), (3,), None, None, None)","('float8_e4m3fn', 'float8_e4m3fn', 'uint8', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 2, 'dequant_dtype': 6, 'quant_mode': 2, 'quant_dtype': 36, 'group_list_type': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293, 'swiglu_mode': 2, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 255), (0, 19), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (6, 6, 7), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 256, 128), 'gltype': 0, 'mode': 2, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [6, 12, 19]}"
5+grouped_matmul_swiglu_quant_v2_e2e_hifloat8_hifloat8_hifloat8_nz_nt_g1_s0297,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((12, 128), [(3, 128, 128)], [(3, 128)], (12,), (3,), None, None, None)","('uint8', 'uint8', 'bfloat16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 0, 'dequant_dtype': 6, 'quant_mode': 0, 'quant_dtype': 290, 'group_list_type': 1, 'x_dtype': 290, 'weight_dtype': 290}",,"((0, 255), (0, 255), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 0, 9), 'types': ('hifloat8', 'hifloat8'), 'sd': 'bfloat16', 'out': 'hifloat8', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
6+grouped_matmul_swiglu_quant_v2_e2e_float8_e4m3fn_float4_e2m1_float8_e4m3fn_nz_wt_g0_s0604,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((12, 128), [(3, 64, 128)], [(3, 2, 128, 2)], (12, 2, 2), (3,), None, None, None)","('float8_e4m3fn', 'uint8', 'uint8', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 2, 'dequant_dtype': 6, 'quant_mode': 2, 'quant_dtype': 292, 'group_list_type': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293, 'weight_dtype': 296}",,"((-0.5, 0.5), (0, 255), (0, 255), (0, 255), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': True, 'format': 'FRACTAL_NZ_C0_32', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 7, 12]}"
7+grouped_matmul_swiglu_quant_v2_e2e_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_nt_g0_s0618,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((12, 130), [(3, 130, 128)], [(3, 3, 128, 2)], (12, 3, 2), (3,), None, None, None)","('float8_e4m3fn', 'float8_e4m3fn', 'uint8', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 2, 'dequant_dtype': 6, 'quant_mode': 2, 'quant_dtype': 292, 'group_list_type': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 255), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 130, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 7, 12]}"
8+grouped_matmul_swiglu_quant_v2_e2e_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_wt_g0_s0631,torch.ops.cann_ops_transformer.grouped_matmul_swiglu_quant,"((2049, 256), [(3, 256, 512)], [(3, 4, 512, 2)], (2049, 4, 2), (3,), None, None, None)","('float8_e4m3fn', 'float8_e4m3fn', 'uint8', 'uint8', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 2, 'dequant_dtype': 6, 'quant_mode': 2, 'quant_dtype': 36, 'group_list_type': 0, 'weight_scale_dtype': 293, 'x_scale_dtype': 293, 'swiglu_mode': 2, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 1}",,"((-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 255), (0, 2049), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (683, 0, 1366), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 256, 512), 'gltype': 0, 'mode': 2, 'alg': 1, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [683, 683, 2049]}"
9+grouped_matmul_swiglu_quant_v2_e2e_int8_int8_int8_nd_nt_g0_s0684,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((12, 128), [(3, 128, 128)], [(3, 128)], (12,), (3,), None, None, None)","('int8', 'int8', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 0, 'dequant_dtype': 6, 'quant_mode': 0, 'quant_dtype': 1, 'group_list_type': 0}",,"((-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (3, 4, 5), 'types': ('int8', 'int8'), 'sd': 'float16', 'out': 'int8', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 7, 12]}"
10+grouped_matmul_swiglu_quant_v2_e2e_int8_int8_int8_nz_wt_g0_s0690,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((31, 256), [(3, 256, 384)], [(3, 384)], (31,), (3,), None, None, None)","('int8', 'int8', 'float16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 0, 'dequant_dtype': 6, 'quant_mode': 0, 'quant_dtype': 1, 'group_list_type': 0}",,"((-3, 3), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (11, 10, 10), 'types': ('int8', 'int8'), 'sd': 'float16', 'out': 'int8', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 256, 384), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [11, 21, 31]}"
11+grouped_matmul_swiglu_quant_v2_e2e_float8_e5m2_float8_e4m3fn_float8_e5m2_nd_wt_g0_s0756,torch_npu.npu_grouped_matmul_swiglu_quant_v2,"((31, 256), [(3, 256, 384)], [(3, 384)], (31,), (3,), None, None, None)","('float8_e5m2', 'float8_e4m3fn', 'bfloat16', 'float32', 'int64', 'float32', 'float32', 'float32')","('ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND')",,,,"{'dequant_mode': 0, 'dequant_dtype': 6, 'quant_mode': 0, 'quant_dtype': 291, 'group_list_type': 0}",,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_reference': {'counts': (11, 10, 10), 'types': ('float8_e5m2', 'float8_e4m3fn'), 'sd': 'bfloat16', 'out': 'float8_e5m2', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 256, 384), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [11, 21, 31]}"
@@ -0,0 +1,11 @@
1+testcase_name,op_name,input_shapes,input_ori_shapes,output_shapes,output_ori_shapes,input_dtypes,output_dtypes,input_formats,input_ori_formats,output_formats,output_ori_formats,attributes,input_data_ranges,precision_tolerances,absolute_precision,is_enabled,attributes1
2+grouped_matmul_swiglu_quant_v2_kernel_float8_e5m2_float8_e4m3fn_float8_e5m2_nd_wt_g0_s0157,grouped_matmul_swiglu_quant_v2,"[(12, 128), (12, 2, 2), (3,), [(3, 128, 128)], [(3, 128, 2, 2)], [(0,)], None, None]","[(12, 128), (12, 2, 2), (3,), [(3, 128, 128)], [(3, 128, 2, 2)], [(0,)], None, None]","[(12, 64), (12, 1, 2)]",,"['float8_e5m2', 'float8_e8m0', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float32']","['float8_e5m2', 'float8_e8m0']","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 2, 'dequant_dtype': 0, 'quant_mode': 2, 'quant_dtype': 35, 'transpose_weight': True, 'group_list_type': 0, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e5m2', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e5m2', 'trans': True, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 3, 12]}"
3+grouped_matmul_swiglu_quant_v2_kernel_float4_e2m1_float4_e2m1_float4_e2m1_nd_nt_g1_s0173,grouped_matmul_swiglu_quant_v2,"[(12, 128), (12, 2, 2), (3,), [(3, 128, 128)], [(3, 2, 128, 2)], [(0,)], None, None]","[(12, 128), (12, 2, 2), (3,), [(3, 128, 128)], [(3, 2, 128, 2)], [(0,)], None, None]","[(12, 64), (12, 1, 2)]",,"['float4_e2m1', 'float8_e8m0', 'int64', 'float4_e2m1', 'float8_e8m0', 'float32', 'float32', 'float32']","['float4_e2m1', 'float8_e8m0']","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 2, 'dequant_dtype': 0, 'quant_mode': 2, 'quant_dtype': 40, 'transpose_weight': False, 'group_list_type': 1, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float4_e2m1', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'float4_e2m1', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
4+grouped_matmul_swiglu_quant_v2_kernel_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_nt_g1_s0190,grouped_matmul_swiglu_quant_v2,"[(31, 192), (31, 3, 2), (3,), [(3, 8, 12, 16, 32)], [(3, 3, 256, 2)], [(0,)], None, None]","[(31, 192), (31, 3, 2), (3,), [(3, 192, 256)], [(3, 3, 256, 2)], [(0,)], None, None]","[(31, 128), (31, 2, 2)]",,"['float8_e4m3fn', 'float8_e8m0', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float32']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 2, 'dequant_dtype': 0, 'quant_mode': 2, 'quant_dtype': 36, 'transpose_weight': False, 'group_list_type': 1, 'swiglu_mode': 2, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-0.5, 0.5), (0.5, 1), (0, 31), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (10, 10, 11), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 192, 256), 'gltype': 1, 'mode': 2, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [10, 10, 11]}"
5+grouped_matmul_swiglu_quant_v2_kernel_float4_e1m2_float4_e2m1_float4_e1m2_nz_wt_g1_s0231,grouped_matmul_swiglu_quant_v2,"[(12, 128), (12, 2, 2), (3,), [(3, 2, 8, 16, 64)], [(3, 128, 2, 2)], [(0,)], None, None]","[(12, 128), (12, 2, 2), (3,), [(3, 128, 128)], [(3, 128, 2, 2)], [(0,)], None, None]","[(12, 64), (12, 1, 2)]",,"['float4_e1m2', 'float8_e8m0', 'int64', 'float4_e2m1', 'float8_e8m0', 'float32', 'float32', 'float32']","['float4_e1m2', 'float8_e8m0']","['ND', 'ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 2, 'dequant_dtype': 0, 'quant_mode': 2, 'quant_dtype': 41, 'transpose_weight': True, 'group_list_type': 1, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float4_e1m2', 'float4_e2m1'), 'sd': 'float8_e8m0', 'out': 'float4_e1m2', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 64, 'shape': (3, 128, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
6+grouped_matmul_swiglu_quant_v2_kernel_hifloat8_hifloat8_hifloat8_nz_nt_g0_s0296,grouped_matmul_swiglu_quant_v2,"((65, 384), (65,), (3,), [(3, 16, 24, 16, 32)], [(3, 512)], [(0,)], None, None)","((65, 384), (65,), (3,), [(3, 384, 512)], [(3, 512)], [(0,)], None, None)","[(65, 256), (65,)]",,"['hifloat8', 'float32', 'int64', 'hifloat8', 'bfloat16', 'float32', 'float32', 'float32']","['hifloat8', 'float32']","['ND', 'ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 0, 'dequant_dtype': 0, 'quant_mode': 0, 'quant_dtype': 2, 'transpose_weight': False, 'group_list_type': 0, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (22, 22, 21), 'types': ('hifloat8', 'hifloat8'), 'sd': 'bfloat16', 'out': 'hifloat8', 'trans': False, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 384, 512), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [22, 44, 65]}"
7+grouped_matmul_swiglu_quant_v2_kernel_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_wt_g1_s0621,grouped_matmul_swiglu_quant_v2,"[(12, 130), (12, 3, 2), (3,), [(3, 5, 8, 16, 32)], [(3, 128, 3, 2)], [(0,)], None, None]","[(12, 130), (12, 3, 2), (3,), [(3, 128, 130)], [(3, 128, 3, 2)], [(0,)], None, None]","[(12, 64), (12, 1, 2)]",,"['float8_e4m3fn', 'float8_e8m0', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float32']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 2, 'dequant_dtype': 0, 'quant_mode': 2, 'quant_dtype': 36, 'transpose_weight': True, 'group_list_type': 1, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-0.5, 0.5), (0.5, 1), (0, 12), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (3, 0, 9), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 130, 128), 'gltype': 1, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [3, 0, 9]}"
8+grouped_matmul_swiglu_quant_v2_kernel_float8_e4m3fn_float8_e4m3fn_float8_e4m3fn_nz_wt_g0_s0631,grouped_matmul_swiglu_quant_v2,"[(2049, 256), (2049, 4, 2), (3,), [(3, 8, 32, 16, 32)], [(3, 512, 4, 2)], [(0,)], None, None]","[(2049, 256), (2049, 4, 2), (3,), [(3, 512, 256)], [(3, 512, 4, 2)], [(0,)], None, None]","[(2049, 256), (2049, 4, 2)]",,"['float8_e4m3fn', 'float8_e8m0', 'int64', 'float8_e4m3fn', 'float8_e8m0', 'float32', 'float32', 'float32']","['float8_e4m3fn', 'float8_e8m0']","['ND', 'ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 2, 'dequant_dtype': 0, 'quant_mode': 2, 'quant_dtype': 36, 'transpose_weight': True, 'group_list_type': 0, 'swiglu_mode': 2, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 1}","[(-0.5, 0.5), (0.5, 1), (0, 2049), (-0.5, 0.5), (0.5, 1), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (683, 0, 1366), 'types': ('float8_e4m3fn', 'float8_e4m3fn'), 'sd': 'float8_e8m0', 'out': 'float8_e4m3fn', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 256, 512), 'gltype': 0, 'mode': 2, 'alg': 1, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [683, 683, 2049]}"
9+grouped_matmul_swiglu_quant_v2_kernel_int8_int8_int8_nd_nt_g0_s0684,grouped_matmul_swiglu_quant_v2,"((65, 384), (65,), (3,), [(3, 384, 512)], [(3, 512)], [(0,)], None, None)","((65, 384), (65,), (3,), [(3, 384, 512)], [(3, 512)], [(0,)], None, None)","[(65, 256), (65,)]",,"['int8', 'float32', 'int64', 'int8', 'float16', 'float32', 'float32', 'float32']","['int8', 'float32']","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 0, 'dequant_dtype': 0, 'quant_mode': 0, 'quant_dtype': 2, 'transpose_weight': False, 'group_list_type': 0, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-3, 3), (-0.5, 0.5), (0, 12), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (22, 22, 21), 'types': ('int8', 'int8'), 'sd': 'float16', 'out': 'int8', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 384, 512), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [22, 44, 65]}"
10+grouped_matmul_swiglu_quant_v2_kernel_int8_int8_int8_nz_wt_g0_s0690,grouped_matmul_swiglu_quant_v2,"((17, 192), (17,), (3,), [(3, 6, 16, 16, 32)], [(3, 256)], [(0,)], None, None)","((17, 192), (17,), (3,), [(3, 256, 192)], [(3, 256)], [(0,)], None, None)","[(17, 128), (17,)]",,"['int8', 'float32', 'int64', 'int8', 'float16', 'float32', 'float32', 'float32']","['int8', 'float32']","['ND', 'ND', 'ND', 'FRACTAL_NZ', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 0, 'dequant_dtype': 0, 'quant_mode': 0, 'quant_dtype': 2, 'transpose_weight': True, 'group_list_type': 0, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-3, 3), (-0.5, 0.5), (0, 12), (-3, 3), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (6, 6, 5), 'types': ('int8', 'int8'), 'sd': 'float16', 'out': 'int8', 'trans': True, 'format': 'FRACTAL_NZ', 'c0': 32, 'shape': (3, 192, 256), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [6, 12, 17]}"
11+grouped_matmul_swiglu_quant_v2_kernel_float8_e5m2_float8_e4m3fn_float8_e5m2_nd_nt_g0_s0746,grouped_matmul_swiglu_quant_v2,"((49, 320), (49,), (3,), [(3, 320, 192)], [(3, 192)], [(0,)], None, None)","((49, 320), (49,), (3,), [(3, 320, 192)], [(3, 192)], [(0,)], None, None)","[(49, 96), (49,)]",,"['float8_e5m2', 'float32', 'int64', 'float8_e4m3fn', 'float32', 'float32', 'float32', 'float32']","['float8_e5m2', 'float32']","['ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'dequant_mode': 0, 'dequant_dtype': 0, 'quant_mode': 0, 'quant_dtype': 35, 'transpose_weight': False, 'group_list_type': 0, 'swiglu_mode': 0, 'clamp_limit': 7.0, 'glu_alpha': 1.702, 'glu_bias': 1.0, 'scale_alg': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0, 12), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_reference': {'counts': (17, 16, 16), 'types': ('float8_e5m2', 'float8_e4m3fn'), 'sd': 'float32', 'out': 'float8_e5m2', 'trans': False, 'format': 'ND', 'c0': 32, 'shape': (3, 320, 192), 'gltype': 0, 'mode': 0, 'alg': 0, 'dstmax': 0, 'bs': 0, 'resweight': 1}, 'ttk_group_list': [17, 33, 49]}"
@@ -0,0 +1,69 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""GMMIA ACLNN inputs expose a transposed x1 view and a mutable yRef."""
13+ 
14+from pathlib import Path
15+from runpy import run_path
16+ 
17+_ASSETS = Path(__file__).resolve().parent
18+_REF = run_path(str(_ASSETS / "gmmia_reference.py"))
19+_as_array, _inplace = _REF["as_array"], _REF["inplace"]
20+_INPUTS = run_path(str(_ASSETS / "inputs.py"))
21+_prepare = _INPUTS["_prepare_gmmia_inputs"]
22+_copy_input = _INPUTS["_copy_gmmia_input"]
23+ 
24+ 
25+class AclnnSpec:
26+ @staticmethod
27+ def customize_inputs(
28+ x1,
29+ x2,
30+ scale1Optional,
31+ scale2,
32+ groupList,
33+ yRef,
34+ groupListType,
35+ groupSize,
36+ ttk_group_list=None,
37+ **kwargs,
38+ ):
39+ _prepare(x1, x2, scale1Optional, scale2, groupList, groupListType)
40+ if ttk_group_list is not None:
41+ _copy_input(groupList, ttk_group_list)
42+ 
43+ @staticmethod
44+ def golden(
45+ x1,
46+ x2,
47+ scale1Optional,
48+ scale2,
49+ groupList,
50+ yRef,
51+ groupListType,
52+ groupSize,
53+ **kwargs,
54+ ):
55+ scale1 = _as_array(scale1Optional)
56+ if scale1 is not None and scale1.ndim == 3:
57+ scale1 = scale1.swapaxes(0, 1)
58+ return _inplace(
59+ _as_array(x1).T,
60+ _as_array(x2),
61+ scale1,
62+ _as_array(scale2),
63+ _as_array(groupList),
64+ _as_array(yRef),
65+ groupListType,
66+ )
67+ 
68+ 
69+__spec__ = {"aclnnQuantGroupedMatmulInplaceAdd": "AclnnSpec"}
@@ -0,0 +1,102 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""GMMIA Torch test uses real Torch API arguments and decodes byte carriers."""
13+ 
14+import sys
15+from pathlib import Path
16+from runpy import run_path
17+ 
18+_ASSETS = Path(__file__).resolve().parent
19+_REF = run_path(str(_ASSETS / "gmmia_reference.py"))
20+_as_array, _inplace = _REF["as_array"], _REF["inplace"]
21+_prepare = run_path(str(_ASSETS / "inputs.py"))["_prepare_gmmia_inputs"]
22+ 
23+ 
24+class E2eSpec:
25+ @staticmethod
26+ def customize_inputs(
27+ input,
28+ x1,
29+ x2,
30+ x2_scale,
31+ group_list,
32+ *,
33+ x1_scale=None,
34+ group_list_type=0,
35+ x1_dtype=None,
36+ x2_dtype=None,
37+ ttk_graph_counts=None,
38+ ttk_group_list=None,
39+ **kwargs,
40+ ):
41+ _prepare(
42+ x1,
43+ x2,
44+ x1_scale,
45+ x2_scale,
46+ group_list,
47+ group_list_type,
48+ hifloat8=x1_dtype == 290,
49+ )
50+ if ttk_graph_counts is not None:
51+ counts = group_list.new_tensor(ttk_graph_counts)
52+ group_list.copy_(counts if group_list_type == 1 else counts.cumsum(0))
53+ if ttk_group_list is not None:
54+ group_list.copy_(group_list.new_tensor(ttk_group_list))
55+ 
56+ @staticmethod
57+ def golden(
58+ input,
59+ x1,
60+ x2,
61+ x2_scale,
62+ group_list,
63+ *,
64+ x1_scale=None,
65+ group_list_type=0,
66+ x1_dtype=None,
67+ x2_dtype=None,
68+ x1_scale_dtype=None,
69+ x2_scale_dtype=None,
70+ ttk_graph_counts=None,
71+ **kwargs,
72+ ):
73+ scale1 = _as_array(x1_scale, x1_scale_dtype)
74+ if ttk_graph_counts is None and scale1 is not None and scale1.ndim == 3:
75+ scale1 = scale1.swapaxes(0, 1)
76+ x1_array = _as_array(x1, x1_dtype)
77+ return _inplace(
78+ x1_array.T if ttk_graph_counts is None else x1_array,
79+ _as_array(x2, x2_dtype),
80+ scale1,
81+ _as_array(x2_scale, x2_scale_dtype),
82+ _as_array(group_list),
83+ _as_array(input),
84+ group_list_type,
85+ )
86+ 
87+ 
88+sys.path.insert(0, str(_ASSETS.parents[2] / "common/tests/ttk"))
89+try:
90+ from gmm_ttk_graph_models import InplaceGraph
91+finally:
92+ sys.path.pop(0)
93+ 
94+ 
95+class GraphSpec(E2eSpec):
96+ torch_graph = InplaceGraph
97+ 
98+ 
99+__spec__ = {
100+ "torch_npu.npu_add_quant_gmm": "E2eSpec",
101+ "torch_npu.npu_add_quant_gmm_": "GraphSpec",
102+}
@@ -0,0 +1,50 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""GMMIA kernel inputs use physical K-major matrices."""
13+ 
14+from pathlib import Path
15+from runpy import run_path
16+ 
17+_ASSETS = Path(__file__).resolve().parent
18+_REF = run_path(str(_ASSETS / "gmmia_reference.py"))
19+_as_array, _inplace = _REF["as_array"], _REF["inplace"]
20+_prepare = run_path(str(_ASSETS / "inputs.py"))["_prepare_gmmia_inputs"]
21+ 
22+ 
23+class KernelSpec:
24+ @staticmethod
25+ def customize_inputs(
26+ x1,
27+ x2,
28+ scale2,
29+ group_list,
30+ y,
31+ scale1=None,
32+ *,
33+ group_list_type=0,
34+ ttk_group_list=None,
35+ **kwargs,
36+ ):
37+ _prepare(x1, x2, scale1, scale2, group_list, group_list_type)
38+ if ttk_group_list is not None:
39+ group_list[...] = ttk_group_list
40+ return x1, x2, scale2, group_list, y, scale1
41+ 
42+ @staticmethod
43+ def golden(
44+ x1, x2, scale2, group_list, y, scale1=None, *, group_list_type=0, **kwargs
45+ ):
46+ tensors = (x1, x2, scale1, scale2, group_list, y)
47+ return _inplace(*map(_as_array, tensors), group_list_type)
48+ 
49+ 
50+__spec__ = {"quant_grouped_matmul_inplace_add": "KernelSpec"}
@@ -0,0 +1,63 @@
1+#!/usr/bin/env python3
2+# -*- coding: UTF-8 -*-
3+# ----------------------------------------------------------------------------
4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6+# CANN Open Software License Agreement Version 2.0 (the "License").
7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10+# See LICENSE in the root of the software repository for the full text of the License.
11+# ----------------------------------------------------------------------------
12+"""CPU reference shared by the three GMMIA test entry points."""
13+ 
14+import numpy as np
15+ 
16+ 
17+def as_array(value, carrier=None):
18+ if value is None:
19+ return None
20+ if hasattr(value, "detach"):
21+ value = value.detach().cpu()
22+ value = value.float() if "float8" in str(value.dtype) else value
23+ value = value.numpy()
24+ result = np.asarray(value)
25+ if carrier == 290:
26+ import en_dtypes
27+ 
28+ result = result.view(en_dtypes.hifloat8)
29+ elif carrier == 293:
30+ return np.exp2(result.astype(np.float32) - 127)
31+ return result.astype(np.float32)
32+ 
33+ 
34+def inplace(x1, x2, scale1, scale2, groups, y, group_list_type):
35+ groups = np.asarray(groups, dtype=np.int64)
36+ counts = groups if group_list_type == 1 else np.diff(np.r_[0, groups])
37+ output = y.copy()
38+ start = 0
39+ mx = scale2.ndim == 3
40+ for expert, count in enumerate(counts):
41+ stop = start + int(count)
42+ if not count:
43+ continue
44+ a, b = x1[start:stop], x2[start:stop]
45+ if mx:
46+ offset = start // 64 + expert
47+ blocks = (int(count) + 63) // 64
48+ a_scale = (
49+ scale1[offset : offset + blocks].swapaxes(1, 2).reshape(-1, a.shape[1])
50+ )
51+ b_scale = (
52+ scale2[offset : offset + blocks].swapaxes(1, 2).reshape(-1, b.shape[1])
53+ )
54+ a = a * np.repeat(a_scale, 32, axis=0)[:count]
55+ b = b * np.repeat(b_scale, 32, axis=0)[:count]
56+ output[expert] += a.T @ b
57+ else:
58+ out = (a.T @ b) * scale2[expert]
59+ if scale1 is not None:
60+ out *= scale1.reshape(-1)[expert]
61+ output[expert] += out
62+ start = stop
63+ return [output]
@@ -1,59 +1,98 @@
1-#!/usr/bin/env python31+#!/usr/bin/env python3
2-# -*- coding: UTF-8 -*-2+# -*- coding: UTF-8 -*-
3-# ----------------------------------------------------------------------------3+# ----------------------------------------------------------------------------
4-# Copyright (c) 2026 Huawei Technologies Co., Ltd.4+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
5-# This program is free software, you can redistribute it and/or modify it under the terms and conditions of5+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
6-# CANN Open Software License Agreement Version 2.0 (the "License").6+# CANN Open Software License Agreement Version 2.0 (the "License").
7-# Please refer to the License for details. You may not use this file except in compliance with the License.7+# Please refer to the License for details. You may not use this file except in compliance with the License.
8-# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,8+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
9-# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.9+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10-# See LICENSE in the root of the software repository for the full text of the License.10+# See LICENSE in the root of the software repository for the full text of the License.
11-# ----------------------------------------------------------------------------11+# ----------------------------------------------------------------------------
12-__input__ = {12+__input__ = {
13- "kernel": {13+ "kernel": {
14- "quant_grouped_matmul_inplace_add": "quant_grouped_matmul_inplace_add_inputs"14+ "quant_grouped_matmul_inplace_add": "quant_grouped_matmul_inplace_add_inputs"
15- }15+ }
16-}16+}
17- 17+ 
18-import numpy as np18+import numpy as np
19- 19+ 
20- 20+ 
21-def quant_grouped_matmul_inplace_add_inputs(21+def quant_grouped_matmul_inplace_add_inputs(
22- x1,22+ x1,
23- x2,23+ x2,
24- scale2,24+ scale2,
25- group_list,25+ group_list,
26- y,26+ y,
27- scale1=None,27+ scale1=None,
28- group_list_type: int = 0,28+ group_list_type: int = 0,
29- group_size: int = 0,29+ group_size: int = 0,
30- **kwargs,30+ **kwargs,
31-):31+):
32- input_deq_scale = scale232+ input_deq_scale = scale2
33- pertoken_scale = scale133+ pertoken_scale = scale1
34- 34+ 
35- group_list_dtype = group_list.dtype35+ group_list_dtype = group_list.dtype
36- if "group_list_expect" in kwargs:36+ if "group_list_expect" in kwargs:
37- group_list_expect = kwargs[37+ group_list_expect = kwargs[
38- "group_list_expect"38+ "group_list_expect"
39- ] # 全量化组需必传group_list_expect39+ ] # 全量化组需必传group_list_expect
40- group_list_new = group_list_expect40+ group_list_new = group_list_expect
41- else:41+ else:
42- group_list_new = group_list42+ group_list_new = group_list
43- group_list_tmp = group_list_new43+ group_list_tmp = group_list_new
44- if group_list_type == 1:44+ if group_list_type == 1:
45- group_list_tmp = np.cumsum(group_list_new)45+ group_list_tmp = np.cumsum(group_list_new)
46- if group_list_tmp[-1] > x1.shape[0]:46+ if group_list_tmp[-1] > x1.shape[0]:
47- raise Exception(47+ raise Exception(
48- "sum of grouplist: ({}) can not be greater than x1[0]: ({})".format(48+ "sum of grouplist: ({}) can not be greater than x1[0]: ({})".format(
49- group_list_tmp[-1], x1.shape[0]49+ group_list_tmp[-1], x1.shape[0]
50- )50+ )
51- )51+ )
52- return (52+ return (
53- x1,53+ x1,
54- x2,54+ x2,
55- input_deq_scale,55+ input_deq_scale,
56- np.array(group_list_new, dtype=group_list_dtype),56+ np.array(group_list_new, dtype=group_list_dtype),
57- y,57+ y,
58- pertoken_scale,58+ pertoken_scale,
59- )59+ )
60+ 
61+ 
62+def _copy_gmmia_input(target, values):
63+ if hasattr(target, "new_tensor"):
64+ target[...] = target.new_tensor(values)
65+ else:
66+ target[...] = values
67+ 
68+ 
69+def _prepare_gmmia_inputs(
70+ x1, x2, scale1, scale2, groups, group_list_type, *, hifloat8=False
71+):
72+ """Generate block-aligned groups and finite MX scales for all routes."""
73+ import math
74+ 
75+ experts = int(groups.shape[0])
76+ k = x2.shape[0]
77+ counts = np.full(experts, (k // 64 // experts) * 64, dtype=np.int64)
78+ counts[-1] += k - int(counts.sum())
79+ _copy_gmmia_input(groups, counts if group_list_type == 1 else counts.cumsum())
80+ if len(scale2.shape) == 3:
81+ for scale in (scale1, scale2):
82+ shape = tuple(scale.shape)
83+ exponents = (np.arange(math.prod(shape)).reshape(shape) % 3) - 1
84+ data = (
85+ (exponents + 127).astype(np.uint8)
86+ if str(scale.dtype).endswith("uint8")
87+ else np.exp2(exponents)
88+ )
89+ _copy_gmmia_input(scale, data)
90+ if hifloat8:
91+ import en_dtypes
92+ 
93+ for value in (x1, x2):
94+ shape = tuple(value.shape)
95+ numbers = (np.arange(math.prod(shape)).reshape(shape) % 9 - 4).astype(
96+ np.float32
97+ ) * 0.25
98+ _copy_gmmia_input(value, numbers.astype(en_dtypes.hifloat8).view(np.uint8))
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,output_inplace_indexes,scalar_dtypes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+quant_grouped_matmul_inplace_add_aclnn_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g0_s0000,aclnnQuantGroupedMatmulInplaceAdd,"((16, 256), (256, 32), (16, 7, 2), (7, 32, 2), (3,), (3, 16, 32))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'float8_e8m0', 'int64', 'float32')","('ND',)",,"((1, 16), (32, 1), (2, 32, 1), (64, 2, 1), (1,), (512, 32, 1))",,"{'groupListType': 0, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0.5, 1), (0, 256), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 128, 256]}"
3+quant_grouped_matmul_inplace_add_aclnn_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g1_s0001,aclnnQuantGroupedMatmulInplaceAdd,"((32, 320), (320, 32), (32, 8, 2), (8, 32, 2), (3,), (3, 32, 32))","('float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'float8_e8m0', 'int64', 'float32')","('ND',)",,"((1, 32), (32, 1), (2, 64, 1), (64, 2, 1), (1,), (1024, 32, 1))",,"{'groupListType': 1, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0.5, 1), (0, 320), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 192]}"
4+quant_grouped_matmul_inplace_add_aclnn_float8_e4m3fn_float8_e5m2_float32_nd_nt_g0_s0002,aclnnQuantGroupedMatmulInplaceAdd,"((48, 384), (384, 64), (48, 9, 2), (9, 64, 2), (3,), (3, 48, 64))","('float8_e4m3fn', 'float8_e5m2', 'float8_e8m0', 'float8_e8m0', 'int64', 'float32')","('ND',)",,"((1, 48), (64, 1), (2, 96, 1), (128, 2, 1), (1,), (3072, 64, 1))",,"{'groupListType': 0, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0.5, 1), (0, 384), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [128, 256, 384]}"
5+quant_grouped_matmul_inplace_add_aclnn_float8_e5m2_float8_e4m3fn_float32_nd_nt_g0_s0004,aclnnQuantGroupedMatmulInplaceAdd,"((16, 320), (320, 96), (16, 8, 2), (8, 96, 2), (3,), (3, 16, 96))","('float8_e5m2', 'float8_e4m3fn', 'float8_e8m0', 'float8_e8m0', 'int64', 'float32')","('ND',)",,"((1, 16), (96, 1), (2, 32, 1), (192, 2, 1), (1,), (1536, 96, 1))",,"{'groupListType': 0, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0.5, 1), (0, 320), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 128, 320]}"
6+quant_grouped_matmul_inplace_add_aclnn_float8_e5m2_float8_e5m2_float32_nd_nt_g1_s0007,aclnnQuantGroupedMatmulInplaceAdd,"((64, 320), (320, 32), (64, 8, 2), (8, 32, 2), (3,), (3, 64, 32))","('float8_e5m2', 'float8_e5m2', 'float8_e8m0', 'float8_e8m0', 'int64', 'float32')","('ND',)",,"((1, 64), (32, 1), (2, 128, 1), (64, 2, 1), (1,), (2048, 32, 1))",,"{'groupListType': 1, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0.5, 1), (0, 320), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 192]}"
7+quant_grouped_matmul_inplace_add_aclnn_hifloat8_hifloat8_float32_nd_nt_g0_s0008,aclnnQuantGroupedMatmulInplaceAdd,"((16, 384), (384, 64), (3, 1), (3, 1), (3,), (3, 16, 64))","('hifloat8', 'hifloat8', 'float32', 'float32', 'int64', 'float32')","('ND',)",,"((1, 16), (64, 1), (1, 1), (1, 1), (1,), (1024, 64, 1))",,"{'groupListType': 0, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 384), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [128, 256, 384]}"
8+quant_grouped_matmul_inplace_add_aclnn_hifloat8_hifloat8_float32_nd_nt_g0_s0010,aclnnQuantGroupedMatmulInplaceAdd,"((48, 320), (320, 96), (3,), (3, 1), (3,), (3, 48, 96))","('hifloat8', 'hifloat8', 'float32', 'float32', 'int64', 'float32')","('ND',)",,"((1, 48), (96, 1), (1,), (1, 1), (1,), (4608, 96, 1))",,"{'groupListType': 0, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 320), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 128, 320]}"
9+quant_grouped_matmul_inplace_add_aclnn_hifloat8_hifloat8_float32_nd_nt_g1_s0013,aclnnQuantGroupedMatmulInplaceAdd,"((32, 320), (320, 32), (3, 1), (3, 32), (3,), (3, 32, 32))","('hifloat8', 'hifloat8', 'float32', 'float32', 'int64', 'float32')","('ND',)",,"((1, 32), (32, 1), (1, 1), (32, 1), (1,), (1024, 32, 1))",,"{'groupListType': 1, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 320), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 192]}"
10+quant_grouped_matmul_inplace_add_aclnn_hifloat8_hifloat8_float32_nd_nt_g0_s0014,aclnnQuantGroupedMatmulInplaceAdd,"((48, 384), (384, 64), (3,), (3, 64), (3,), (3, 48, 64))","('hifloat8', 'hifloat8', 'float32', 'float32', 'int64', 'float32')","('ND',)",,"((1, 48), (64, 1), (1,), (64, 1), (1,), (3072, 64, 1))",,"{'groupListType': 0, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 384), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [128, 256, 384]}"
11+quant_grouped_matmul_inplace_add_aclnn_hifloat8_hifloat8_float32_nd_nt_g1_s0015,aclnnQuantGroupedMatmulInplaceAdd,"((64, 256), (256, 64), (3,), (3, 64), (3,), (3, 64, 64))","('hifloat8', 'hifloat8', 'float32', 'float32', 'int64', 'float32')","('ND',)",,"((1, 64), (64, 1), (1,), (64, 1), (1,), (4096, 64, 1))",,"{'groupListType': 1, 'groupSize': 0}","(5,)",,,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 256), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 128]}"
@@ -0,0 +1,11 @@
1+testcase_name,api_name,tensor_view_shapes,tensor_dtypes,tensor_formats,tensor_storage_shapes,tensor_view_strides,tensor_view_offsets,attributes,output_tensor_indexes,input_data_ranges,precision_tolerances,absolute_precision,attributes1
2+quant_grouped_matmul_inplace_add_e2e_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g0_s0000,torch_npu.npu_add_quant_gmm,"((3, 16, 32), (16, 256), (256, 32), (7, 32, 2), (3,), (16, 7, 2))","('float32', 'float8_e4m3fn', 'float8_e4m3fn', 'uint8', 'int64', 'uint8')","('ND',)",,"((512, 32, 1), (1, 16), (32, 1), (64, 2, 1), (1,), (2, 32, 1))",,"{'group_list_type': 0, 'x1_scale_dtype': 293, 'x2_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 256), (0, 255))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 128, 256]}"
3+quant_grouped_matmul_inplace_add_e2e_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g1_s0001,torch_npu.npu_add_quant_gmm,"((3, 32, 32), (32, 320), (320, 32), (8, 32, 2), (3,), (32, 8, 2))","('float32', 'float8_e4m3fn', 'float8_e4m3fn', 'uint8', 'int64', 'uint8')","('ND',)",,"((1024, 32, 1), (1, 32), (32, 1), (64, 2, 1), (1,), (2, 64, 1))",,"{'group_list_type': 1, 'x1_scale_dtype': 293, 'x2_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 320), (0, 255))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 192]}"
4+quant_grouped_matmul_inplace_add_e2e_float8_e4m3fn_float8_e5m2_float32_nd_nt_g0_s0002,torch_npu.npu_add_quant_gmm,"((3, 48, 64), (48, 384), (384, 64), (9, 64, 2), (3,), (48, 9, 2))","('float32', 'float8_e4m3fn', 'float8_e5m2', 'uint8', 'int64', 'uint8')","('ND',)",,"((3072, 64, 1), (1, 48), (64, 1), (128, 2, 1), (1,), (2, 96, 1))",,"{'group_list_type': 0, 'x1_scale_dtype': 293, 'x2_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 384), (0, 255))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [128, 256, 384]}"
5+quant_grouped_matmul_inplace_add_e2e_float8_e5m2_float8_e4m3fn_float32_nd_nt_g0_s0004,torch_npu.npu_add_quant_gmm,"((3, 16, 96), (16, 320), (320, 96), (8, 96, 2), (3,), (16, 8, 2))","('float32', 'float8_e5m2', 'float8_e4m3fn', 'uint8', 'int64', 'uint8')","('ND',)",,"((1536, 96, 1), (1, 16), (96, 1), (192, 2, 1), (1,), (2, 32, 1))",,"{'group_list_type': 0, 'x1_scale_dtype': 293, 'x2_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 320), (0, 255))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 128, 320]}"
6+quant_grouped_matmul_inplace_add_e2e_float8_e5m2_float8_e5m2_float32_nd_nt_g1_s0007,torch_npu.npu_add_quant_gmm,"((3, 64, 32), (64, 320), (320, 32), (8, 32, 2), (3,), (64, 8, 2))","('float32', 'float8_e5m2', 'float8_e5m2', 'uint8', 'int64', 'uint8')","('ND',)",,"((2048, 32, 1), (1, 64), (32, 1), (64, 2, 1), (1,), (2, 128, 1))",,"{'group_list_type': 1, 'x1_scale_dtype': 293, 'x2_scale_dtype': 293}",,"((-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 255), (0, 320), (0, 255))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 192]}"
7+quant_grouped_matmul_inplace_add_e2e_hifloat8_hifloat8_float32_nd_nt_g0_s0008,torch_npu.npu_add_quant_gmm,"((3, 16, 64), (16, 384), (384, 64), (3, 1), (3,), (3, 1))","('float32', 'uint8', 'uint8', 'float32', 'int64', 'float32')","('ND',)",,"((1024, 64, 1), (1, 16), (64, 1), (1, 1), (1,), (1, 1))",,"{'group_list_type': 0, 'x1_dtype': 290, 'x2_dtype': 290}",,"((-0.5, 0.5), (0, 255), (0, 255), (-0.5, 0.5), (0, 384), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [128, 256, 384]}"
8+quant_grouped_matmul_inplace_add_e2e_hifloat8_hifloat8_float32_nd_nt_g0_s0010,torch_npu.npu_add_quant_gmm,"((3, 48, 96), (48, 320), (320, 96), (3, 1), (3,), (3,))","('float32', 'uint8', 'uint8', 'float32', 'int64', 'float32')","('ND',)",,"((4608, 96, 1), (1, 48), (96, 1), (1, 1), (1,), (1,))",,"{'group_list_type': 0, 'x1_dtype': 290, 'x2_dtype': 290}",,"((-0.5, 0.5), (0, 255), (0, 255), (-0.5, 0.5), (0, 320), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 128, 320]}"
9+quant_grouped_matmul_inplace_add_e2e_hifloat8_hifloat8_float32_nd_nt_g1_s0013,torch_npu.npu_add_quant_gmm,"((3, 32, 32), (32, 320), (320, 32), (3, 32), (3,), (3, 1))","('float32', 'uint8', 'uint8', 'float32', 'int64', 'float32')","('ND',)",,"((1024, 32, 1), (1, 32), (32, 1), (32, 1), (1,), (1, 1))",,"{'group_list_type': 1, 'x1_dtype': 290, 'x2_dtype': 290}",,"((-0.5, 0.5), (0, 255), (0, 255), (-0.5, 0.5), (0, 320), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 192]}"
10+quant_grouped_matmul_inplace_add_e2e_hifloat8_hifloat8_float32_nd_nt_g0_s0014,torch_npu.npu_add_quant_gmm,"((3, 48, 64), (48, 384), (384, 64), (3, 64), (3,), (3,))","('float32', 'uint8', 'uint8', 'float32', 'int64', 'float32')","('ND',)",,"((3072, 64, 1), (1, 48), (64, 1), (64, 1), (1,), (1,))",,"{'group_list_type': 0, 'x1_dtype': 290, 'x2_dtype': 290}",,"((-0.5, 0.5), (0, 255), (0, 255), (-0.5, 0.5), (0, 384), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [128, 256, 384]}"
11+quant_grouped_matmul_inplace_add_e2e_hifloat8_hifloat8_float32_nd_nt_g1_s0015,torch_npu.npu_add_quant_gmm,"((3, 64, 64), (64, 256), (256, 64), (3, 64), (3,), (3,))","('float32', 'uint8', 'uint8', 'float32', 'int64', 'float32')","('ND',)",,"((4096, 64, 1), (1, 64), (64, 1), (64, 1), (1,), (1,))",,"{'group_list_type': 1, 'x1_dtype': 290, 'x2_dtype': 290}",,"((-0.5, 0.5), (0, 255), (0, 255), (-0.5, 0.5), (0, 256), (-0.5, 0.5))","((0.001,0.001),)","(0.001,)","{'ttk_group_list': [64, 64, 128]}"
@@ -0,0 +1,11 @@
1+testcase_name,op_name,input_shapes,input_ori_shapes,output_shapes,output_ori_shapes,input_dtypes,output_dtypes,input_formats,input_ori_formats,output_formats,output_ori_formats,attributes,input_data_ranges,precision_tolerances,absolute_precision,is_enabled,attributes1
2+quant_grouped_matmul_inplace_add_kernel_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g0_s0000,quant_grouped_matmul_inplace_add,"[(256, 16), (256, 32), (7, 32, 2), (3,), (3, 16, 32), (7, 16, 2)]","[(256, 16), (256, 32), (7, 32, 2), (3,), (3, 16, 32), (7, 16, 2)]","[(3, 16, 32)]",,"['float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'int64', 'float32', 'float8_e8m0']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 0, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 256), (-0.5, 0.5), (0.5, 1)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [64, 128, 256]}"
3+quant_grouped_matmul_inplace_add_kernel_float8_e4m3fn_float8_e4m3fn_float32_nd_nt_g1_s0001,quant_grouped_matmul_inplace_add,"[(320, 32), (320, 32), (8, 32, 2), (3,), (3, 32, 32), (8, 32, 2)]","[(320, 32), (320, 32), (8, 32, 2), (3,), (3, 32, 32), (8, 32, 2)]","[(3, 32, 32)]",,"['float8_e4m3fn', 'float8_e4m3fn', 'float8_e8m0', 'int64', 'float32', 'float8_e8m0']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 1, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 320), (-0.5, 0.5), (0.5, 1)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [64, 64, 192]}"
4+quant_grouped_matmul_inplace_add_kernel_float8_e4m3fn_float8_e5m2_float32_nd_nt_g0_s0002,quant_grouped_matmul_inplace_add,"[(384, 48), (384, 64), (9, 64, 2), (3,), (3, 48, 64), (9, 48, 2)]","[(384, 48), (384, 64), (9, 64, 2), (3,), (3, 48, 64), (9, 48, 2)]","[(3, 48, 64)]",,"['float8_e4m3fn', 'float8_e5m2', 'float8_e8m0', 'int64', 'float32', 'float8_e8m0']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 0, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 384), (-0.5, 0.5), (0.5, 1)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [128, 256, 384]}"
5+quant_grouped_matmul_inplace_add_kernel_float8_e5m2_float8_e4m3fn_float32_nd_nt_g0_s0004,quant_grouped_matmul_inplace_add,"[(320, 16), (320, 96), (8, 96, 2), (3,), (3, 16, 96), (8, 16, 2)]","[(320, 16), (320, 96), (8, 96, 2), (3,), (3, 16, 96), (8, 16, 2)]","[(3, 16, 96)]",,"['float8_e5m2', 'float8_e4m3fn', 'float8_e8m0', 'int64', 'float32', 'float8_e8m0']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 0, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 320), (-0.5, 0.5), (0.5, 1)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [64, 128, 320]}"
6+quant_grouped_matmul_inplace_add_kernel_float8_e5m2_float8_e5m2_float32_nd_nt_g1_s0007,quant_grouped_matmul_inplace_add,"[(320, 64), (320, 32), (8, 32, 2), (3,), (3, 64, 32), (8, 64, 2)]","[(320, 64), (320, 32), (8, 32, 2), (3,), (3, 64, 32), (8, 64, 2)]","[(3, 64, 32)]",,"['float8_e5m2', 'float8_e5m2', 'float8_e8m0', 'int64', 'float32', 'float8_e8m0']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 1, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (0.5, 1), (0, 320), (-0.5, 0.5), (0.5, 1)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [64, 64, 192]}"
7+quant_grouped_matmul_inplace_add_kernel_hifloat8_hifloat8_float32_nd_nt_g0_s0008,quant_grouped_matmul_inplace_add,"[(384, 16), (384, 64), (3, 1), (3,), (3, 16, 64), (3, 1)]","[(384, 16), (384, 64), (3, 1), (3,), (3, 16, 64), (3, 1)]","[(3, 16, 64)]",,"['hifloat8', 'hifloat8', 'float32', 'int64', 'float32', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 0, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 384), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [128, 256, 384]}"
8+quant_grouped_matmul_inplace_add_kernel_hifloat8_hifloat8_float32_nd_nt_g0_s0010,quant_grouped_matmul_inplace_add,"[(320, 48), (320, 96), (3, 1), (3,), (3, 48, 96), (3,)]","[(320, 48), (320, 96), (3, 1), (3,), (3, 48, 96), (3,)]","[(3, 48, 96)]",,"['hifloat8', 'hifloat8', 'float32', 'int64', 'float32', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 0, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 320), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [64, 128, 320]}"
9+quant_grouped_matmul_inplace_add_kernel_hifloat8_hifloat8_float32_nd_nt_g1_s0013,quant_grouped_matmul_inplace_add,"[(320, 32), (320, 32), (3, 32), (3,), (3, 32, 32), (3, 1)]","[(320, 32), (320, 32), (3, 32), (3,), (3, 32, 32), (3, 1)]","[(3, 32, 32)]",,"['hifloat8', 'hifloat8', 'float32', 'int64', 'float32', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 1, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 320), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [64, 64, 192]}"
10+quant_grouped_matmul_inplace_add_kernel_hifloat8_hifloat8_float32_nd_nt_g0_s0014,quant_grouped_matmul_inplace_add,"[(384, 48), (384, 64), (3, 64), (3,), (3, 48, 64), (3,)]","[(384, 48), (384, 64), (3, 64), (3,), (3, 48, 64), (3,)]","[(3, 48, 64)]",,"['hifloat8', 'hifloat8', 'float32', 'int64', 'float32', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 0, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 384), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [128, 256, 384]}"
11+quant_grouped_matmul_inplace_add_kernel_hifloat8_hifloat8_float32_nd_nt_g1_s0015,quant_grouped_matmul_inplace_add,"[(256, 64), (256, 64), (3, 64), (3,), (3, 64, 64), (3,)]","[(256, 64), (256, 64), (3, 64), (3,), (3, 64, 64), (3,)]","[(3, 64, 64)]",,"['hifloat8', 'hifloat8', 'float32', 'int64', 'float32', 'float32']",['float32'],"['ND', 'ND', 'ND', 'ND', 'ND', 'ND']",,"('ND',)",,"{'group_list_type': 1, 'group_size': 0}","[(-0.5, 0.5), (-0.5, 0.5), (-0.5, 0.5), (0, 256), (-0.5, 0.5), (-0.5, 0.5)]","((0.001,0.001),)","(0.001,)",,"{'ttk_group_list': [64, 64, 128]}"