Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/onnx-to-tosa #4

Draft
wants to merge 1,653 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1653 commits
Select commit Hold shift + click to select a range
7411403
upgrade to ONNX 1.17.0 (opset 22) (#3004)
gongsu832 Nov 11, 2024
cb9a949
Add decomposition for `ONNXSoftmaxCrossEntropyLossOp` (#2968)
srcarroll Nov 12, 2024
fa91033
Delay scrubbing disposable elements attrs as long as possible (#3006)
tungld Nov 13, 2024
890ebea
add limitation for BFLOAT supported ops for NNPA (#3008)
Sunny-Anand Nov 13, 2024
868432d
Add the return value to omMMapBinaryFile function and fix a z/OS bug …
tungld Nov 15, 2024
a5ae8ba
Fix a wrong function call (#3012)
tungld Nov 15, 2024
2cb7637
Do not fuse locations when normalizing constants for Add and Mul
jorickert Nov 18, 2024
caaf40c
Merge pull request #212 from Xilinx/jrickert.commutative_loc
jorickert Nov 19, 2024
d5b9aab
Ensure that constant propagation patterns that rely on types having s…
jorickert Nov 18, 2024
149399a
Merge pull request #211 from Xilinx/jrickert.const_prop_dynamic
jorickert Nov 19, 2024
c8f8934
Use CHECK-DAG instead of CHECK to make location test more robust
jorickert Nov 20, 2024
2663cef
Merge pull request #213 from Xilinx/jrickert.check-dag
jorickert Nov 20, 2024
f2ec420
making runtime omunreachable static to support clang compiler (#3015)
christopherlmunoz Nov 20, 2024
13c13b1
Replace deprecated use of .cast/dyn_cast/isa with the mlir freestandi…
jorickert Nov 25, 2024
a1dbd10
Return a failure instead of crashing if shape inference can not be ru…
jorickert Nov 25, 2024
6baa9b2
Return failure instead of asserting if ONNX to TOSA conversion can no…
jorickert Nov 25, 2024
15dcfbb
Merge pull request #215 from Xilinx/jrickert.compiler-warnings
jorickert Nov 25, 2024
904fe58
Merge pull request #214 from Xilinx/jrickert.onnx-to-tosa-dyn
jorickert Nov 29, 2024
f9945b6
[AutoBump] Merge with fixes of b8616522 (Aug 23)
jorickert Nov 29, 2024
37067c8
[AutoBump] Merge with 4f0a141f (Aug 27)
jorickert Nov 29, 2024
7b4c7dd
[AutoBump] Merge with fixes of f7d8db53 (Aug 28)
jorickert Dec 2, 2024
674b6f2
[AutoBump] Merge with e03932b2 (Sep 03)
jorickert Dec 2, 2024
e98e1ff
[AutoBump] Merge with fixes of 866b91de (Sep 03)
jorickert Dec 2, 2024
bf4f097
Merge branch 'feature/onnx-to-tosa' into revert-208-ljfitz.simplify_s…
ttjost Dec 2, 2024
fb735b4
[AutoBump] Merge with fixes of f5297b06 (Sep 04)
jorickert Dec 2, 2024
af73919
Extend Layernorm recomposition to also work for the V18 version of Re…
jorickert Nov 29, 2024
02e7181
Sync llvm-version with llvm-bump commit
jorickert Dec 2, 2024
51f7d97
Merge pull request #210 from Xilinx/revert-208-ljfitz.simplify_slice_…
ttjost Dec 3, 2024
fb09556
Fix security vulenrabilities (#3019)
Sunny-Anand Dec 3, 2024
bac09ee
Do not fuse locations when normalizing constants for Add and Mul (#3016)
jorickert Dec 4, 2024
40f5017
Handle full reduction over all dimensions (#3022)
tungld Dec 4, 2024
dc43466
Merge pull request #216 from Xilinx/jrickert.layernorm_recomposition
jorickert Dec 4, 2024
f3fec68
Use DisposableElementsAttr for ZHigh constant propagation (#3013)
tungld Dec 4, 2024
e801b36
Re-enable diagnostic error/warning printing (#3020)
AlexandreEichenberger Dec 4, 2024
45f07d5
Transform SequenceAt to split for special cases (#3018)
chentong319 Dec 4, 2024
798efdc
Merge pull request #217 from Xilinx/bump_to_b8616522
jorickert Dec 5, 2024
44e3784
[AutoBump] Merge with c5d3e72b (Sep 06)
jorickert Dec 5, 2024
d68caaa
[AutoBump] Merge with fixes of 0ac3dc93 (Sep 09)
jorickert Dec 5, 2024
0b6320c
[AutoBump] Merge with c814ad00 (Sep 10)
jorickert Dec 5, 2024
3bd3dee
Merge pull request #218 from Xilinx/bump_to_4f0a141f
jorickert Dec 5, 2024
54c288f
Merge remote-tracking branch 'origin/feature/onnx-to-tosa' into bump_…
jorickert Dec 5, 2024
32d2c8b
Add tolerance args to CheckONNXModel.py (#3024)
AlexandreEichenberger Dec 6, 2024
e326fa2
Merge pull request #219 from Xilinx/bump_to_f7d8db53
jorickert Dec 6, 2024
bbdf831
Merge pull request #220 from Xilinx/bump_to_e03932b2
jorickert Dec 6, 2024
03f66d6
Merge pull request #221 from Xilinx/bump_to_866b91de
jorickert Dec 6, 2024
d60aa28
[AutoBump] Merge with fixes of 02f45b0 (Sep 11)
jorickert Dec 6, 2024
3040f1d
[AutoBump] Merge with 97d497f (Sep 13)
jorickert Dec 6, 2024
5ebc4a3
[AutoBump] Merge with fixes of 2f2ccc5 (Sep 13)
jorickert Dec 6, 2024
7a4940a
Fix biasScaleShape of GroupNormalizationV21 to support ranks > 4
jorickert Dec 6, 2024
734b1c9
[AutoBump] Merge with 37b8393d (Sep 16)
jorickert Dec 6, 2024
991df95
[AutoBump] Merge with fixes of fd3eb99b (Sep 16)
jorickert Dec 6, 2024
b6be377
Merge pull request #222 from Xilinx/bump_to_f5297b06
jorickert Dec 9, 2024
b7f7e5c
Sync with llvm bump
jorickert Dec 9, 2024
8a19da7
Merge pull request #227 from Xilinx/bump_to_c5d3e72b
jorickert Dec 9, 2024
6b5c9a4
Merge pull request #228 from Xilinx/bump_to_0ac3dc93
jorickert Dec 9, 2024
9189b46
Merge pull request #229 from Xilinx/bump_to_c814ad00
jorickert Dec 9, 2024
a0ace62
[AutoBump] Merge with f8e24668 (Sep 30)
jorickert Dec 9, 2024
94d2e0b
[AutoBump] Merge with fixes of 2c8e8e5d (Oct 01)
jorickert Dec 9, 2024
a14a96f
Revert "[AutoBump] Merge with fixes of 2c8e8e5d (Oct 01)"
jorickert Dec 9, 2024
bec7f2b
[AutoBump] Merge with ccf95524 (Oct 02)
jorickert Dec 9, 2024
49fc9c1
Return a failure instead of crashing if shape inference can not be ru…
jorickert Dec 9, 2024
ec9e1cd
Merge pull request #230 from Xilinx/bump_to_02f45b04
jorickert Dec 10, 2024
fcf7e0f
Merge pull request #231 from Xilinx/bump_to_97d497fa
jorickert Dec 10, 2024
982170b
Merge pull request #232 from Xilinx/bump_to_2f2ccc54
jorickert Dec 10, 2024
0670ac8
Merge pull request #235 from Xilinx/bump_to_37b8393d
jorickert Dec 10, 2024
55cdbcd
Update Ops documentation for ONNX 1.16.2 (#2942)
hamptonm1 Sep 16, 2024
ad2ffd8
feat(onnx.ReduceMean): add folder to the operator
mathmer-amd Dec 2, 2024
bb20e06
fix: now use gen_onnx_mlir.py and change few details
mathmer-amd Dec 10, 2024
689a2f0
fix: modify behavior error in lit test
mathmer-amd Dec 5, 2024
a57be88
feat: readd all the by hand modification of the ONNXops.td.inc file
mathmer-amd Dec 5, 2024
b19cb87
chore: readd handmade modification
mathmer-amd Dec 9, 2024
2d4d676
Merge pull request #224 from Xilinx/mmerienn.add_folder_to_ReduceMean
mathmer-amd Dec 10, 2024
9f9de36
upgrade becnhmark (#3027)
Sunny-Anand Dec 10, 2024
0c38933
[AutoBump] Merge with fixes of ec314b7c (Oct 02)
jorickert Dec 11, 2024
ab6e1c1
Merge pull request #236 from Xilinx/bump_to_fd3eb99b
jorickert Dec 12, 2024
e035bf8
Merge pull request #237 from Xilinx/bump_to_f8e24668
jorickert Dec 12, 2024
d7ee8aa
Merge pull request #238 from Xilinx/bump_to_2c8e8e5d
jorickert Dec 12, 2024
f021e4c
Merge pull request #239 from Xilinx/bump_to_ccf95524
jorickert Dec 12, 2024
7ac41b6
Fuse also the location of LayerNorm and Bias when fusing the ops
jorickert Dec 13, 2024
a913fea
Merge branch 'feature/onnx-to-tosa' into jrickert.ln-fuse-relu
ttjost Dec 13, 2024
6ef400c
Sync with llvm bump
jorickert Dec 16, 2024
5ed434b
Merge branch 'feature/onnx-to-tosa' into bump_to_ec314b7c
jorickert Dec 16, 2024
979e833
fixup! Fuse also the location of LayerNorm and Bias when fusing the ops
jorickert Dec 16, 2024
52d89b8
[AutoBump] Merge with 56a610cb (Oct 02)
jorickert Dec 16, 2024
ab7abdd
[AutoBump] Merge with fixes of 265ee602 (Oct 03)
jorickert Dec 16, 2024
dd8b921
Fuse locations when recomposing Layer/RMSNorm
jorickert Dec 16, 2024
51f178d
[AutoBump] Merge with 29e84764 (Oct 11)
jorickert Dec 16, 2024
7c84c59
[AutoBump] Merge with fixes of 72ca7e78 and sync with llvm bump (Oct 15)
jorickert Dec 16, 2024
ee18028
[AutoBump] Merge with d21f2db8 (Oct 31)
jorickert Dec 16, 2024
dc4b899
[AutoBump] Merge with fixes of b39ed162 (Nov 01)
jorickert Dec 16, 2024
faab5d3
[AutoBump] Merge with f935e3da (Nov 04)
jorickert Dec 16, 2024
03db9bc
[AutoBump] Merge with fixes of 33b466ec (Nov 05)
jorickert Dec 16, 2024
325def3
[AutoBump] Merge with fixes of b856fc57 (Nov 06)
jorickert Dec 16, 2024
1f04a95
[AutoBump] Merge with ba08e0f6 (Nov 07)
jorickert Dec 16, 2024
e636262
Convert ONNX.Where to TOSA.select
p-lanza Dec 16, 2024
72216f0
fix: import
p-lanza Dec 17, 2024
0598bfd
Merge pull request #241 from Xilinx/jrickert.ln-fuse-relu
jorickert Dec 17, 2024
8a4c57b
Fix input scale and bias size for groupnormV21.
jorickert Dec 18, 2024
2f58fdc
Merge pull request #254 from Xilinx/jrickert.groupconv21
jorickert Dec 18, 2024
b800036
Update llvm-project to llvm/llvm-project@01d233ff403823389f848 (#3011)
hamptonm1 Dec 19, 2024
a8f48db
addressed comments
p-lanza Dec 19, 2024
64fb7f9
Merge pull request #252 from Xilinx/planzase.convert_onnx_where_to_to…
p-lanza Dec 19, 2024
2644142
Add precondition check
jorickert Dec 19, 2024
66cb3e8
Add decomposition
jorickert Dec 19, 2024
53f8046
Optimize single shift cases
jorickert Dec 19, 2024
c0b915e
Use single concat
jorickert Dec 19, 2024
d7eea37
Add tests for decomposing ScatterND
jorickert Dec 20, 2024
ec934ab
Optimize two splits to one and remove debug printing
jorickert Dec 20, 2024
5519e16
Use rewriter.notifyMatchFailure if decomposition is not possible
jorickert Dec 20, 2024
f6d0806
Update llvm-project to llvm/llvm-project@af20aff35ec3 (#3032)
hamptonm1 Dec 20, 2024
720a8cc
Extend documentation
jorickert Dec 20, 2024
f6220d6
Merge pull request #242 from Xilinx/bump_to_56a610cb
jorickert Jan 2, 2025
b678135
Merge pull request #243 from Xilinx/bump_to_265ee602
jorickert Jan 2, 2025
8de9569
Merge pull request #244 from Xilinx/bump_to_29e84764
jorickert Jan 2, 2025
a3ab4b8
Merge pull request #245 from Xilinx/bump_to_72ca7e78
jorickert Jan 2, 2025
f65af9f
Update explanation of index checker
jorickert Jan 2, 2025
47324a3
Add assert and correct comments regarding the shape of updates and in…
jorickert Jan 2, 2025
e6feb1f
Add shape infer info for com.microsoft.Gelu
ljfitz Jan 2, 2025
c0d447f
Fix biasScaleShape of GroupNormalizationV21 to support ranks > 4 (#3030)
jorickert Jan 2, 2025
3a0e1b3
Merge pull request #256 from Xilinx/ljfitz.shapeinfer_com_microsoft_gelu
ljfitz Jan 3, 2025
2b869b1
Merge remote-tracking branch 'origin/feature/onnx-to-tosa' into bump_…
jorickert Jan 3, 2025
c6d9160
Merge branch 'feature/onnx-to-tosa' into jrickert.scatter-nd.decompose
jorickert Jan 3, 2025
dd59f30
Merge pull request #240 from Xilinx/bump_to_ec314b7c
mgehre-amd Jan 6, 2025
d2101fa
Add top level comment to DecomposeScatterND
jorickert Jan 6, 2025
b31052d
Move comment to begin of decomposition
jorickert Jan 6, 2025
76a26e7
Simplify scatterNd decomposition pattern by always splitting into three
jorickert Jan 7, 2025
2c6be81
Use zip instead of manual indexes
jorickert Jan 7, 2025
c33a21e
Merge remote-tracking branch 'origin/feature/onnx-to-tosa' into jrick…
jorickert Jan 7, 2025
7b9b6fc
Add high level comment
jorickert Jan 7, 2025
9875913
Skip over uninitialized DenseResourceAttrs in verifiers
jorickert Jan 7, 2025
03c16db
Merge pull request #257 from Xilinx/jrickert.verifier.elided
jorickert Jan 7, 2025
7371c8d
Fix typos
jorickert Jan 7, 2025
01c6ac8
Merge pull request #255 from Xilinx/jrickert.scatter-nd.decompose
jorickert Jan 7, 2025
c55c65e
Having default dummy implementation for reverseSequence
chaitanyakamarapu Jan 8, 2025
7275dbc
Merge pull request #246 from Xilinx/bump_to_d21f2db8
jorickert Jan 9, 2025
4fa6efe
Merge pull request #247 from Xilinx/bump_to_b39ed162
jorickert Jan 9, 2025
9c5b64e
Merge pull request #248 from Xilinx/bump_to_f935e3da
jorickert Jan 9, 2025
a5fc42f
Disable JNI test
jorickert Jan 9, 2025
7a2a9c5
Merge pull request #259 from Xilinx/jrickert.disable.jni_test
jorickert Jan 9, 2025
c4f774e
Merge pull request #249 from Xilinx/bump_to_33b466ec
jorickert Jan 10, 2025
4a746e6
Merge pull request #250 from Xilinx/bump_to_b856fc57
jorickert Jan 10, 2025
17adde7
Merge pull request #251 from Xilinx/bump_to_ba08e0f6
jorickert Jan 10, 2025
5361ff3
Adding support for batch_index=0
chaitanyakamarapu Jan 10, 2025
ad6f93d
handling varying seq lengths
chaitanyakamarapu Jan 10, 2025
9eba553
keeping debug message under a flag
chaitanyakamarapu Jan 10, 2025
e93738b
cleaning up, adding comments
chaitanyakamarapu Jan 12, 2025
a825378
Cleaning up the comments
chaitanyakamarapu Jan 12, 2025
b1410fa
Fix ASAN/UBSAN issues in DimAnalysis
jorickert Jan 13, 2025
905f71e
minor rearrangement
chaitanyakamarapu Jan 13, 2025
ae30981
fix: remove test case with zero indices that triggers 0 / 0 in std::f…
Jan 13, 2025
49b1598
Merge branch 'feature/onnx-to-tosa' into chaitany.decompose_convTrans…
chaitanyakamarapu Jan 14, 2025
771e81e
Merge pull request #260 from Xilinx/jrickert.asan.dim_analysis
jorickert Jan 14, 2025
3d7e5b6
adding the lit tests for reverseSequence
chaitanyakamarapu Jan 15, 2025
13dcd09
Merge branch 'chaitany.decompose_convTransepose' of https://github.co…
chaitanyakamarapu Jan 15, 2025
65b0c6b
Merge branch 'feature/onnx-to-tosa' of https://github.com/xilinx/onnx…
chaitanyakamarapu Jan 15, 2025
b0aeccf
adding more comments
chaitanyakamarapu Jan 16, 2025
91c8cd9
Update src/Dialect/ONNX/Transforms/ConstProp.cpp
chaitanyakamarapu Jan 16, 2025
201e1ca
Merge branch 'chaitany.decompose_convTransepose' of https://github.co…
chaitanyakamarapu Jan 16, 2025
590f803
formatting
chaitanyakamarapu Jan 16, 2025
d1399da
[AutoBump] Merge with fixes of 74114039 (Nov 11)
jorickert Jan 16, 2025
35acdf6
Remove accidentally added git markers
jorickert Jan 16, 2025
a658829
changes for fixing build error
chaitanyakamarapu Jan 17, 2025
656f7d5
Merge pull request #262 from Xilinx/bump_to_74114039
jorickert Jan 17, 2025
946e383
Revert "fix: remove test case with zero indices that triggers 0 / 0 i…
Jan 17, 2025
4aaf0c4
fix: avoid divied by 0 in floorDiv
Jan 17, 2025
45912b0
Merge branch 'feature/onnx-to-tosa' of https://github.com/xilinx/onnx…
Jan 17, 2025
1a94bc7
doing changes as per review comments
chaitanyakamarapu Jan 17, 2025
aaa377d
Merge branch 'feature/onnx-to-tosa' of https://github.com/xilinx/onnx…
chaitanyakamarapu Jan 17, 2025
8e52371
[AutoBump] Merge with fixes of cb9a9491 (Nov 12)
jorickert Jan 20, 2025
ee601d9
add onnx.reshape test case that triggers error message
Jan 20, 2025
6541d3d
[AutoBump] Merge with fixes of fa91033b (Nov 12)
jorickert Jan 20, 2025
487954c
[AutoBump] Merge with 40f50176 (Dec 03)
jorickert Jan 20, 2025
d706c9f
[AutoBump] Merge with fixes of f3fec68f (Dec 04)
jorickert Jan 20, 2025
3ff6570
[AutoBump] Merge with e801b364 (Dec 04)
jorickert Jan 20, 2025
db4f653
[AutoBump] Merge with fixes of 45f07d58 (Dec 04)
jorickert Jan 20, 2025
2f6fe15
[AutoBump] Merge with 32d2c8b6 (Dec 05)
jorickert Jan 20, 2025
c0b7611
[AutoBump] Merge with fixes of 49fc9c1d (Dec 09)
jorickert Jan 20, 2025
75ab1d8
[AutoBump] Merge with 9f9de368 (Dec 10)
jorickert Jan 20, 2025
4aa484c
[AutoBump] Merge with fixes of b8000366 (Dec 19)
jorickert Jan 20, 2025
d78be4d
Merge pull request #263 from Xilinx/bump_to_cb9a9491
jorickert Jan 20, 2025
8b73e9f
Merge pull request #264 from Xilinx/bump_to_fa91033b
jorickert Jan 20, 2025
ce4ab62
Merge pull request #265 from Xilinx/bump_to_40f50176
jorickert Jan 20, 2025
a5d1ee7
Merge pull request #266 from Xilinx/bump_to_f3fec68f
jorickert Jan 20, 2025
6d0692b
adding more lit tests and removing the verbose debug lines
chaitanyakamarapu Jan 21, 2025
e0bdcb8
formatting
chaitanyakamarapu Jan 21, 2025
81b1e8d
removing unused code
chaitanyakamarapu Jan 21, 2025
5dd7401
Merge branch 'feature/onnx-to-tosa' into chaitany.decompose_convTrans…
chaitanyakamarapu Jan 21, 2025
0a44171
Merge pull request #267 from Xilinx/bump_to_e801b364
jorickert Jan 21, 2025
44b50a1
Merge pull request #268 from Xilinx/bump_to_45f07d58
jorickert Jan 21, 2025
a5f0e97
Merge pull request #269 from Xilinx/bump_to_32d2c8b6
jorickert Jan 21, 2025
b289c9b
fixing review comments
chaitanyakamarapu Jan 23, 2025
2f55dab
Merge branch 'chaitany.decompose_convTransepose' of https://github.co…
chaitanyakamarapu Jan 23, 2025
fff11b7
removing the unused timeaxis parameter
chaitanyakamarapu Jan 23, 2025
e5510d5
using SmallVector instead of std::list
chaitanyakamarapu Jan 23, 2025
a18c18d
using SmallVector instead of std::list
chaitanyakamarapu Jan 23, 2025
cbbcdf9
Merge branch 'feature/onnx-to-tosa' into chaitany.decompose_convTrans…
chaitanyakamarapu Jan 23, 2025
b4dedc9
Merge pull request #270 from Xilinx/bump_to_49fc9c1d
jorickert Jan 23, 2025
e3695b7
Merge pull request #271 from Xilinx/bump_to_9f9de368
jorickert Jan 23, 2025
ede5012
Merge branch 'feature/onnx-to-tosa' of https://github.com/xilinx/onnx…
chaitanyakamarapu Jan 23, 2025
60bdcc8
Sync with llvm-bump commit
jorickert Jan 23, 2025
a708ac3
update test
Jan 27, 2025
1ed07bd
feat: check shape for allowzero case at verify()
Jan 27, 2025
f1c2118
chore: clang-tidy
Jan 27, 2025
050fbce
remove unused header
Jan 27, 2025
832f39e
Merge branch 'feature/onnx-to-tosa' of https://github.com/xilinx/onnx…
Jan 27, 2025
e6e27c4
chore: clang-format
Jan 27, 2025
4dab6db
Merge pull request #261 from Xilinx/liangta.asan.canonicalization
ge28boj Jan 29, 2025
54d632b
Changing the comment style and fixing minor review comments
chaitanyakamarapu Jan 29, 2025
d5b0a5d
Merge branch 'feature/onnx-to-tosa' into chaitany.decompose_convTrans…
chaitanyakamarapu Jan 29, 2025
7b8b419
empty
chaitanyakamarapu Jan 30, 2025
74b48a0
Merge branch 'chaitany.decompose_convTransepose' of https://github.co…
chaitanyakamarapu Jan 30, 2025
ea4aaaa
Merge pull request #272 from Xilinx/bump_to_b8000366
jorickert Jan 30, 2025
a3326fc
Merge pull request #258 from Xilinx/chaitany.decompose_convTransepose
chaitanyakamarapu Jan 30, 2025
fdb53bd
[AutoBump] Merge with fixes of f6d0806c (Dec 20)
jorickert Jan 30, 2025
8224977
[AutoBump] Merge with fixes of c0d447f7 (Jan 02)
jorickert Jan 30, 2025
3bd2895
Merge pull request #276 from Xilinx/bump_to_f6d0806c
jorickert Jan 31, 2025
b5ca646
Adding disable-convtranspose-decompose option
chaitanyakamarapu Jan 31, 2025
b49076b
Merge branch 'feature/onnx-to-tosa' of https://github.com/xilinx/onnx…
chaitanyakamarapu Jan 31, 2025
4219d8b
Merge pull request #277 from Xilinx/bump_to_c0d447f7
jorickert Jan 31, 2025
66ccf85
minor change
chaitanyakamarapu Jan 31, 2025
a1794dd
Merge branch 'feature/onnx-to-tosa' into chaitany.convtranspose_as_op…
chaitanyakamarapu Jan 31, 2025
76bdf50
feat: ONNXPadOp now also lowes to TOSA integer types
roberteg16 Jan 31, 2025
27157da
Merge pull request #280 from Xilinx/rogarcia.expand_ONNXPadOp_to_also…
roberteg16 Jan 31, 2025
d5b6f76
adding the test for disable convtranspose decomposition
chaitanyakamarapu Feb 2, 2025
50c392e
Merge branch 'chaitany.convtranspose_as_option' of https://github.com…
chaitanyakamarapu Feb 2, 2025
18dbc19
formatting
chaitanyakamarapu Feb 2, 2025
6dd1b32
formatting
chaitanyakamarapu Feb 2, 2025
a883dbc
Merge branch 'feature/onnx-to-tosa' into chaitany.convtranspose_as_op…
chaitanyakamarapu Feb 2, 2025
3d6f0a2
Merge pull request #279 from Xilinx/chaitany.convtranspose_as_option
chaitanyakamarapu Feb 3, 2025
149f379
Fix lowering of onnx.Mul with dynamic shape
jorickert Feb 3, 2025
3939ed0
Merge pull request #282 from Xilinx/jrickert.mul.dynamic
jorickert Feb 3, 2025
063fbb0
Make ONNX to TOSA lowering more resistant to dynamic shapes and unran…
jorickert Feb 3, 2025
a96118c
Merge pull request #283 from Xilinx/jrickert.unranked_types
jorickert Feb 3, 2025
131297d
Modify LayerNorm recomposition test to showcase default value is alwa…
roberteg16 Feb 5, 2025
5051f97
Use correct function to retrieve constant value on LN recomposition
roberteg16 Feb 5, 2025
f4d1ac4
Merge pull request #284 from Xilinx/rogarcia.fix_layerNorm_recomposition
roberteg16 Feb 5, 2025
d863cb7
Bump various ops to opset 22, adding bf16 support (#3059)
jorickert Feb 7, 2025
6e5d133
Bump onnx.Cast to opset 21 , adding int/uint4 support (#3057)
jorickert Feb 7, 2025
6029d12
Add test for onnx.Cast v21 to tosa lowering
jorickert Jan 28, 2025
0d14c79
Extend GridSample support (#3060)
jorickert Feb 3, 2025
a70f24b
Add GridSample 20 support
jorickert Feb 10, 2025
3ad3c6a
Merge pull request #289 from Xilinx/jrickert.opset_update
jorickert Feb 10, 2025
93e25a0
Merge remote-tracking branch 'origin/feature/onnx-to-tosa' into jrick…
jorickert Feb 10, 2025
0f9b6ae
Fix return type of recomposed ops
jorickert Feb 10, 2025
19d2be6
Merge pull request #291 from Xilinx/jrickert.gridsample_22
jorickert Feb 10, 2025
111b5ca
Merge pull request #292 from Xilinx/jrickert.fix_recompose_type_befor…
jorickert Feb 10, 2025
17fb894
Add options to specify directory with ONNX initializer files
ljfitz Feb 11, 2025
8d6f345
Merge pull request #293 from Xilinx/ljfitz.external_data_dir_opt
jimw567 Feb 11, 2025
9c36220
Remove accidentally commited file
jorickert Feb 12, 2025
57f7ef8
Merge pull request #294 from Xilinx/jrickert.remove_accidentally_adde…
jorickert Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .buildbot/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,25 @@ def call() {
DOCKER_DAEMON_SOCKET = 'unix://var/run/docker.sock'
DOCKER_REGISTRY_TOKEN_ACCESS = 'true'
/* Settings for docker.io */
/*
DOCKER_REGISTRY_HOST_NAME = ''
DOCKER_REGISTRY_USER_NAME = 'onnxmlir'
DOCKER_REGISTRY_LOGIN_NAME = 'onnxmlir'
*/
/* Settings for ghcr.io */
/*
DOCKER_REGISTRY_HOST_NAME = 'ghcr.io'
DOCKER_REGISTRY_USER_NAME = 'onnxmlir'
DOCKER_REGISTRY_LOGIN_NAME = 'onnxmlir'
*/

/* Credentials defined in Jenkins */
JENKINS_REST_API_TOKEN = credentials('Jenkins-REST-API-Token')
GITHUB_REPO_ACCESS_TOKEN = credentials('jenkins-buildbot-access-token')
/* Settings for docker.io */
/*
DOCKER_REGISTRY_LOGIN_TOKEN = credentials('DOCKERHUB-ONNXMLIR-TOKEN')
*/
/* Settings for ghcr.io */
/*
DOCKER_REGISTRY_LOGIN_TOKEN = credentials('GITHUB-ONNXMLIR-TOKEN')
*/

/* Environment variables that depend on the arch */
JENKINS_REST_API_URL = sh(returnStdout: true,
Expand Down
4 changes: 2 additions & 2 deletions .buildbot/jenkins-build-llvm-project.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
LLVM_PROJECT_DOCKERFILE = "docker/Dockerfile.llvm-project"
LLVM_PROJECT_GITHUB_URL = "https://api.github.com/repos/llvm/llvm-project"
LLVM_PROJECT_BASE_IMAGE = {
"static": "ubuntu:jammy",
"static": "ghcr.io/onnxmlir/ubuntu:jammy",
"shared": "registry.access.redhat.com/ubi8-minimal:latest",
}
LLVM_PROJECT_IMAGE = {
Expand Down Expand Up @@ -187,7 +187,7 @@ def setup_per_pr_llvm_project(image_type, exp):
):
if "stream" in line:
# Keep track of the latest successful image layer
m = re.match("^\s*---> ([0-9a-f]+)$", line["stream"])
m = re.match(r"^\s*---> ([0-9a-f]+)$", line["stream"])
if m:
layer_sha256 = m.group(1)
print(line["stream"], end="", flush=True)
Expand Down
2 changes: 1 addition & 1 deletion .buildbot/jenkins-build-onnx-mlir.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def build_per_pr_onnx_mlir(image_type, exp):
):
if "stream" in line:
# Keep track of the latest successful image layer
m = re.match("^\s*---> ([0-9a-f]+)$", line["stream"])
m = re.match(r"^\s*---> ([0-9a-f]+)$", line["stream"])
if m:
layer_sha256 = m.group(1)
print(line["stream"], end="", flush=True)
Expand Down
2 changes: 1 addition & 1 deletion .buildbot/jenkins-watch-llvm-project.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def build_watch_image(repo, commit, dockerfile, base_image, image_repo, image_ta
):
if "stream" in line:
# Keep track of the latest successful image layer
m = re.match("^\s*---> ([0-9a-f]+)$", line["stream"])
m = re.match(r"^\s*---> ([0-9a-f]+)$", line["stream"])
if m:
layer_sha256 = m.group(1)
print(line["stream"], end="", flush=True)
Expand Down
5 changes: 3 additions & 2 deletions .buildbot/jenkins_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
MEMORY_IN_GB = os.sysconf("SC_PAGE_SIZE") * os.sysconf("SC_PHYS_PAGES") / (1024.0**3)
NPROC = str(math.ceil(min(max(2, MEMORY_IN_GB / 8), os.cpu_count())))

RETRY_LIMIT = 5
RETRY_LIMIT = 10
READ_CHUNK_SIZE = 1024 * 1024
BASE_BRANCH = "main"

DOCKER_API_TIMEOUT = 3600
DOCKER_DIST_MANIFEST = "application/vnd.docker.distribution.manifest.v2+json"
DOCKER_DIST_MANIFEST_LIST = "application/vnd.docker.distribution.manifest.list.v2+json"

Expand All @@ -47,7 +48,7 @@
docker_registry_login_token = os.getenv("DOCKER_REGISTRY_LOGIN_TOKEN")
docker_registry_token_access = os.getenv("DOCKER_REGISTRY_TOKEN_ACCESS")
docker_rwlock = fasteners.InterProcessReaderWriterLock(docker_pushpull_rwlock)
docker_api = docker.APIClient(base_url=docker_daemon_socket)
docker_api = docker.APIClient(base_url=docker_daemon_socket, timeout=DOCKER_API_TIMEOUT)

github_repo_access_token = os.getenv("GITHUB_REPO_ACCESS_TOKEN")
github_repo_name = os.getenv("GITHUB_REPO_NAME")
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/macos-amd64-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: GitHub Action MacOS amd64

on: [push, pull_request]
on:
pull_request:
push:
branches: [ main, feature/onnx-to-tosa ]

jobs:
build:
Expand All @@ -18,6 +21,12 @@ jobs:
- name: install tools that are needed for compilation
run: |
brew install automake ninja pybind11
- name: ccache
uses: hendrikmuhs/[email protected]
with:
# Create symlinks to intercept compiler calls without modifying the cmake invocation
create-symlink: true
key: ${{ runner.os }}-ccache
- name: install protobuf
run: |
cd ~/work
Expand Down Expand Up @@ -46,6 +55,8 @@ jobs:
python3 -m pip install -v .
- name: build onnx-mlir
run: |
# Disable stablehlo to ease bumping; we don't need it.
export EXTRA_CMAKE_ARGS="-DONNX_MLIR_ENABLE_STABLEHLO=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
cd ~/work/onnx-mlir
sh ~/work/onnx-mlir/onnx-mlir/utils/install-onnx-mlir.sh
- name: build and run docs/doc_example tests
Expand All @@ -57,6 +68,9 @@ jobs:
cd ~/work/onnx-mlir
sh ~/work/onnx-mlir/onnx-mlir/utils/check-unittest.sh
- name: run onnx-mlir backend and numerical tests
# Those tests are not relevant to the work on the xilinx fork, but take
# 40 min. Don't run them on PRs.
if: github.event_name != 'pull_request'
run: |
cd ~/work/onnx-mlir
sh ~/work/onnx-mlir/onnx-mlir/utils/check-onnx-backend-numerical.sh
86 changes: 86 additions & 0 deletions .github/workflows/ubuntu-build-intree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: In-tree build

on:
pull_request:
push:
branches: [ main, feature/onnx-to-tosa ]

concurrency:
# Build every push.
# Only build the newest PR; cancel older builds of a PR
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build-intree:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: install tools that are needed for compilation
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake ninja-build
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
# A full build seems to take ~ 250 MB. Leave a bit more room
# so we don't run out of cache space in the future.
max-size: 400M
key: sccache-intree
variant: sccache
create-symlink: true

- name: install dependencies
run: |
utils/install-protobuf.sh
utils/install-venv.sh

- name: clone llvm-project
run: sh utils/clone-mlir.sh

- name: build
run: |
cmake llvm-project/llvm \
-Bbuild \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS="onnx-mlir" \
-DONNX_MLIR_ENABLE_STABLEHLO=OFF \
-DLLVM_EXTERNAL_ONNX_MLIR_SOURCE_DIR=. \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_BUILD_UTILS=OFF \
-DLLVM_BUILD_RUNTIMES=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_LIBEDIT=OFF \
-DLLVM_USE_LINKER=lld \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache

cmake --build build --target onnx-mlir

- name: run LIT tests
run: |
export LIT_OPTS=-v
cmake --build build --target check-onnx-lit


- name: build and run docs/doc_example tests
run: |
cd ..
sh onnx-mlir/utils/check-doc-example.sh

- name: build and run unit tests
run: |
cd ..
sh onnx-mlir/utils/check-unittest.sh
70 changes: 70 additions & 0 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Out-of-tree build

on:
pull_request:
push:
branches: [ main, feature/onnx-to-tosa ]

concurrency:
# Build every push to main
# Only build the newest PR; cancel older builds of a PR
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: install tools that are needed for compilation
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake ninja-build
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
# A full build of llvm, clang, lld, and lldb takes about 250MB
# of ccache space. There's not much reason to have more than this,
# because we usually won't need to save cache entries from older
# builds. Also, there is an overall 10GB cache limit, and each
# run creates a new cache entry so we want to ensure that we have
# enough cache space for all the tests to run at once and still
# fit under the 10 GB limit.
max-size: 500M
key: sccache
variant: sccache
create-symlink: true

- name: install dependencies
run: |
utils/install-protobuf.sh
utils/install-venv.sh

- name: clone & build MLIR
run: |
cd ..
export EXTRA_CMAKE_ARGS="-DLLVM_USE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
sh onnx-mlir/utils/clone-mlir.sh
sh onnx-mlir/utils/build-mlir.sh

- name: build onnx-mlir
run: |
cd ..
export EXTRA_CMAKE_ARGS="-DONNX_MLIR_ENABLE_STABLEHLO=OFF -DLLVM_USE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
bash onnx-mlir/utils/install-onnx-mlir.sh

- name: build and run docs/doc_example tests
run: |
cd ..
sh onnx-mlir/utils/check-doc-example.sh

- name: build and run unit tests
run: |
cd ..
sh onnx-mlir/utils/check-unittest.sh
43 changes: 27 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ project(onnx-mlir)
option(ONNX_MLIR_BUILD_TESTS "Build ONNX-MLIR test executables. If OFF, just generate build targets." ON)
option(ONNX_MLIR_CCACHE_BUILD "Set to ON for a ccache enabled build." OFF)
option(ONNX_MLIR_ENABLE_STABLEHLO "Enable StableHLO support." ON)
option(ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE "Enable ONNXConvTransposeOp decomposition." ON)
option(ONNX_MLIR_ENABLE_WERROR "Enable warnings as errors." OFF)
option(ONNX_MLIR_SUPPRESS_THIRD_PARTY_WARNINGS "Suppress warning in third_party code." ON)
option(ONNX_MLIR_ENABLE_JAVA "Set to ON for building the Java runtime, tools, and tests" ON)
option(ONNX_MLIR_INSTALL_HEADERS "Install onnx-mlir headers" ON)
option(ONNX_MLIR_INSTALL_LIBS "Install onnx-mlir libraries" ON)
option(ONNX_MLIR_INSTALL_PYTHON_EXTENSIONS "Install onnx-mlir python bindings" ON)

set(CMAKE_CXX_STANDARD 17)

Expand Down Expand Up @@ -55,14 +57,20 @@ if (ONNX_MLIR_CCACHE_BUILD)
endif()
endif()

# Enable warnings as errors
# Leverage the imported LLVM_ENABLE_WERROR for compiler logic
set(LLVM_ENABLE_WERROR ${ONNX_MLIR_ENABLE_WERROR})
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# Enable warnings as errors
# Leverage the imported LLVM_ENABLE_WERROR for compiler logic
set(LLVM_ENABLE_WERROR ${ONNX_MLIR_ENABLE_WERROR})

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/bin)
set(CMAKE_INCLUDE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/include)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/bin)
set(CMAKE_INCLUDE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/include)
set(ONNX_MLIR_BUILD_INTREE OFF)
else()
message(STATUS "ONNX-MLIR in-tree build.")
set(ONNX_MLIR_BUILD_INTREE ON)
endif()

set(ONNX_MLIR_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(ONNX_MLIR_BIN_ROOT ${CMAKE_CURRENT_BINARY_DIR})
Expand Down Expand Up @@ -161,15 +169,19 @@ set(CMAKE_MESSAGE_LOG_LEVEL NOTICE)

# Add third party subdirectories and define options appropriate to run their cmakes.
set(pybind11_FIND_QUIETLY ON)
add_subdirectory(third_party/onnx)
add_subdirectory(third_party/onnx EXCLUDE_FROM_ALL)
add_subdirectory(third_party/pybind11)
add_subdirectory(third_party/rapidcheck)
add_subdirectory(third_party/rapidcheck EXCLUDE_FROM_ALL)

if (ONNX_MLIR_ENABLE_STABLEHLO)
if (ONNX_MLIR_BUILD_INTREE)
message(FATAL_ERROR "In tree builds don't support stablehlo yet. "
"Please pass -DONNX_MLIR_ENABLE_STABLEHLO=OFF to cmake or build out-of-tree.")
endif()
add_subdirectory(third_party/stablehlo EXCLUDE_FROM_ALL)
endif()

if (NOT TARGET benchmark)
if (NOT ONNX_MLIR_BUILD_INTREE AND NOT TARGET benchmark)
set(BENCHMARK_USE_BUNDLED_GTEST OFF)
set(BENCHMARK_ENABLE_GTEST_TESTS OFF)
set(BENCHMARK_ENABLE_TESTING OFF)
Expand All @@ -183,8 +195,10 @@ endif()
# compile flags updated via llvm_update_compile_flags, so we need to do that to
# benchmark and rapidcheck as well, so that we can successfully link against them.
# Otherwise, some of the flags for exceptions (among others) are not set correctly.
llvm_update_compile_flags(benchmark)
llvm_update_compile_flags(benchmark_main)
if (NOT ONNX_MLIR_BUILD_INTREE)
llvm_update_compile_flags(benchmark)
llvm_update_compile_flags(benchmark_main)
endif()
llvm_update_compile_flags(rapidcheck)

if (ONNX_MLIR_ENABLE_STABLEHLO)
Expand All @@ -208,9 +222,6 @@ if (ONNX_MLIR_ENABLE_STABLEHLO)
add_compile_definitions(ONNX_MLIR_ENABLE_STABLEHLO)
endif()

if (ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE)
add_compile_definitions(ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE)
endif()

add_subdirectory(utils)
add_subdirectory(include)
Expand Down
Loading
Loading