| { |
| "op": "ai.onnx.GlobalLpPool", |
| "cases": [ |
| { |
| "name": "dispatch_cliff_rank3_ncl1d", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 16776961, 1], |
| "data": { "kind": "linspace", "start": -1.0, "end": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 16776961, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "rank3_lp2", |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 4], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, -1.0, -2.0, -3.0, -4.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "f32_p2_rank3_tiny_square_norm_gpu_gap", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/pool_op_test.cc", |
| "test": "PoolTest.GlobalLpPool", |
| "notes": "Tiny normal spatial values square to subnormals; GlobalLpPool p=2 should preserve the resulting tiny nonzero norm." |
| }, |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 4], |
| "data": { "kind": "values", "values": [1e-20, -1e-20, 2e-20, -2e-20] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 1e-25 } }, |
| "skipGpu": { |
| "category": "permanent", |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes f32 subnormals to zero (FTZ); subnormal-magnitude values cannot survive the GPU arithmetic path." |
| } |
| }, |
| { |
| "name": "f32_p2_rank3_tiny_square_norm_plane_parallel_gpu_gap", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/pool_op_test.cc", |
| "test": "PoolTest.GlobalLpPool", |
| "notes": "Large compact-cycle version of the tiny-square edge to select the workgroup-parallel spatial-plane reduction variant." |
| }, |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1024], |
| "data": { "kind": "cycle", "values": [1e-20, -1e-20, 2e-20, -2e-20] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1], "tolerance": 1e-23 } }, |
| "skipGpu": { |
| "category": "permanent", |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes f32 subnormals to zero (FTZ); subnormal-magnitude values cannot survive the GPU arithmetic path." |
| } |
| }, |
| { |
| "name": "rank4_lp3", |
| "attrs": { "p": 3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 2, 2], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, -1.0, -2.0, -3.0, -4.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "f32_p2_rank4_tiny_square_norm_gpu_gap", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/pool_op_test.cc", |
| "test": "PoolTest.GlobalLpPool", |
| "notes": "Rank-4 variant of the tiny-square GlobalLpPool edge, covering the workgroup-parallel spatial-plane reduction path." |
| }, |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 2], |
| "data": { "kind": "values", "values": [1e-20, -1e-20, 2e-20, -2e-20] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1], "tolerance": 1e-25 } }, |
| "skipGpu": { |
| "category": "permanent", |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes f32 subnormals to zero (FTZ); subnormal-magnitude values cannot survive the GPU arithmetic path." |
| } |
| }, |
| { |
| "name": "f32_p2_rank5_tiny_square_norm_gpu_gap", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/pool_op_test.cc", |
| "test": "PoolTest.GlobalLpPool", |
| "notes": "Rank-5/volumetric version of the tiny-square GlobalLpPool p=2 edge for the NCDHW kernel." |
| }, |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 1, 2], |
| "data": { "kind": "values", "values": [1e-20, -1e-20, 2e-20, -2e-20] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1, 1], "tolerance": 1e-25 } }, |
| "skipGpu": { |
| "category": "permanent", |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes f32 subnormals to zero (FTZ); subnormal-magnitude values cannot survive the GPU arithmetic path." |
| } |
| }, |
| { |
| "name": "rank5_lp1", |
| "attrs": { "p": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 2, 2, 2], |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 1, 1, 1, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "float16_rank4", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 1, 2, 2], |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 1, 1, 1], "tolerance": 0.01 } } |
| }, |
| { |
| "name": "rank3_lp3_mixed_sign", |
| "attrs": { "p": 3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 3], |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 0.5, -1.5] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "rank5_lp2_two_channels", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2, 2], |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, -0.5, 0.25, -0.75, 1.25] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "zero_batch_dim_rank4", |
| "attrs": { "p": 2 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [0, 2, 3, 4], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [0, 2, 1, 1], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_rank4_lp3_1x3x9x9_generated", |
| "attrs": { "p": 3 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/pool_op_test.cc", |
| "test": "PoolTest.GlobalLpPool", |
| "notes": "Uses the ORT rank-4 p=3 shape; fixture values are generated deterministically." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 3, 9, 9], |
| "data": { "kind": "fillFloat32", "sinStep": 0.023, "cosStep": 0.031, "scale": 1.2 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 3, 1, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "ort_rank4_lp3_1x3x9x9_exact", |
| "attrs": { "p": 3 }, |
| "provenance": { "source": "onnxruntime/test/providers/cpu/nn/pool_op_test.cc", "test": "PoolTest.GlobalLpPool" }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 3, 9, 9], |
| "data": { |
| "kind": "values", |
| "values": [0.6884586215019226, 0.8835647106170654, 0.7825415730476379, 0.300049364566803, 0.8066387176513672, 0.45208504796028137, 0.5989591479301453, 0.45971131324768066, 0.8161861896514893, 0.7667262554168701, 0.8401980400085449, 0.583297073841095, 0.7088586688041687, 0.4728293716907501, 0.4992314875125885, 0.2504110038280487, 0.3881411850452423, 0.5173988938331604, 0.6571924090385437, 0.7325098514556885, 0.10206781327724457, 0.2179393768310547, 0.061604347079992294, 0.4759921431541443, 0.737536609172821, 0.9689886569976807, 0.44740939140319824, 0.4323260486125946, 0.6489178538322449, 0.7014541029930115, 0.10763957351446152, 0.8111984133720398, 0.7252692580223083, 0.7497208118438721, 0.3340204060077667, 0.8761129379272461, 0.6691205501556396, 0.8718963861465454, 0.97123783826828, 0.11620916426181793, 0.02490195631980896, 0.7521408200263977, 0.8655411601066589, 0.015474068932235241, 0.5126011371612549, 0.45315420627593994, 0.19255736470222473, 0.9840854406356812, 0.14754636585712433, 0.5499097108840942, 0.9033820033073425, 0.2905881404876709, 0.33750665187835693, 0.32322797179222107, 0.07346880435943604, 0.3991589844226837, 0.9030370116233826, 0.08329074829816818, 0.2085021287202835, 0.059713080525398254, 0.48103055357933044, 0.08778301626443863, 0.29520073533058167, 0.2153458297252655, 0.40492334961891174, 0.7175214290618896, 0.872620165348053, 0.522788941860199, 0.4351917505264282, 0.019317518919706345, 0.8467802405357361, 0.5219886302947998, 0.24285608530044556, 0.20035073161125183, 0.8327982425689697, 0.1893487423658371, 0.9172758460044861, 0.6583574414253235, 0.8474289774894714, 0.8142632246017456, 0.036692313849925995, 0.1322665810585022, 0.3570862412452698, 0.474519282579422, 0.8218869566917419, 0.2454545795917511, 0.1065533459186554, 0.7913451790809631, 0.5453705787658691, 0.3979628086090088, 0.4918094873428345, 0.1297818124294281, 0.3647603988647461, 0.3085542619228363, 0.8999581933021545, 0.4159581661224365, 0.67530757188797, 0.8294721245765686, 0.20648422837257385, 0.6401692628860474, 0.20317254960536957, 0.6165746450424194, 0.2908112406730652, 0.2666522264480591, 0.3393469750881195, 0.2539980709552765, 0.7910148501396179, 0.9401792883872986, 0.8278800845146179, 0.4609597325325012, 0.6316550970077515, 0.1342843472957611, 0.5830488801002502, 0.4310896396636963, 0.0702604278922081, 0.5185096859931946, 0.25507622957229614, 0.5888392329216003, 0.13979454338550568, 0.8168101906776428, 0.5061421394348145, 0.7805384993553162, 0.708918571472168, 0.7752029299736023, 0.33364391326904297, 0.21829630434513092, 0.7948611378669739, 0.44059377908706665, 0.5108671188354492, 0.0596190020442009, 0.6260032653808594, 0.8312370181083679, 0.7752639651298523, 0.4801369905471802, 0.9883042573928833, 0.5461161136627197, 0.054508741945028305, 0.06787396222352982, 0.3347983956336975, 0.08353104442358017, 0.14193317294120789, 0.6212488412857056, 0.42152759432792664, 0.3494303822517395, 0.6452286839485168, 0.15098969638347626, 0.7897171974182129, 0.5964879989624023, 0.3775124251842499, 0.27671632170677185, 0.5582303404808044, 0.9918634295463562, 0.8135614991188049, 0.7959882020950317, 0.5672950744628906, 0.47741463780403137, 0.35102495551109314, 0.6810964941978455, 0.7458370327949524, 0.681192934513092, 0.8808488845825195, 0.5299564599990845, 0.0872398093342781, 0.4141928553581238, 0.5393128991127014, 0.2307984083890915, 0.5480776429176331, 0.3750600516796112, 0.36283960938453674, 0.07888033241033554, 0.9526344537734985, 0.4105144739151001, 0.8201938271522522, 0.4604322016239166, 0.3603973090648651, 0.5672309398651123, 0.685865581035614, 0.7147781848907471, 0.7721352577209473, 0.6234920620918274, 0.76322340965271, 0.8771093487739563, 0.09630901366472244, 0.2155420333147049, 0.2544712424278259, 0.5802732706069946, 0.37544989585876465, 0.7171369194984436, 0.29953980445861816, 0.9312843680381775, 0.011751591227948666, 0.07255984842777252, 0.8791846036911011, 0.029552677646279335, 0.8891265988349915, 0.032955195754766464, 0.23701806366443634, 0.5436298847198486, 0.4716108739376068, 0.13113734126091003, 0.9832785725593567, 0.5719168782234192, 0.7398638129234314, 0.28372323513031006, 0.1824243813753128, 0.5222705006599426, 0.8801892399787903, 0.5303478837013245, 0.30227503180503845, 0.021251777186989784, 0.7670601606369019, 0.6664378046989441, 0.5887668132781982, 0.38170126080513, 0.06976107507944107, 0.13000230491161346, 0.37999680638313293, 0.9277410507202148, 0.2970103323459625, 0.28850170969963074, 0.6447553038597107, 0.4826243221759796, 0.02549990825355053, 0.8459779620170593, 0.13548126816749573, 0.5900106430053711, 0.7866196036338806, 0.8087874054908752, 0.8509693741798401, 0.8646358847618103, 0.9816544055938721, 0.7042203545570374, 0.4063292145729065, 0.42307162284851074, 0.4103575348854065, 0.7462520599365234, 0.25194817781448364, 0.3785230815410614, 0.7043213248252869, 0.0714503824710846, 0.9066277146339417, 0.03337198123335838, 0.6540770530700684] |
| } |
| } |
| }, |
| "outputs": { |
| "y": { |
| "dtype": "float32", |
| "shape": [1, 3, 1, 1], |
| "tolerance": 0.0001, |
| "data": { "kind": "values", "values": [2.757666826248169, 2.6182243824005127, 2.6822762489318848] } |
| } |
| } |
| }, |
| { |
| "name": "ort_rank3_lp4_mixed_magnitudes", |
| "attrs": { "p": 4 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/nn/pool_op_test.cc", |
| "test": "PoolTest.GlobalLpPool", |
| "notes": "Additional rank-3 case for the same global Lp contract, with signed values and a larger p." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 2, 5], |
| "data": { |
| "kind": "values", |
| "values": [0.0, -1.0, 2.0, -3.0, 4.0, 8.0, -0.5, 0.25, -0.125, 0.0625, -10.0, 10.0, -10.0, 10.0, -10.0, 0.001, -0.002, 0.003, -0.004, 0.005] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "wg_parallel_p2_32x32_plane_path", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 32, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.17 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "wg_parallel_p3_9x9_scalar_path", |
| "attrs": { "p": 3 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 2, 9, 9], |
| "data": { "kind": "fillFloat32", "sinStep": 0.31, "cosStep": 0.07 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [2, 2, 1, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "wg_parallel_float16_32x32_plane_path", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [1, 2, 32, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.21, "cosStep": 0.11 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float16", "shape": [1, 2, 1, 1], "tolerance": 0.01, "relTolerance": 0.002 } } |
| }, |
| { |
| "name": "rank4_p2_all_zeros_l2_norm_zero", |
| "attrs": { "p": 2 }, |
| "inputs": { "x": { "dtype": "float32", "shape": [1, 2, 4, 4], "data": { "kind": "constant", "value": 0.0 } } }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank4_p2_perf_floor_boundary_inner1024", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 32, 32], |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.11, "scale": 1.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1], "tolerance": 0.001 } } |
| }, |
| { |
| "name": "rank3_p1_mixed_sign_ncl1d_sum_abs", |
| "attrs": { "p": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 6], |
| "data": { "kind": "values", "values": [3.0, -4.0, 0.0, -1.0, 2.0, -5.0, -2.0, 0.5, -0.5, 1.5, 3.0, -3.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.0001 } } |
| }, |
| { |
| "name": "rank6_four_spatial_dims", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 2, 2, 2, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.29, "scale": 2.0 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1, 1, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "rank8_six_spatial_dims", |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 2, 2, 2, 2, 2, 2], |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.27 } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1, 1, 1, 1, 1, 1], "tolerance": 0.00001 } } |
| }, |
| { |
| "name": "rank3_p2_unaligned_spatial_plane_parallel", |
| "provenance": { |
| "notes": "p=2 over five values per plane exercises the scalar plane-parallel sum-of-squares path because the spatial extent is not divisible by four." |
| }, |
| "attrs": { "p": 2 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 2, 5], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 2.0, 3.0, 4.0, 5.0, 6.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.00001 } } |
| } |
| ] |
| } |
|
|