Skip to content

Commit

Permalink
feat: added hardmax support
Browse files Browse the repository at this point in the history
  • Loading branch information
0xThemis committed Feb 16, 2024
1 parent 6073659 commit 62d5d36
Show file tree
Hide file tree
Showing 21 changed files with 7,293 additions and 2 deletions.
299 changes: 299 additions & 0 deletions mlir-assigner/tests/Ops/Onnx/Hardmax/HardMaxAxis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
[
{
"memref": {
"idx": 0,
"data": [
0.9140777587890625,
0.1704864501953125,
0.99530029296875,
0.373138427734375,
0.5971527099609375,
0.63568115234375,
0.4238433837890625,
0.4159088134765625,
0.2638092041015625,
0.8232574462890625,
0.4419097900390625,
0.9742584228515625,
0.5850982666015625,
0.58526611328125,
0.8493194580078125,
0.2359771728515625,
0.6679229736328125,
0.35284423828125,
0.9081878662109375,
0.2730255126953125,
0.500518798828125,
0.7090301513671875,
0.388214111328125,
0.30413818359375,
0.176849365234375,
0.495635986328125,
0.615936279296875,
0.1306915283203125,
0.2936859130859375,
0.14044189453125,
0.1886444091796875,
0.014678955078125,
0.624664306640625,
0.5255584716796875,
0.7332000732421875,
0.467987060546875,
0.442474365234375,
0.6961669921875,
0.3968505859375,
0.768829345703125,
0.588409423828125,
0.306915283203125,
0.583099365234375,
0.8094024658203125,
0.281585693359375,
0.8311767578125,
0.11663818359375,
0.8120574951171875,
0.791229248046875,
0.95953369140625,
0.0140228271484375,
0.0230712890625,
0.130645751953125,
0.287994384765625,
0.9551544189453125,
0.0772552490234375,
0.2708892822265625,
0.4594268798828125,
0.2217559814453125,
0.9253692626953125,
0.8081817626953125,
0.7235260009765625,
0.9437255859375,
0.6488037109375,
0.8079833984375,
0.7815093994140625,
0.764678955078125,
0.231048583984375,
0.1934814453125,
0.8639068603515625,
0.35546875,
0.9225921630859375,
0.056732177734375,
0.9387359619140625,
0.8097686767578125,
0.6623382568359375,
0.8279266357421875,
0.4706268310546875,
0.6686553955078125,
0.6143341064453125,
0.5374908447265625,
0.763275146484375,
0.640380859375,
0.3063507080078125,
0.0831756591796875,
0.526397705078125,
0.366058349609375,
0.7732086181640625,
0.05450439453125,
0.013763427734375,
0.7147216796875,
0.094451904296875,
0.5218963623046875,
0.144317626953125,
0.9814300537109375,
0.9854583740234375,
0.162139892578125,
0.7080078125,
0.7076873779296875,
0.40155029296875,
0.15948486328125,
0.9152374267578125,
0.2214813232421875,
0.1949005126953125,
0.69232177734375,
0.273223876953125,
0.7491302490234375,
0.320709228515625,
0.197509765625,
0.581817626953125,
0.969390869140625,
0.5004425048828125,
0.9161834716796875,
0.5880126953125,
0.8472747802734375,
0.159698486328125,
0.365447998046875,
0.2691802978515625,
0.056915283203125,
0.715240478515625,
0.0731201171875,
0.3178863525390625,
0.8467864990234375,
0.5759735107421875,
0.724273681640625,
0.475616455078125,
0.8054046630859375,
0.015289306640625,
0.9693450927734375,
0.565093994140625,
0.7289886474609375,
0.208038330078125,
0.4855804443359375,
0.538665771484375,
0.177337646484375,
0.0084228515625,
0.5540008544921875,
0.446624755859375,
0.6407318115234375,
0.0675201416015625,
0.846221923828125,
0.8089141845703125,
0.61102294921875,
0.533935546875,
0.3608551025390625,
0.06085205078125,
0.9679412841796875,
0.8617095947265625,
0.3392486572265625,
0.7464599609375,
0.9517822265625,
0.4428253173828125,
0.472076416015625,
0.50323486328125,
0.618377685546875,
0.07415771484375,
0.3004913330078125,
0.8609619140625,
0.600006103515625,
0.0243377685546875,
0.59649658203125,
0.9458160400390625,
0.0792083740234375,
0.9514007568359375,
0.652801513671875,
0.72723388671875,
0.5078582763671875,
0.9408416748046875,
0.210662841796875,
0.0450592041015625,
0.323455810546875,
0.784423828125,
0.0297393798828125,
0.9656829833984375,
0.884307861328125,
0.1478729248046875,
0.8784637451171875,
0.2187347412109375,
0.1146087646484375,
0.058013916015625,
0.55194091796875,
0.7667999267578125,
0.8320465087890625,
0.059112548828125,
0.7152557373046875,
0.285430908203125,
0.452880859375,
0.465972900390625,
0.446746826171875,
0.7845306396484375,
0.12103271484375,
0.3704681396484375,
0.412506103515625,
0.473602294921875,
0.192047119140625,
0.7232666015625,
0.8148193359375,
0.2699127197265625,
0.6381988525390625,
0.2804107666015625,
0.0704498291015625,
0.2907867431640625,
0.367218017578125,
0.17877197265625,
0.989410400390625,
0.74273681640625,
0.1564178466796875,
0.114410400390625,
0.705963134765625,
0.31927490234375,
0.294647216796875,
0.874114990234375,
0.74365234375,
0.2115020751953125,
0.8684234619140625,
0.6431732177734375,
0.172332763671875,
0.1166839599609375,
0.050018310546875,
0.6373138427734375,
0.6647796630859375,
0.2049407958984375,
0.7107391357421875,
0.5825042724609375,
0.08087158203125,
0.7093505859375,
0.73321533203125,
0.8876800537109375,
0.377105712890625,
0.9251708984375,
0.5925140380859375,
0.4008636474609375,
0.2623291015625,
0.63641357421875,
0.1988677978515625,
0.9503936767578125,
0.8274383544921875,
0.7598114013671875,
0.195465087890625,
0.092193603515625,
0.882080078125,
0.7260894775390625,
0.488555908203125,
0.405517578125,
0.3295135498046875,
0.0787200927734375,
0.7992095947265625,
0.2219085693359375,
0.266448974609375,
0.4081268310546875,
0.9383392333984375,
0.6509552001953125,
0.8988189697265625,
0.6272430419921875,
0.445281982421875,
0.2870330810546875,
0.3850555419921875,
0.764190673828125,
0.044830322265625,
0.962646484375,
0.2436981201171875,
0.41595458984375,
0.621978759765625,
0.434967041015625,
0.36041259765625,
0.1234130859375,
0.1075897216796875,
0.074371337890625,
0.469085693359375,
0.5792694091796875,
0.620330810546875,
0.73297119140625,
0.66534423828125,
0.3993072509765625,
0.8768157958984375,
0.89385986328125,
0.142974853515625,
0.8801727294921875,
0.6700439453125,
0.9520263671875,
0.3358917236328125,
0.0209503173828125,
0.8942108154296875,
0.29986572265625,
0.7047119140625,
0.97479248046875,
0.2063446044921875,
0.9132232666015625
],
"dims": [4, 3, 4, 6],
"type": "f32"
}
}
]
16 changes: 16 additions & 0 deletions mlir-assigner/tests/Ops/Onnx/Hardmax/HardMaxAxis.onnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
 :s
#
in_aout_a"Hardmax*
axis� HardMaxAxisZ
in_a




b
out_a




B
3 changes: 3 additions & 0 deletions mlir-assigner/tests/Ops/Onnx/Hardmax/HardMaxAxis.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Result:
memref<4x3x4x6xf32>[0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0]
2020
1 change: 1 addition & 0 deletions mlir-assigner/tests/Ops/Onnx/Hardmax/HardMaxExample1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Binary file not shown.
3 changes: 3 additions & 0 deletions mlir-assigner/tests/Ops/Onnx/Hardmax/HardMaxExample1.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Result:
memref<4x4xf32>[1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
132
Loading

0 comments on commit 62d5d36

Please sign in to comment.