mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-23 06:34:55 +08:00
Compare commits
1438 Commits
v2.8.0-rc6
...
quint-bits
Author | SHA1 | Date | |
---|---|---|---|
b5a8214f91 | |||
08ea8fccaf | |||
41754539be | |||
716d52779f | |||
3bf41f26c8 | |||
19aa8eb4f5 | |||
8c0c5c58c7 | |||
2d1e92307d | |||
399c89e15c | |||
14d67eec05 | |||
9ad7dd54f9 | |||
387db86ef1 | |||
e5a1d839c5 | |||
c06164a9c5 | |||
c7586d4ed3 | |||
8e07c9870d | |||
a76147c9e0 | |||
f3913ea641 | |||
1abff80fae | |||
799303f655 | |||
d26ab281d2 | |||
1cffb217ef | |||
c8342b7231 | |||
f63673626d | |||
37638c303e | |||
ee2edf3d37 | |||
51eb41a57e | |||
ede6186c86 | |||
6d071bd65d | |||
d742a2896c | |||
11d6559a58 | |||
e7667e5702 | |||
f6c89c1ef3 | |||
d72ebefe3f | |||
46b925681c | |||
fe0ff12dab | |||
7dafab6a93 | |||
f5130bf339 | |||
f62772f365 | |||
e2b2685f84 | |||
3db8623dcb | |||
cd68559d04 | |||
62a49d929b | |||
c6b479bc09 | |||
517eebc1dd | |||
7f266020de | |||
e06798191b | |||
c89fa88acb | |||
f5cf05c983 | |||
21a95bdf7c | |||
fb029accb7 | |||
26f4dd5160 | |||
b9e3eb64a7 | |||
69cc99525c | |||
72af19dadf | |||
8aebf01287 | |||
bc5dbbbb78 | |||
36cf8f1ed8 | |||
1e79872f2e | |||
9e8f27cc79 | |||
e65ab9a868 | |||
bfe6765d6b | |||
e88f804a2e | |||
7ef3c3357d | |||
24b1f10ca1 | |||
0006dd5c43 | |||
0f31e9a656 | |||
0427e439aa | |||
4aa69ae336 | |||
14c314b30d | |||
0b01e11416 | |||
806d9e3fe7 | |||
d90ce83027 | |||
dfcb07bdfa | |||
fa0355c18d | |||
28ee8be5bf | |||
ed472257d1 | |||
57eea56a9a | |||
dd681f7f59 | |||
0d4d3e8a89 | |||
ee4c5c7cd2 | |||
51cd6697cd | |||
ba949c54a7 | |||
2a528e80ce | |||
56c45f863b | |||
d30f89b9b8 | |||
3fb78501f0 | |||
8a0508335f | |||
4c0d5ad4be | |||
316c188a5e | |||
191eca0bf0 | |||
74f64d3c84 | |||
f8fafdc7a6 | |||
c8316d0e79 | |||
a9f6770edd | |||
5620e617c9 | |||
ee84ba42ea | |||
561193e5f2 | |||
9535995bbc | |||
6fcb2b4413 | |||
204eb4da5e | |||
bf311141d6 | |||
92e93bb580 | |||
a0bc865123 | |||
aaa384b2d4 | |||
0fd5f1c294 | |||
e38a2b3d0f | |||
ae183d6092 | |||
659f8fb115 | |||
05a748d287 | |||
02ca965560 | |||
511d987378 | |||
9685fc36d4 | |||
9e5cfd3ee5 | |||
cdf8e9ec1a | |||
bcf34d24eb | |||
9b29166f57 | |||
1fced0c7d5 | |||
16c0ccd669 | |||
f5e2de928b | |||
f903bc475c | |||
4261e26a8b | |||
b635359e4c | |||
f1a1aa9490 | |||
6fc0ad22f0 | |||
c60d382870 | |||
64cb349b81 | |||
a53db90e21 | |||
9c10760662 | |||
8d2a1d6e18 | |||
751285cb22 | |||
efc810c7d0 | |||
abb0bf45df | |||
b533f12120 | |||
e20736bf1d | |||
cae4746952 | |||
4a13d4d7d0 | |||
da35562bba | |||
de85ee73ae | |||
8573a2beda | |||
13398dab79 | |||
5564f2ca2e | |||
f3edcac23a | |||
90c241dedd | |||
5ab0eb28f7 | |||
0b2ef76e85 | |||
9faef3d17c | |||
aeaa20083f | |||
5be7e187ba | |||
347a97da66 | |||
78aa3bd6b6 | |||
ee97dbf2e7 | |||
b7d41729e0 | |||
abcb24f4de | |||
fd48681b6a | |||
a3f9f79f59 | |||
2fc0b1605e | |||
11ea3736dd | |||
43d4ff6851 | |||
83957d1c03 | |||
48fe4ff247 | |||
f55c5d085e | |||
a3025e17b2 | |||
afd6eb0d49 | |||
3ced1079a4 | |||
3e954d3943 | |||
fb067de550 | |||
693197eed6 | |||
65c1109ca2 | |||
70fb5bb6fb | |||
30bb7636da | |||
68349118b5 | |||
e09d80c545 | |||
07df6ba7f5 | |||
d61153a300 | |||
da9e120e3f | |||
611b61e758 | |||
d352c28dd1 | |||
0c0fcb53ff | |||
febf3c475e | |||
7001d6fbc9 | |||
0118931e27 | |||
ebb032a202 | |||
60ac3414eb | |||
d34cee4cf3 | |||
5cdb3d896e | |||
0204099762 | |||
b67f97c166 | |||
7f649ed4f8 | |||
86df3ff1f1 | |||
82f8e04f27 | |||
5619bf9971 | |||
d8425e9c75 | |||
633d5faf3f | |||
4d5d56a30e | |||
64e8d7d66b | |||
b935ad17d5 | |||
f7f550649f | |||
255c0545e7 | |||
9c68c4d08f | |||
6ed2cb6ccd | |||
ab26d4fbeb | |||
da94023b02 | |||
c996aff6ed | |||
691736ae07 | |||
fe8f556006 | |||
85ee2fb8c5 | |||
fef236da69 | |||
76be282e3a | |||
9905ed616a | |||
30b0ad5c68 | |||
41b6cdaf76 | |||
1b456c580d | |||
5e386eec94 | |||
00da8e63eb | |||
576253c476 | |||
f5314f89c8 | |||
671e22a951 | |||
d3d9bc1c31 | |||
7d296d5c19 | |||
2a60b8fc97 | |||
d898d0d437 | |||
5998cd4eaa | |||
57024913c4 | |||
ee72338f0c | |||
c665594c1e | |||
255a04baf1 | |||
1d302eaee8 | |||
a6b7bea244 | |||
be72bcf828 | |||
f80f97d192 | |||
42a69f7c2b | |||
b87471e66f | |||
f10e4430e2 | |||
2dccff7dcf | |||
dec0d3101c | |||
9df0f56597 | |||
91602a9254 | |||
cc372ad557 | |||
84058d1179 | |||
096dc35d77 | |||
56d07d0bde | |||
39b54b78d7 | |||
3703dabe42 | |||
d3f9107d68 | |||
cab96b5879 | |||
6100ed457c | |||
badfebf29e | |||
fc5a404eb1 | |||
04a393507b | |||
a626dc8f16 | |||
fd47401536 | |||
e44e05f7ae | |||
ddd74d10fc | |||
823e223893 | |||
6499420e45 | |||
e17538022a | |||
37ded2ac90 | |||
767791943d | |||
c917c63282 | |||
659bfbf443 | |||
832ab990c9 | |||
56df025d51 | |||
55ff4f85e9 | |||
7d2ceaff21 | |||
2a249f1967 | |||
52c294008e | |||
0971637c11 | |||
7d6f340238 | |||
4060f30042 | |||
9a28e23d97 | |||
d0c00d9a69 | |||
371ffaf415 | |||
1b772de397 | |||
8e99714204 | |||
9b4d938f04 | |||
0142d5f4e2 | |||
91b69deeb0 | |||
392fa75411 | |||
3a67bf9c62 | |||
d984143a74 | |||
21c97bd565 | |||
a155f742ad | |||
3639d29ea1 | |||
aee8a2e985 | |||
eac777c4f4 | |||
1a6b21c59f | |||
abe0c9538a | |||
95b658427d | |||
6341311333 | |||
350d6af52c | |||
9281625a9b | |||
2c37acfd89 | |||
08540b13c6 | |||
187c2deb40 | |||
67be2f27e1 | |||
d293022c47 | |||
ee5a434f8c | |||
4c18e85300 | |||
920f26c761 | |||
99cc3633f6 | |||
15a50dcf1c | |||
1227ed6674 | |||
2bb684304d | |||
f09a484b81 | |||
feaa02f9ad | |||
b3c868d603 | |||
cab28330f8 | |||
4366610f5a | |||
dd0adc9386 | |||
734826d88e | |||
5a56e6a72b | |||
e8af168ee0 | |||
97d7dc197f | |||
9498d95b9c | |||
0e46f54286 | |||
216ba6e5f2 | |||
c774180e59 | |||
a991e285ae | |||
9e0473b566 | |||
5e17932c22 | |||
6b0526a2c4 | |||
bc379aebe2 | |||
b1a0c34dd3 | |||
851e953f68 | |||
b66f429827 | |||
ea5b06ed5b | |||
25fbf09d5f | |||
22920c9138 | |||
ad2dec1997 | |||
662dd7db5b | |||
72db0a98a3 | |||
8ed5e1844c | |||
393fecb2cc | |||
9285b8245c | |||
637e75433c | |||
a78fb63dbd | |||
7205458b85 | |||
35f1b4ad9e | |||
cbe1cb7018 | |||
9894d43b6c | |||
f168cf49a8 | |||
393377d215 | |||
8e57cdb746 | |||
d5a29fc58a | |||
979fae761c | |||
1eb6b2089f | |||
bbc32d680f | |||
a527e81693 | |||
1c6328a588 | |||
70b4a8880b | |||
5e1232871b | |||
ff0da08f4b | |||
2cdafab0bd | |||
4b02bd76d3 | |||
2e038793ef | |||
5e149a6482 | |||
badf002014 | |||
4869f71170 | |||
b4abf41425 | |||
a10f15718d | |||
1d526fe78f | |||
b64f338da4 | |||
a1cfe7f1df | |||
d36afac83b | |||
7cc1a9546c | |||
7cc5d03dfc | |||
f73594164a | |||
a9f84021fb | |||
22d82222c6 | |||
5cde34473c | |||
fac0be7b9c | |||
64dabb2cf5 | |||
ab557421a4 | |||
90b082e207 | |||
a741094159 | |||
2955acaed6 | |||
2c16eb9f3d | |||
c2c88846a9 | |||
5b40f6581e | |||
d42c409767 | |||
a3aacd6cb2 | |||
36bddcd18c | |||
15ef4f28df | |||
60b9b06a53 | |||
a835dbc096 | |||
f76f4abf3f | |||
be483a5481 | |||
bc7b1f5252 | |||
07c4c2a792 | |||
89850bbc07 | |||
3bb729df97 | |||
e3351b3ddf | |||
1ab1ab38a0 | |||
8b2a650572 | |||
ec0b538961 | |||
599f94e7b9 | |||
04ac258cf6 | |||
1b5fdb23b9 | |||
75e2628782 | |||
79e49efadd | |||
b87e50db5e | |||
656885b614 | |||
6e07d6a0ff | |||
b4358c5e87 | |||
86675af3f0 | |||
725cdb218e | |||
8c3f84908b | |||
6f73e06796 | |||
acffd1a297 | |||
bf4aa78279 | |||
50f33a6fca | |||
35df895d05 | |||
193b29ee0c | |||
036eb1f65d | |||
e882c761dd | |||
0eae6b68f4 | |||
a4ec381302 | |||
27af877f84 | |||
7b05bdd925 | |||
ead80f3202 | |||
32aade9d8d | |||
be896d6b41 | |||
a3396a9b85 | |||
fda3f3b2ec | |||
a00cd8cf25 | |||
eb73650723 | |||
9308261a2a | |||
9a7c2f1f64 | |||
d8b084312b | |||
1e86fa2e5b | |||
86dbc0ef67 | |||
89d842fec5 | |||
ce4554352b | |||
583138d170 | |||
6fd6fc418d | |||
ddbecdfb66 | |||
ef38edb284 | |||
6673ac746c | |||
7b72e5b3ad | |||
33c9b414aa | |||
b0e325c2c8 | |||
f63988ae00 | |||
2df2e3bb51 | |||
0ecfb93a0b | |||
74f4cf4bd5 | |||
1b91954b9f | |||
41b2c4d119 | |||
af6624023e | |||
a00442421a | |||
ced5cf042d | |||
1b88da1cac | |||
66c9bc5062 | |||
80ac73c057 | |||
eeb0783fe6 | |||
ef256ad17b | |||
fd51bcdd21 | |||
7ebbf2cae7 | |||
8dcebaa7b0 | |||
7e34f9c292 | |||
25f4d7e482 | |||
ad223a6c5f | |||
f92a2035e4 | |||
bff69f25c2 | |||
6d31d38965 | |||
bfe5674e22 | |||
94d7f0c1ef | |||
23550ab735 | |||
16b21fa8b2 | |||
2ecf083b72 | |||
813c76b98d | |||
288bf54a23 | |||
da4c7b4ced | |||
a04bd11895 | |||
58c7cf9ede | |||
38c04415a9 | |||
7892f5a007 | |||
d5af0eca8d | |||
f57ef62ebc | |||
4c8b408d16 | |||
c8d43cbc6e | |||
3f8e2e91ad | |||
eeda1a75ac | |||
f4d8bc46c7 | |||
39ac189808 | |||
d76323d417 | |||
04349f9ee5 | |||
09db3a22e8 | |||
a38f433be2 | |||
9f37cce693 | |||
9636e2cfd3 | |||
d9426a81d2 | |||
0b9fb91f17 | |||
a6de309ca1 | |||
1a4268b811 | |||
79d7c754ab | |||
415dfabe9b | |||
8eaa9f2701 | |||
ebf83b8b77 | |||
24b49b9881 | |||
1839e8d04b | |||
2ad5c25cfc | |||
1179e33323 | |||
f6d138807f | |||
c09eba877f | |||
2179afd714 | |||
d7e1b8b11d | |||
b6454a9058 | |||
e9367a7a42 | |||
e78f2ac92b | |||
82a1ee1135 | |||
306dd19216 | |||
1d58476162 | |||
a4d753295e | |||
a9f902add0 | |||
e311886e3d | |||
3cb11877aa | |||
5951fcd50a | |||
ada44e5ba7 | |||
9df0176408 | |||
94c746bb43 | |||
473208cb18 | |||
fb731fe371 | |||
a9ee4250d5 | |||
14ecc03361 | |||
1cc62c2cb9 | |||
f58a680d09 | |||
944a140e90 | |||
79ab84e9b8 | |||
2b0f9b1f61 | |||
b40f48d191 | |||
4d055982e3 | |||
bc9091a524 | |||
a26bf38927 | |||
da05b7fb94 | |||
82b1c48292 | |||
a369350065 | |||
ff611d971f | |||
4805a6ead6 | |||
a8b9736737 | |||
4b11428cb5 | |||
a04a13c449 | |||
a23f4471b9 | |||
06a67a8948 | |||
9513b9d03f | |||
0b19d463d9 | |||
5763ec5f8d | |||
2043f6911e | |||
bc65253369 | |||
51a708ffc6 | |||
55d888a616 | |||
0a99b026d6 | |||
ac706bfc7f | |||
9d184bda2f | |||
ea74fdd24a | |||
e71bb021b9 | |||
fb9a5d248f | |||
ddf502c988 | |||
555f356254 | |||
59f9b25f3c | |||
fedbd1a48e | |||
5484890539 | |||
61a7b09ef3 | |||
e92e3eaf4e | |||
0a9d450168 | |||
e265b719bd | |||
7637c9718a | |||
49d0332cef | |||
84dec060b7 | |||
5b0df2565e | |||
0cb36e2d62 | |||
584a0510b3 | |||
9768d393fa | |||
900fba4c07 | |||
03852ddc22 | |||
8554c8007d | |||
651b4a68f2 | |||
144965ca9a | |||
ee0992871c | |||
05dfd312cf | |||
abeae997a3 | |||
3f83e3eeca | |||
0640cfa38c | |||
e4c17d5e1c | |||
cc0faeb80f | |||
205241a0d5 | |||
19625daf88 | |||
dbf7d421da | |||
b86d5cef68 | |||
30587195d3 | |||
250ae2531c | |||
011026205a | |||
4657a84bc5 | |||
5606c516fd | |||
7afb834f93 | |||
148789ddd8 | |||
3beb915004 | |||
cf3247b74a | |||
46915b1361 | |||
8c3f206457 | |||
41971335c9 | |||
ea5f88dca6 | |||
f2ecf6145f | |||
b26da7741b | |||
243b12e565 | |||
b7b1109f49 | |||
26807dcf27 | |||
4f36743f5e | |||
05d7288e31 | |||
5a54db14e3 | |||
90618581e9 | |||
4e13eca713 | |||
156a377f4c | |||
6200584193 | |||
e40ade5182 | |||
e241a07e6b | |||
7f9fc7e67c | |||
1b389025ba | |||
6c5227ba00 | |||
c8c221c0b3 | |||
3341c131b7 | |||
9cd521de4d | |||
058fb1790f | |||
add0b450bd | |||
4c1fabf2c9 | |||
a2ad16be72 | |||
5fb07acbc3 | |||
336bff6d58 | |||
12151c96d9 | |||
4486a6dbfd | |||
a5e68814d5 | |||
ef4cca2d79 | |||
1c6057fd17 | |||
7e433d5f42 | |||
b7def5ff1c | |||
7cf31b4a42 | |||
08799217ae | |||
48315181c7 | |||
38371f693b | |||
c062550a35 | |||
9345279c6e | |||
194539e9c3 | |||
bcf50636ba | |||
6b2bef10af | |||
1e4d8b5a4a | |||
725c327284 | |||
f87d117939 | |||
5633283574 | |||
5b10b0a96f | |||
fb462cec8d | |||
9b0013c6bb | |||
6ea91f0672 | |||
6fe7456aa1 | |||
e8cca7bac7 | |||
59c3cac454 | |||
826f12b829 | |||
86d8af6a6c | |||
0bb733ba23 | |||
0f21fa84fb | |||
aa11628576 | |||
9ca080db87 | |||
1ea9cde598 | |||
edb92e16ba | |||
3321acc92e | |||
1f57e0e04d | |||
c68af9af1b | |||
5aee022d8b | |||
31326a9ad7 | |||
a0308edb6c | |||
9508d73307 | |||
066bf29334 | |||
5221448574 | |||
191693ac85 | |||
aacb944079 | |||
6b84cb29f9 | |||
7f14b42adf | |||
e90148c91d | |||
a529a5daf5 | |||
e15f4248ad | |||
9056279f81 | |||
f45f6e86b9 | |||
9c189ed29a | |||
2eff14c445 | |||
7a92b51196 | |||
8b97e4dd8c | |||
627ba41136 | |||
f4406689b8 | |||
7444debaca | |||
8c928372b3 | |||
22f3347fd9 | |||
0d77364ee3 | |||
f44a9eee47 | |||
ff7dd1776f | |||
2a8795a981 | |||
a8ec7babcf | |||
beed033b6e | |||
93854e83b7 | |||
4b9a6f7211 | |||
4ff9b7fa31 | |||
00ae620b9f | |||
702a304b07 | |||
9963845a4e | |||
6c79530637 | |||
bd364c901d | |||
b487003182 | |||
b0556110e5 | |||
1cb0597a89 | |||
157683d862 | |||
92ee5bd9f6 | |||
c4cdcda754 | |||
bb3c911c2d | |||
1f1f22991d | |||
27c50799c1 | |||
0797b2b6a8 | |||
7a08755c5f | |||
0d17029fea | |||
4283d96bcd | |||
b4476ca378 | |||
85857181eb | |||
03b307575a | |||
8088958793 | |||
e1a20988f3 | |||
ed508cc018 | |||
02724b5f64 | |||
44303caabf | |||
11d6ad8b2e | |||
cd80f9a4c3 | |||
442aca44d6 | |||
d89f30ad45 | |||
b4fc42ca80 | |||
cec59b76ca | |||
ecd73c58ee | |||
94995eba07 | |||
11a86ad2fa | |||
dd93883231 | |||
326e751d07 | |||
7d4228dbfd | |||
65fcca4f8c | |||
905b084690 | |||
37ccc532f7 | |||
7599bebead | |||
397ca98510 | |||
4809f43867 | |||
0ebf2447da | |||
91041f559d | |||
ae86e8f6c8 | |||
8b68e5b1bb | |||
e517066f41 | |||
1a195bf7d6 | |||
bfcababbcb | |||
ba71eb496b | |||
ba8d19ec02 | |||
57d64298a0 | |||
e84710d1e7 | |||
9bf41633d7 | |||
83700b4488 | |||
fca7013f85 | |||
590607c599 | |||
5f1225ef48 | |||
96897e721b | |||
d7e0098bf3 | |||
76ca23c41c | |||
a3ec6d64b2 | |||
8c5b070d1f | |||
da4e7c77a1 | |||
5bd7804be2 | |||
e172309880 | |||
e2f64eedaf | |||
2db1a54465 | |||
e3f8141c25 | |||
a9ac9f2635 | |||
1d0f45d5d1 | |||
b40c0b61eb | |||
fb45649df7 | |||
7caf6c801d | |||
493bd625e2 | |||
4781d72faa | |||
9bdf87e891 | |||
f85954e043 | |||
7702855228 | |||
9a5278225f | |||
8532033679 | |||
8dff457f42 | |||
a9537b626c | |||
82765dad16 | |||
cd995bfb2a | |||
1e8e9f745e | |||
af3d069094 | |||
ba0d0de5e6 | |||
4cc13c4af6 | |||
565fd07909 | |||
b85f10ea50 | |||
fadc936fad | |||
b7860c7863 | |||
9222552572 | |||
3584e84c24 | |||
b146ca74f0 | |||
eddddea908 | |||
80bcaa4195 | |||
88cd9f34b0 | |||
2b19d85d70 | |||
06a40b6850 | |||
0a624c2dc5 | |||
4cfc0a3208 | |||
3232b57cd8 | |||
3404c1f0cf | |||
aab949aa96 | |||
6442ae9256 | |||
db188503cb | |||
693116f765 | |||
9a4ac71b58 | |||
8387984257 | |||
54a7e5b598 | |||
ed03492238 | |||
752f202ef3 | |||
ed051c3084 | |||
39456edbba | |||
a1dad2f2d2 | |||
53ab73090e | |||
08e9dd280f | |||
163f0d8f2a | |||
f742b32a2f | |||
317520bf6e | |||
dfa2649434 | |||
52772765e0 | |||
c54778625e | |||
81c7445eb9 | |||
28aae93f24 | |||
b354328ecd | |||
d75d30eeb6 | |||
cb711c8fa0 | |||
981c99fdff | |||
054cd4ca28 | |||
f4d60a68dd | |||
6defd5084e | |||
b4e3c9ea34 | |||
fcc682be4b | |||
ed6ae20cf0 | |||
02a9d9095f | |||
86eaf452c3 | |||
297daa1d30 | |||
a355158fcb | |||
4dce5b71a0 | |||
fc0376e8b1 | |||
ffe11b2bf2 | |||
4cc8b60d1b | |||
f5bbaa2253 | |||
924fc52e18 | |||
b83d8827bc | |||
6f23f53599 | |||
e3f2597b45 | |||
effe376db0 | |||
fcbf7c749a | |||
8bda95228f | |||
8d070187e3 | |||
c515385b0a | |||
d6237721c0 | |||
ab8874bd26 | |||
bc6e0661a6 | |||
e5edd013ab | |||
75f489d37f | |||
3eb7084f7a | |||
86251eff40 | |||
1b3d69b59f | |||
92f41ccc26 | |||
95bc3da9f8 | |||
9f18482d41 | |||
c5b46b5408 | |||
179dcc10e4 | |||
7a41f20794 | |||
178fe7aa98 | |||
2e14069081 | |||
391473cca0 | |||
b9dc2fa4f7 | |||
a73d9e0aec | |||
06b3265cb1 | |||
dea4864ce0 | |||
4f5be56612 | |||
0f31445139 | |||
5b4e0255d7 | |||
44d0800d60 | |||
a5c61eb78d | |||
bbe681ed51 | |||
ed911747c2 | |||
777eca9f16 | |||
476874b37f | |||
5dc75f72d4 | |||
f88d7a7a34 | |||
98bb0c0e78 | |||
76fe88fa56 | |||
86670b39fa | |||
c78bbdf410 | |||
b9afdd9bcc | |||
7381c77724 | |||
ab655816b8 | |||
41e8b826d0 | |||
5430990bd7 | |||
55108074c0 | |||
84b77ec128 | |||
8134684d44 | |||
2af7c67e48 | |||
38757d94f1 | |||
1b58e7adab | |||
8186af5a26 | |||
bdacf08b86 | |||
987314aa96 | |||
39a8f66d59 | |||
0b73f7c871 | |||
a4c7e7f983 | |||
3ee8828c87 | |||
f56bfb3030 | |||
12f9942b10 | |||
c5589074e6 | |||
30a1cc11a4 | |||
19a01382bc | |||
df72078fe1 | |||
85111cd165 | |||
edf7bb4f51 | |||
bbb930aba2 | |||
60b41de0ca | |||
e38a335d7f | |||
9d8cf24b3b | |||
be56a8d7ac | |||
3effe0c293 | |||
2fde2090d0 | |||
5d8d126249 | |||
378c121d5e | |||
7e83d50845 | |||
6f05d58f2b | |||
a7eb153bba | |||
ed6df0e324 | |||
5c79a55e7e | |||
3d06ff82a8 | |||
2efa5eaa65 | |||
c2510fcd86 | |||
510c398a4f | |||
63a96eaeb8 | |||
2b8d3b1b2b | |||
bf1ebe0531 | |||
433a247102 | |||
8a47f9d03b | |||
9e5f4a844c | |||
7c1f627828 | |||
b3b4d28f4c | |||
ae1094b72b | |||
eda0a9cc90 | |||
d74ccf4ffe | |||
689fba032d | |||
c1d69d5dd5 | |||
e49acfc5c5 | |||
034e996d37 | |||
16c3b4143b | |||
54a4d34d10 | |||
78684e27ac | |||
40e39ae21f | |||
e466dab164 | |||
d27d36136c | |||
815545f2dd | |||
d26ca5de05 | |||
2022588295 | |||
02715d0876 | |||
17687eb792 | |||
7cda4017dd | |||
3e56a9cdfb | |||
ee9ac36c23 | |||
9be5860bc3 | |||
548c9d8281 | |||
71a650ad56 | |||
2471cc3355 | |||
db00e1699a | |||
5ea832e5f6 | |||
a952956d05 | |||
63e87d6d05 | |||
f7127b9b94 | |||
44f5b93122 | |||
e0fd48be7d | |||
43f7216327 | |||
8a8fac1131 | |||
bcc98bb2a4 | |||
524e827095 | |||
9968edd002 | |||
7275f28045 | |||
7be862ab8f | |||
336f1e2d35 | |||
a46ea8a364 | |||
f41d017aa6 | |||
52e4e41cbc | |||
64f2ec77f8 | |||
fdc5b42a8f | |||
d58ed04d89 | |||
386bc9e2e9 | |||
f2e712ca14 | |||
99c1a6bdd9 | |||
4ed1b03f72 | |||
8f9a191db6 | |||
ef97bd4713 | |||
f0b388665e | |||
c9a5bf09ba | |||
dfcda613b6 | |||
0e7f02fe2e | |||
308b88bde9 | |||
c51da57b55 | |||
f9544f1f0c | |||
11c71053e0 | |||
22abe6ded4 | |||
2b82c61f04 | |||
f651e28f80 | |||
e7167dbacf | |||
6c42afe196 | |||
f7130c097e | |||
ad86c05b78 | |||
b359571c60 | |||
a6fab82b16 | |||
dd3e7170c2 | |||
7081b8233a | |||
7b392bac13 | |||
19ae5afdaa | |||
3fd84a8592 | |||
d56f11a1f2 | |||
794b95d54b | |||
e3fe001d9e | |||
660dbea909 | |||
5cfe4377d6 | |||
898179331e | |||
2e64e45b0b | |||
e472daa809 | |||
ec816d73b4 | |||
f17f658125 | |||
c9174a20f7 | |||
b6276a425f | |||
a0e0abd037 | |||
b221be9140 | |||
8408522976 | |||
c329a8f19c | |||
5dfd8a9c7a | |||
8c2e450082 | |||
2bb33e7a08 | |||
4ce6e6ec88 | |||
382598ef87 | |||
dc524efb4d | |||
5d5a5b3501 | |||
404008e3ef | |||
b642a5c118 | |||
493f42a541 | |||
662c1cfed2 | |||
5cc4e856fd | |||
7597988f1b | |||
9620994067 | |||
e124a0d88c | |||
7cfd054075 | |||
d40aaa42ee | |||
11c07c848c | |||
db259bd6b8 | |||
d5cdc36943 | |||
541584d22e | |||
c0e155a8d2 | |||
48560eef80 | |||
fd4f704905 | |||
60e66d11ab | |||
4b4c2a7b1d | |||
af9c92b4cb | |||
c09cf29d7d | |||
6f60cfe9b1 | |||
e20784f228 | |||
172853547a | |||
e0ab1b538a | |||
3f569f9af7 | |||
94716db222 | |||
06f39a71b6 | |||
36dd598bda | |||
32983ea698 | |||
5e636d664a | |||
eaf32fffb7 | |||
0e9d8032a3 | |||
0105cd89ab | |||
d5d14ee823 | |||
156bc243f0 | |||
bd6b5fddbf | |||
54701a0c94 | |||
0edc1b91f7 | |||
9f5276dc07 | |||
9d175bc7e6 | |||
b096341963 | |||
82eefaedd9 | |||
c553c55be7 | |||
d5a89178b0 | |||
bdb7819166 | |||
34c8033fd3 | |||
ab2294d828 | |||
3173616532 | |||
8c0df6fe17 | |||
0364db7cd1 | |||
f8c0a4bd28 | |||
4c8eb65efb | |||
5a2db5152d | |||
0a63053fe9 | |||
bb476310a4 | |||
fa1c20ae92 | |||
77676753ec | |||
617e3f69f8 | |||
ab6cb34480 | |||
c6a27bae36 | |||
563fd95563 | |||
6ef70edd9a | |||
3df6360e8c | |||
d0a9629435 | |||
22edb457c9 | |||
e5f6ffd810 | |||
019e30e3b8 | |||
4500a4aa50 | |||
6bc263809d | |||
ffac0de07e | |||
01b0f09931 | |||
6401d1d53d | |||
3a5677a380 | |||
02608e560a | |||
e1aee86646 | |||
1c8844d9e7 | |||
720c2c46b1 | |||
3bc6bdc866 | |||
47f10d0ad0 | |||
0f9c1b374f | |||
b146e1a264 | |||
c78fce9e79 | |||
023887fc5a | |||
1586521461 | |||
534c454e77 | |||
13bf2655c1 | |||
0bce390269 | |||
a767e50adc | |||
210632fae1 | |||
0596323c35 | |||
c202a7329a | |||
754699610b | |||
8f0998aafe | |||
04bd7e6850 | |||
c811f41cf5 | |||
4d5d627e5f | |||
b40981c630 | |||
b5ce77c1f5 | |||
f40efde2a4 | |||
3ed4384f5b | |||
c174f3a6a5 | |||
6dc2b22269 | |||
f860992db5 | |||
b60569ed94 | |||
4ebd269065 | |||
7709ff5512 | |||
fee2377f9e | |||
3dda80e990 | |||
42b48ee672 | |||
a9352bd25e | |||
f096820d0f | |||
d3efd73234 | |||
3684be056d | |||
23491519d2 | |||
f16053f0c9 | |||
c7b6c98d10 | |||
d5e6f42094 | |||
efbf07e7ea | |||
5e18bc3331 | |||
2815eea0d0 | |||
f8cc4c0af8 | |||
117db5601d | |||
ed5d6d2a20 | |||
c038719731 | |||
b54eac2a5e | |||
39b71d11fc | |||
e3afbb0362 | |||
3b4b5f8d47 | |||
da1f337bc4 | |||
fab53dfdf1 | |||
ffaed8c569 | |||
b1a54fab9b | |||
ccb67f39b4 | |||
f79689bd3d | |||
a1282b1823 | |||
771be85704 | |||
86ced14453 | |||
12cb06e574 | |||
c27f83dd91 | |||
11f7e2f145 | |||
018e9826a2 | |||
41f6acef83 | |||
29f76ec0f3 | |||
721d2580db | |||
aec569da23 | |||
b147b6c0e3 | |||
e959dd017d | |||
9d677389cb | |||
347ace4c7a | |||
f8293116f5 | |||
1913c915e0 | |||
2796f31b5e | |||
bccb8473fe | |||
6cc490d40b | |||
836bb1941b | |||
2380115f97 | |||
90b973a2e2 | |||
772d590415 | |||
996206e66f | |||
0629dfb860 | |||
67f8270516 | |||
aeffb68d34 | |||
064a7db7fc | |||
2eb744c08d | |||
0c58bdd8fb | |||
cdb144fcf0 | |||
8147c4a904 | |||
88c6199db0 | |||
51eb8e8f84 | |||
a92b24cd83 | |||
5692cbb818 | |||
30d2648a4a | |||
adf6dd1e44 | |||
f810480dbe | |||
0e47312ae5 | |||
ef6dfa06a9 | |||
e8217ad8be | |||
e3320965b4 | |||
a1e4f1f98a | |||
c14110056f | |||
1e4c5b666a | |||
61712e6f2b | |||
2815ade9a8 | |||
feea575082 | |||
253cbadade | |||
b6b2871555 | |||
a95bee9ed6 | |||
f30e072cb4 | |||
66ad843583 | |||
f0a5a3b453 | |||
cd1a924dba | |||
d283fc79b1 | |||
5a0926a26e | |||
20e40492b0 | |||
130d4973bd | |||
3ee75b7eac | |||
6b7767fc8d | |||
0decd966af | |||
7c51619e7f | |||
4048a144ab | |||
dcb97cd519 | |||
8a88c6e85a | |||
75a7d9e868 | |||
2860f5c4f5 | |||
456b7451c7 | |||
36fd1ac932 | |||
84c588e5ea | |||
b22b93a6ba | |||
f7c730107e | |||
eeaefa1336 | |||
216bd6091e | |||
d0cfa3e5bf | |||
21b5dc7a6a | |||
d158e9ea82 | |||
60abb0d327 | |||
ff8b53c056 | |||
5118a8f8a5 | |||
aa2d54148d | |||
adf9644440 | |||
414ad47045 | |||
43523bf168 | |||
75f3e5a88d | |||
588b5fb94b | |||
968f90ce73 | |||
4a80ddfbe7 | |||
064288cbab | |||
cc3ea2d840 | |||
cf0749c92f | |||
cbcffce48a | |||
640703d95f | |||
1155c53e7d | |||
51853b358e | |||
6b05842e47 | |||
2c76f31221 | |||
b754b1fa43 | |||
e6d8ed02cb | |||
195ef1bce8 | |||
b6c00dfe24 | |||
710b92cf3b | |||
1eea2c4fe3 | |||
7392470da4 | |||
382c6190c1 | |||
e290a4c645 | |||
4ab4d29cbe | |||
56c69bedcc | |||
8e8bbfc803 | |||
a4b59498c5 | |||
89aa708b39 | |||
863327ae49 | |||
7e54c02a35 | |||
3bdd5ae334 | |||
6215e90b7b | |||
e3977e843d | |||
eb9efb37c8 | |||
6089ebcf6d | |||
e0447bb5f8 | |||
1fff6356d9 | |||
9c39bc2480 | |||
e6ed4074e8 | |||
80d89974c1 | |||
6df6eacce8 | |||
dcb8982969 | |||
36666033ab | |||
7b7eafe7ba | |||
1c3f5e902d | |||
fc10d4b1d6 | |||
262654ee51 | |||
7f6e7103a3 | |||
aff9c1eec5 | |||
17dab018e3 | |||
977abe786d | |||
81759afed4 | |||
b6e625e34f | |||
43a09189c6 | |||
9fe2d156a9 | |||
13efb2c858 | |||
039a1ce0eb | |||
e15ea965a1 | |||
61eaaa21a4 | |||
21990fbad9 | |||
c808af514d | |||
2f94f69b7c | |||
197c1869f5 | |||
2d39a48d52 | |||
53e0b9c393 | |||
de45c5f673 | |||
18b01afa9e | |||
bbf1a6feac | |||
455dfd2589 | |||
50b2069b61 | |||
dfc31b3345 | |||
0d01bafc34 | |||
127695eb5c | |||
0a16818d5b | |||
98e594b565 | |||
a730c65fe3 | |||
4585c33e74 | |||
7521cd9111 | |||
68e023cbbb | |||
df9e5a276b | |||
81bf278537 | |||
8da774d81f | |||
78ee2ee90e | |||
5db9a2b54a | |||
b50075343a | |||
e581f015ee | |||
b5bfbba184 | |||
214e2959dc | |||
4c0091fda6 | |||
85df746892 | |||
2c6324a1eb | |||
a25d1443fa | |||
451b525bf0 | |||
204db27a0c | |||
653c52fe52 | |||
acaf6ba3c6 | |||
d98fa4a103 | |||
1e7e21ec5d | |||
61f6aa36b9 | |||
53057fc16a | |||
95a7d1912a | |||
6de41ce0f8 | |||
3257c8f74c | |||
e7a66166ce | |||
fe1f1a38df | |||
48e7b62d3a | |||
e99a2a2dba | |||
070aa59e49 | |||
6c24c6633a | |||
09ffba3cf7 | |||
4bc3e4b497 | |||
c1a629f76d | |||
e071837594 | |||
1051b93192 | |||
8eb3c5b7a1 | |||
029e2b05c2 | |||
c2185dc4a5 | |||
19ffb5e6f7 | |||
0ab075a69e | |||
4918502d2e | |||
d9577df312 | |||
62272d5b24 | |||
6c008e2fb5 | |||
44a5f93462 | |||
162ca185ff | |||
9642c75689 | |||
c60327ba74 | |||
4237ee3c33 | |||
194c221e0a | |||
f5f4beaf56 | |||
558d7f7db0 | |||
568ca89bac | |||
beb52f5c0a | |||
9b498d3bb2 | |||
3608737347 | |||
d06a406656 | |||
e8cf5ff564 | |||
41910d7a94 | |||
02c7ab2f9b | |||
d797038ea9 | |||
0d8e4e2327 | |||
06930706a1 | |||
3dd872e6d5 | |||
6459a5c7a9 | |||
fd4bb29410 | |||
313a6a8ef9 | |||
4bd18e31e5 | |||
2ff3280c77 | |||
d8bb5ac260 | |||
ce97a5dcfa | |||
c48d0f4643 | |||
e96f530af5 | |||
4ee4863232 | |||
310e8361c5 | |||
fa0ea57f5e | |||
3efb22e091 | |||
26f7ca3972 | |||
dfef1e4408 | |||
1dc1eedd43 | |||
aa280ea19f | |||
19f851ce10 | |||
376c16703c | |||
c1ad4b8e7a | |||
f97f03c7ef | |||
a00a697c17 | |||
2d7e6c6241 | |||
af284b45d5 | |||
644cc58dff | |||
5ad2bee2c8 | |||
4491326fb0 | |||
6e17315cd3 | |||
e2c9d8d641 | |||
cb853945a7 | |||
4c59edf0c5 | |||
795a6a0aff | |||
dd78d6e7ea |
2
.bazelrc
2
.bazelrc
@ -2,7 +2,7 @@ build --cxxopt=--std=c++17
|
||||
build --copt=-I.
|
||||
# Bazel does not support including its cc_library targets as system
|
||||
# headers. We work around this for generated code
|
||||
# (e.g. c10/macros/cmake_macros.h) by making the generated directory a
|
||||
# (e.g. torch/headeronly/macros/cmake_macros.h) by making the generated directory a
|
||||
# system include path.
|
||||
build --copt=-isystem --copt bazel-out/k8-fastbuild/bin
|
||||
build --copt=-isystem --copt bazel-out/darwin-fastbuild/bin
|
||||
|
@ -4,7 +4,7 @@ set -eux -o pipefail
|
||||
GPU_ARCH_VERSION=${GPU_ARCH_VERSION:-}
|
||||
|
||||
if [[ "$GPU_ARCH_VERSION" == *"12.9"* ]]; then
|
||||
export TORCH_CUDA_ARCH_LIST="9.0;10.0;12.0"
|
||||
export TORCH_CUDA_ARCH_LIST="8.0;9.0;10.0;12.0"
|
||||
fi
|
||||
|
||||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
@ -79,6 +79,7 @@ def package_cuda_wheel(wheel_path, desired_cuda) -> None:
|
||||
os.system(f"unzip {wheel_path} -d {folder}/tmp")
|
||||
libs_to_copy = [
|
||||
"/usr/local/cuda/extras/CUPTI/lib64/libcupti.so.12",
|
||||
"/usr/local/cuda/extras/CUPTI/lib64/libnvperf_host.so",
|
||||
"/usr/local/cuda/lib64/libcudnn.so.9",
|
||||
"/usr/local/cuda/lib64/libcublas.so.12",
|
||||
"/usr/local/cuda/lib64/libcublasLt.so.12",
|
||||
@ -88,6 +89,7 @@ def package_cuda_wheel(wheel_path, desired_cuda) -> None:
|
||||
"/usr/local/cuda/lib64/libcusparseLt.so.0",
|
||||
"/usr/local/cuda/lib64/libcusolver.so.11",
|
||||
"/usr/local/cuda/lib64/libcurand.so.10",
|
||||
"/usr/local/cuda/lib64/libnccl.so.2",
|
||||
"/usr/local/cuda/lib64/libnvJitLink.so.12",
|
||||
"/usr/local/cuda/lib64/libnvrtc.so.12",
|
||||
"/usr/local/cuda/lib64/libcudnn_adv.so.9",
|
||||
|
@ -5,7 +5,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
||||
|
||||
if [[ ${BUILD_ENVIRONMENT} == *onnx* ]]; then
|
||||
pip install click mock tabulate networkx==2.0
|
||||
pip -q install --user "file:///var/lib/jenkins/workspace/third_party/onnx#egg=onnx"
|
||||
pip -q install "file:///var/lib/jenkins/workspace/third_party/onnx#egg=onnx"
|
||||
fi
|
||||
|
||||
# Skip tests in environments where they are not built/applicable
|
||||
@ -147,8 +147,8 @@ export DNNL_MAX_CPU_ISA=AVX2
|
||||
if [[ "${SHARD_NUMBER:-1}" == "1" ]]; then
|
||||
# TODO(sdym@meta.com) remove this when the linked issue resolved.
|
||||
# py is temporary until https://github.com/Teemu/pytest-sugar/issues/241 is fixed
|
||||
pip install --user py==1.11.0
|
||||
pip install --user pytest-sugar
|
||||
pip install py==1.11.0
|
||||
pip install pytest-sugar
|
||||
# NB: Warnings are disabled because they make it harder to see what
|
||||
# the actual erroring test is
|
||||
"$PYTHON" \
|
||||
|
@ -36,3 +36,104 @@ See `build.sh` for valid build environments (it's the giant switch).
|
||||
# Set flags (see build.sh) and build image
|
||||
sudo bash -c 'TRITON=1 ./build.sh pytorch-linux-bionic-py3.8-gcc9 -t myimage:latest
|
||||
```
|
||||
|
||||
## [Guidance] Adding a New Base Docker Image
|
||||
|
||||
### Background
|
||||
|
||||
The base Docker images in directory `.ci/docker/` are built by the `docker-builds.yml` workflow. Those images are used throughout the PyTorch CI/CD pipeline. You should only create or modify a base Docker image if you need specific environment changes or dependencies before building PyTorch on CI.
|
||||
|
||||
1. **Automatic Rebuilding**:
|
||||
- The Docker image building process is triggered automatically when changes are made to files in the `.ci/docker/*` directory
|
||||
- This ensures all images stay up-to-date with the latest dependencies and configurations
|
||||
|
||||
2. **Image Reuse in PyTorch Build Workflows** (example: linux-build):
|
||||
- The images generated by `docker-builds.yml` are reused in `_linux-build.yml` through the `calculate-docker-image` step
|
||||
- The `_linux-build.yml` workflow:
|
||||
- Pulls the Docker image determined by the `calculate-docker-image` step
|
||||
- Runs a Docker container with that image
|
||||
- Executes `.ci/pytorch/build.sh` inside the container to build PyTorch
|
||||
|
||||
3. **Usage in Test Workflows** (example: linux-test):
|
||||
- The same Docker images are also used in `_linux-test.yml` for running tests
|
||||
- The `_linux-test.yml` workflow follows a similar pattern:
|
||||
- It uses the `calculate-docker-image` step to determine which Docker image to use
|
||||
- It pulls the Docker image and runs a container with that image
|
||||
- It installs the wheels from the artifacts generated by PyTorch build jobs
|
||||
- It executes test scripts (like `.ci/pytorch/test.sh` or `.ci/pytorch/multigpu-test.sh`) inside the container
|
||||
|
||||
### Understanding File Purposes
|
||||
|
||||
#### `.ci/docker/build.sh` vs `.ci/pytorch/build.sh`
|
||||
- **`.ci/docker/build.sh`**:
|
||||
- Used for building base Docker images
|
||||
- Executed by the `docker-builds.yml` workflow to pre-build Docker images for CI
|
||||
- Contains configurations for different Docker build environments
|
||||
|
||||
- **`.ci/pytorch/build.sh`**:
|
||||
- Used for building PyTorch inside a Docker container
|
||||
- Called by workflows like `_linux-build.yml` after the Docker container is started
|
||||
- Builds PyTorch wheels and other artifacts
|
||||
|
||||
#### `.ci/docker/ci_commit_pins/` vs `.github/ci_commit_pins`
|
||||
- **`.ci/docker/ci_commit_pins/`**:
|
||||
- Used for pinning dependency versions during base Docker image building
|
||||
- Ensures consistent environments for building PyTorch
|
||||
- Changes here trigger base Docker image rebuilds
|
||||
|
||||
- **`.github/ci_commit_pins`**:
|
||||
- Used for pinning dependency versions during PyTorch building and tests
|
||||
- Ensures consistent dependencies for PyTorch across different builds
|
||||
- Used by build scripts running inside Docker containers
|
||||
|
||||
### Step-by-Step Guide for Adding a New Base Docker Image
|
||||
|
||||
#### 1. Add Pinned Commits (If Applicable)
|
||||
|
||||
We use pinned commits for build stability. The `nightly.yml` workflow checks and updates pinned commits for certain repository dependencies daily.
|
||||
|
||||
If your new Docker image needs a library installed from a specific pinned commit or built from source:
|
||||
|
||||
1. Add the repository you want to track in `nightly.yml` and `merge-rules.yml`
|
||||
2. Add the initial pinned commit in `.ci/docker/ci_commit_pins/`. The text filename should match the one defined in step 1
|
||||
|
||||
#### 2. Configure the Base Docker Image
|
||||
1. **Add new Base Docker image configuration** (if applicable):
|
||||
|
||||
Add the configuration in `.ci/docker/build.sh`. For example:
|
||||
```bash
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3.12-gcc11-new1)
|
||||
CUDA_VERSION=12.8.1
|
||||
ANACONDA_PYTHON_VERSION=3.12
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
KATEX=yes
|
||||
UCX_COMMIT=${_UCX_COMMIT}
|
||||
UCC_COMMIT=${_UCC_COMMIT}
|
||||
TRITON=yes
|
||||
NEW_ARG_1=yes
|
||||
;;
|
||||
```
|
||||
|
||||
2. **Add build arguments to Docker build command**:
|
||||
|
||||
If you're introducing a new argument to the Docker build, make sure to add it in the Docker build step in `.ci/docker/build.sh`:
|
||||
```bash
|
||||
docker build \
|
||||
....
|
||||
--build-arg "NEW_ARG_1=${NEW_ARG_1}"
|
||||
```
|
||||
|
||||
3. **Update Dockerfile logic**:
|
||||
|
||||
Update the Dockerfile to use the new argument. For example, in `ubuntu/Dockerfile`:
|
||||
```dockerfile
|
||||
ARG NEW_ARG_1
|
||||
# Set up environment for NEW_ARG_1
|
||||
RUN if [ -n "${NEW_ARG_1}" ]; then bash ./do_something.sh; fi
|
||||
```
|
||||
|
||||
4. **Add the Docker configuration** in `.github/workflows/docker-builds.yml`:
|
||||
|
||||
The `docker-builds.yml` workflow pre-builds the Docker images whenever changes occur in the `.ci/docker/` directory. This includes the
|
||||
pinned commit updates.
|
||||
|
@ -52,6 +52,8 @@ fi
|
||||
|
||||
if [[ "$image" == *-jammy* ]]; then
|
||||
UBUNTU_VERSION=22.04
|
||||
elif [[ "$image" == *-noble* ]]; then
|
||||
UBUNTU_VERSION=24.04
|
||||
elif [[ "$image" == *ubuntu* ]]; then
|
||||
extract_version_from_image_name ubuntu UBUNTU_VERSION
|
||||
fi
|
||||
@ -89,9 +91,18 @@ tag=$(echo $image | awk -F':' '{print $2}')
|
||||
# configuration, so we hardcode everything here rather than do it
|
||||
# from scratch
|
||||
case "$tag" in
|
||||
pytorch-linux-jammy-cuda12.4-cudnn9-py3-gcc11)
|
||||
CUDA_VERSION=12.4
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
KATEX=yes
|
||||
UCX_COMMIT=${_UCX_COMMIT}
|
||||
UCC_COMMIT=${_UCC_COMMIT}
|
||||
TRITON=yes
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11)
|
||||
CUDA_VERSION=12.8.1
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
@ -102,7 +113,6 @@ case "$tag" in
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc9-inductor-benchmarks)
|
||||
CUDA_VERSION=12.8.1
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -114,7 +124,6 @@ case "$tag" in
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3.12-gcc9-inductor-benchmarks)
|
||||
CUDA_VERSION=12.8.1
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.12
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -126,7 +135,6 @@ case "$tag" in
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3.13-gcc9-inductor-benchmarks)
|
||||
CUDA_VERSION=12.8.1
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.13
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -138,7 +146,6 @@ case "$tag" in
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.6-cudnn9-py3-gcc9)
|
||||
CUDA_VERSION=12.6.3
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -147,9 +154,18 @@ case "$tag" in
|
||||
UCC_COMMIT=${_UCC_COMMIT}
|
||||
TRITON=yes
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3.12-gcc11-vllm)
|
||||
CUDA_VERSION=12.8.1
|
||||
ANACONDA_PYTHON_VERSION=3.12
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
KATEX=yes
|
||||
UCX_COMMIT=${_UCX_COMMIT}
|
||||
UCC_COMMIT=${_UCC_COMMIT}
|
||||
TRITON=yes
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.6-cudnn9-py3-gcc9-inductor-benchmarks)
|
||||
CUDA_VERSION=12.6
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -161,7 +177,6 @@ case "$tag" in
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.6-cudnn9-py3.12-gcc9-inductor-benchmarks)
|
||||
CUDA_VERSION=12.6
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.12
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -173,7 +188,6 @@ case "$tag" in
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.6-cudnn9-py3.13-gcc9-inductor-benchmarks)
|
||||
CUDA_VERSION=12.6
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.13
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -185,7 +199,6 @@ case "$tag" in
|
||||
;;
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc9)
|
||||
CUDA_VERSION=12.8.1
|
||||
CUDNN_VERSION=9
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
GCC_VERSION=9
|
||||
VISION=yes
|
||||
@ -218,20 +231,12 @@ case "$tag" in
|
||||
VISION=yes
|
||||
TRITON=yes
|
||||
;;
|
||||
pytorch-linux-jammy-rocm-n-1-py3)
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
ROCM_VERSION=6.3
|
||||
NINJA_VERSION=1.9.0
|
||||
TRITON=yes
|
||||
KATEX=yes
|
||||
UCX_COMMIT=${_UCX_COMMIT}
|
||||
UCC_COMMIT=${_UCC_COMMIT}
|
||||
INDUCTOR_BENCHMARKS=yes
|
||||
;;
|
||||
pytorch-linux-jammy-rocm-n-py3)
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
pytorch-linux-jammy-rocm-n-py3 | pytorch-linux-noble-rocm-n-py3)
|
||||
if [[ $tag =~ "jammy" ]]; then
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
else
|
||||
ANACONDA_PYTHON_VERSION=3.12
|
||||
fi
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
ROCM_VERSION=6.4
|
||||
@ -242,6 +247,19 @@ case "$tag" in
|
||||
UCC_COMMIT=${_UCC_COMMIT}
|
||||
INDUCTOR_BENCHMARKS=yes
|
||||
;;
|
||||
pytorch-linux-noble-rocm-alpha-py3)
|
||||
ANACONDA_PYTHON_VERSION=3.12
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
ROCM_VERSION=7.0
|
||||
NINJA_VERSION=1.9.0
|
||||
TRITON=yes
|
||||
KATEX=yes
|
||||
UCX_COMMIT=${_UCX_COMMIT}
|
||||
UCC_COMMIT=${_UCC_COMMIT}
|
||||
INDUCTOR_BENCHMARKS=yes
|
||||
PYTORCH_ROCM_ARCH="gfx90a;gfx942;gfx950"
|
||||
;;
|
||||
pytorch-linux-jammy-xpu-2025.0-py3)
|
||||
ANACONDA_PYTHON_VERSION=3.9
|
||||
GCC_VERSION=11
|
||||
@ -258,7 +276,7 @@ case "$tag" in
|
||||
NINJA_VERSION=1.9.0
|
||||
TRITON=yes
|
||||
;;
|
||||
pytorch-linux-jammy-py3.9-gcc11-inductor-benchmarks)
|
||||
pytorch-linux-jammy-py3.9-gcc11-inductor-benchmarks)
|
||||
ANACONDA_PYTHON_VERSION=3.9
|
||||
GCC_VERSION=11
|
||||
VISION=yes
|
||||
@ -270,22 +288,10 @@ case "$tag" in
|
||||
pytorch-linux-jammy-cuda12.8-cudnn9-py3.9-clang12)
|
||||
ANACONDA_PYTHON_VERSION=3.9
|
||||
CUDA_VERSION=12.8.1
|
||||
CUDNN_VERSION=9
|
||||
CLANG_VERSION=12
|
||||
VISION=yes
|
||||
TRITON=yes
|
||||
;;
|
||||
pytorch-linux-jammy-py3-clang12-asan)
|
||||
ANACONDA_PYTHON_VERSION=3.9
|
||||
CLANG_VERSION=12
|
||||
VISION=yes
|
||||
TRITON=yes
|
||||
;;
|
||||
pytorch-linux-jammy-py3-clang15-asan)
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
CLANG_VERSION=15
|
||||
VISION=yes
|
||||
;;
|
||||
pytorch-linux-jammy-py3-clang18-asan)
|
||||
ANACONDA_PYTHON_VERSION=3.10
|
||||
CLANG_VERSION=18
|
||||
@ -333,6 +339,8 @@ case "$tag" in
|
||||
GCC_VERSION=11
|
||||
ACL=yes
|
||||
VISION=yes
|
||||
CONDA_CMAKE=yes
|
||||
OPENBLAS=yes
|
||||
# snadampal: skipping llvm src build install because the current version
|
||||
# from pytorch/llvm:9.0.1 is x86 specific
|
||||
SKIP_LLVM_SRC_BUILD_INSTALL=yes
|
||||
@ -342,6 +350,8 @@ case "$tag" in
|
||||
GCC_VERSION=11
|
||||
ACL=yes
|
||||
VISION=yes
|
||||
CONDA_CMAKE=yes
|
||||
OPENBLAS=yes
|
||||
# snadampal: skipping llvm src build install because the current version
|
||||
# from pytorch/llvm:9.0.1 is x86 specific
|
||||
SKIP_LLVM_SRC_BUILD_INSTALL=yes
|
||||
@ -356,7 +366,6 @@ case "$tag" in
|
||||
fi
|
||||
if [[ "$image" == *cuda* ]]; then
|
||||
extract_version_from_image_name cuda CUDA_VERSION
|
||||
extract_version_from_image_name cudnn CUDNN_VERSION
|
||||
fi
|
||||
if [[ "$image" == *rocm* ]]; then
|
||||
extract_version_from_image_name rocm ROCM_VERSION
|
||||
@ -408,9 +417,6 @@ docker build \
|
||||
--build-arg "PYTHON_VERSION=${PYTHON_VERSION}" \
|
||||
--build-arg "GCC_VERSION=${GCC_VERSION}" \
|
||||
--build-arg "CUDA_VERSION=${CUDA_VERSION}" \
|
||||
--build-arg "CUDNN_VERSION=${CUDNN_VERSION}" \
|
||||
--build-arg "TENSORRT_VERSION=${TENSORRT_VERSION}" \
|
||||
--build-arg "GRADLE_VERSION=${GRADLE_VERSION}" \
|
||||
--build-arg "NINJA_VERSION=${NINJA_VERSION:-}" \
|
||||
--build-arg "KATEX=${KATEX:-}" \
|
||||
--build-arg "ROCM_VERSION=${ROCM_VERSION:-}" \
|
||||
@ -428,6 +434,7 @@ docker build \
|
||||
--build-arg "XPU_VERSION=${XPU_VERSION}" \
|
||||
--build-arg "UNINSTALL_DILL=${UNINSTALL_DILL}" \
|
||||
--build-arg "ACL=${ACL:-}" \
|
||||
--build-arg "OPENBLAS=${OPENBLAS:-}" \
|
||||
--build-arg "SKIP_SCCACHE_INSTALL=${SKIP_SCCACHE_INSTALL:-}" \
|
||||
--build-arg "SKIP_LLVM_SRC_BUILD_INSTALL=${SKIP_LLVM_SRC_BUILD_INSTALL:-}" \
|
||||
-f $(dirname ${DOCKERFILE})/Dockerfile \
|
||||
|
@ -1 +1 @@
|
||||
v2.27.3-1
|
||||
v2.27.5-1
|
||||
|
@ -1 +1 @@
|
||||
c8757738a7418249896224430ce84888e8ecdd79
|
||||
11ec6354315768a85da41032535e3b7b99c5f706
|
||||
|
@ -23,6 +23,10 @@ conda_install() {
|
||||
as_jenkins conda install -q -n py_$ANACONDA_PYTHON_VERSION -y python="$ANACONDA_PYTHON_VERSION" $*
|
||||
}
|
||||
|
||||
conda_install_through_forge() {
|
||||
as_jenkins conda install -c conda-forge -q -n py_$ANACONDA_PYTHON_VERSION -y python="$ANACONDA_PYTHON_VERSION" $*
|
||||
}
|
||||
|
||||
conda_run() {
|
||||
as_jenkins conda run -n py_$ANACONDA_PYTHON_VERSION --no-capture-output $*
|
||||
}
|
||||
|
@ -15,6 +15,9 @@ install_ubuntu() {
|
||||
elif [[ "$UBUNTU_VERSION" == "22.04"* ]]; then
|
||||
cmake3="cmake=3.22*"
|
||||
maybe_libiomp_dev=""
|
||||
elif [[ "$UBUNTU_VERSION" == "24.04"* ]]; then
|
||||
cmake3="cmake=3.28*"
|
||||
maybe_libiomp_dev=""
|
||||
else
|
||||
cmake3="cmake=3.5*"
|
||||
maybe_libiomp_dev="libiomp-dev"
|
||||
|
@ -4,12 +4,8 @@ set -ex
|
||||
|
||||
# Optionally install conda
|
||||
if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
|
||||
BASE_URL="https://repo.anaconda.com/miniconda"
|
||||
CONDA_FILE="Miniconda3-latest-Linux-x86_64.sh"
|
||||
if [[ $(uname -m) == "aarch64" ]] || [[ "$BUILD_ENVIRONMENT" == *xpu* ]] || [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
|
||||
BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" # @lint-ignore
|
||||
CONDA_FILE="Miniforge3-Linux-$(uname -m).sh"
|
||||
fi
|
||||
BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" # @lint-ignore
|
||||
CONDA_FILE="Miniforge3-Linux-$(uname -m).sh"
|
||||
|
||||
MAJOR_PYTHON_VERSION=$(echo "$ANACONDA_PYTHON_VERSION" | cut -d . -f 1)
|
||||
MINOR_PYTHON_VERSION=$(echo "$ANACONDA_PYTHON_VERSION" | cut -d . -f 2)
|
||||
@ -21,7 +17,6 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p /opt/conda
|
||||
chown jenkins:jenkins /opt/conda
|
||||
|
||||
@ -70,10 +65,10 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
|
||||
fi
|
||||
|
||||
# Install PyTorch conda deps, as per https://github.com/pytorch/pytorch README
|
||||
if [[ $(uname -m) == "aarch64" ]]; then
|
||||
conda_install "openblas==0.3.29=*openmp*"
|
||||
else
|
||||
conda_install "mkl=2021.4.0 mkl-include=2021.4.0"
|
||||
if [[ $(uname -m) != "aarch64" ]]; then
|
||||
pip_install mkl==2024.2.0
|
||||
pip_install mkl-static==2024.2.0
|
||||
pip_install mkl-include==2024.2.0
|
||||
fi
|
||||
|
||||
# Install llvm-8 as it is required to compile llvmlite-0.30.0 from source
|
||||
@ -87,6 +82,10 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
|
||||
conda_run ${SCRIPT_FOLDER}/install_magma_conda.sh $(cut -f1-2 -d'.' <<< ${CUDA_VERSION})
|
||||
fi
|
||||
|
||||
if [[ "$UBUNTU_VERSION" == "24.04"* ]] ; then
|
||||
conda_install_through_forge libstdcxx-ng=14
|
||||
fi
|
||||
|
||||
# Install some other packages, including those needed for Python test reporting
|
||||
pip_install -r /opt/conda/requirements-ci.txt
|
||||
|
||||
|
@ -3,11 +3,10 @@
|
||||
set -uex -o pipefail
|
||||
|
||||
PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python
|
||||
PYTHON_DOWNLOAD_GITHUB_BRANCH=https://github.com/python/cpython/archive/refs/heads # @lint-ignore
|
||||
GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
|
||||
|
||||
# Python versions to be installed in /opt/$VERSION_NO
|
||||
CPYTHON_VERSIONS=${CPYTHON_VERSIONS:-"3.9.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.0t"}
|
||||
CPYTHON_VERSIONS=${CPYTHON_VERSIONS:-"3.9.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.0t 3.14.0 3.14.0t"}
|
||||
|
||||
function check_var {
|
||||
if [ -z "$1" ]; then
|
||||
@ -24,9 +23,8 @@ function do_cpython_build {
|
||||
tar -xzf Python-$py_ver.tgz
|
||||
|
||||
local additional_flags=""
|
||||
if [ "$py_ver" == "3.13.0t" ]; then
|
||||
if [[ "$py_ver" == *"t" ]]; then
|
||||
additional_flags=" --disable-gil"
|
||||
mv cpython-3.13/ cpython-3.13t/
|
||||
fi
|
||||
|
||||
pushd $py_folder
|
||||
@ -68,7 +66,7 @@ function do_cpython_build {
|
||||
ln -s pip3 ${prefix}/bin/pip
|
||||
fi
|
||||
# install setuptools since python 3.12 is required to use distutils
|
||||
${prefix}/bin/pip install wheel==0.34.2 setuptools==68.2.2
|
||||
${prefix}/bin/pip install wheel==0.45.1 setuptools==80.9.0
|
||||
local abi_tag=$(${prefix}/bin/python -c "from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag; print('{0}{1}-{2}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag()))")
|
||||
ln -sf ${prefix} /opt/python/${abi_tag}
|
||||
}
|
||||
@ -76,24 +74,20 @@ function do_cpython_build {
|
||||
function build_cpython {
|
||||
local py_ver=$1
|
||||
check_var $py_ver
|
||||
check_var $PYTHON_DOWNLOAD_URL
|
||||
local py_ver_folder=$py_ver
|
||||
local py_suffix=$py_ver
|
||||
local py_folder=$py_ver
|
||||
|
||||
if [ "$py_ver" = "3.13.0t" ]; then
|
||||
PY_VER_SHORT="3.13"
|
||||
PYT_VER_SHORT="3.13t"
|
||||
check_var $PYTHON_DOWNLOAD_GITHUB_BRANCH
|
||||
wget $PYTHON_DOWNLOAD_GITHUB_BRANCH/$PY_VER_SHORT.tar.gz -O Python-$py_ver.tgz
|
||||
do_cpython_build $py_ver cpython-$PYT_VER_SHORT
|
||||
elif [ "$py_ver" = "3.13.0" ]; then
|
||||
PY_VER_SHORT="3.13"
|
||||
check_var $PYTHON_DOWNLOAD_GITHUB_BRANCH
|
||||
wget $PYTHON_DOWNLOAD_GITHUB_BRANCH/$PY_VER_SHORT.tar.gz -O Python-$py_ver.tgz
|
||||
do_cpython_build $py_ver cpython-$PY_VER_SHORT
|
||||
else
|
||||
wget -q $PYTHON_DOWNLOAD_URL/$py_ver_folder/Python-$py_ver.tgz
|
||||
do_cpython_build $py_ver Python-$py_ver
|
||||
# Special handling for nogil
|
||||
if [[ "${py_ver}" == *"t" ]]; then
|
||||
py_suffix=${py_ver::-1}
|
||||
py_folder=$py_suffix
|
||||
fi
|
||||
# Only b3 is available now
|
||||
if [ "$py_suffix" == "3.14.0" ]; then
|
||||
py_suffix="3.14.0b3"
|
||||
fi
|
||||
wget -q $PYTHON_DOWNLOAD_URL/$py_folder/Python-$py_suffix.tgz -O Python-$py_ver.tgz
|
||||
do_cpython_build $py_ver Python-$py_suffix
|
||||
|
||||
rm -f Python-$py_ver.tgz
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ else
|
||||
arch_path='sbsa'
|
||||
fi
|
||||
|
||||
NVSHMEM_VERSION=3.3.9
|
||||
|
||||
function install_cuda {
|
||||
version=$1
|
||||
runfile=$2
|
||||
@ -40,13 +42,65 @@ function install_cudnn {
|
||||
rm -rf tmp_cudnn
|
||||
}
|
||||
|
||||
function install_nvshmem {
|
||||
cuda_major_version=$1 # e.g. "12"
|
||||
nvshmem_version=$2 # e.g. "3.3.9"
|
||||
|
||||
case "${arch_path}" in
|
||||
sbsa)
|
||||
dl_arch="aarch64"
|
||||
;;
|
||||
x86_64)
|
||||
dl_arch="x64"
|
||||
;;
|
||||
*)
|
||||
dl_arch="${arch}"
|
||||
;;
|
||||
esac
|
||||
|
||||
tmpdir="tmp_nvshmem"
|
||||
mkdir -p "${tmpdir}" && cd "${tmpdir}"
|
||||
|
||||
# nvSHMEM license: https://docs.nvidia.com/nvshmem/api/sla.html
|
||||
filename="libnvshmem_cuda${cuda_major_version}-linux-${arch_path}-${nvshmem_version}"
|
||||
url="https://developer.download.nvidia.com/compute/redist/nvshmem/${nvshmem_version}/builds/cuda${cuda_major_version}/txz/agnostic/${dl_arch}/${filename}.tar.gz"
|
||||
|
||||
# download, unpack, install
|
||||
wget -q "${url}"
|
||||
tar xf "${filename}.tar.gz"
|
||||
cp -a "libnvshmem/include/"* /usr/local/include/
|
||||
cp -a "libnvshmem/lib/"* /usr/local/lib/
|
||||
|
||||
# cleanup
|
||||
cd ..
|
||||
rm -rf "${tmpdir}"
|
||||
|
||||
echo "nvSHMEM ${nvshmem_version} for CUDA ${cuda_major_version} (${arch_path}) installed."
|
||||
}
|
||||
|
||||
function install_124 {
|
||||
CUDNN_VERSION=9.1.0.70
|
||||
echo "Installing CUDA 12.4.1 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.6.2"
|
||||
install_cuda 12.4.1 cuda_12.4.1_550.54.15_linux
|
||||
|
||||
install_cudnn 12 $CUDNN_VERSION
|
||||
|
||||
CUDA_VERSION=12.4 bash install_nccl.sh
|
||||
|
||||
CUDA_VERSION=12.4 bash install_cusparselt.sh
|
||||
|
||||
ldconfig
|
||||
}
|
||||
|
||||
function install_126 {
|
||||
CUDNN_VERSION=9.10.2.21
|
||||
echo "Installing CUDA 12.6.3 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.7.1"
|
||||
echo "Installing CUDA 12.6.3 and cuDNN ${CUDNN_VERSION} and NVSHMEM and NCCL and cuSparseLt-0.7.1"
|
||||
install_cuda 12.6.3 cuda_12.6.3_560.35.05_linux
|
||||
|
||||
install_cudnn 12 $CUDNN_VERSION
|
||||
|
||||
install_nvshmem 12 $NVSHMEM_VERSION
|
||||
|
||||
CUDA_VERSION=12.6 bash install_nccl.sh
|
||||
|
||||
CUDA_VERSION=12.6 bash install_cusparselt.sh
|
||||
@ -56,13 +110,15 @@ function install_126 {
|
||||
|
||||
function install_129 {
|
||||
CUDNN_VERSION=9.10.2.21
|
||||
echo "Installing CUDA 12.9.1 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.7.1"
|
||||
echo "Installing CUDA 12.9.1 and cuDNN ${CUDNN_VERSION} and NVSHMEM and NCCL and cuSparseLt-0.7.1"
|
||||
# install CUDA 12.9.1 in the same container
|
||||
install_cuda 12.9.1 cuda_12.9.1_575.57.08_linux
|
||||
|
||||
# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
|
||||
install_cudnn 12 $CUDNN_VERSION
|
||||
|
||||
install_nvshmem 12 $NVSHMEM_VERSION
|
||||
|
||||
CUDA_VERSION=12.9 bash install_nccl.sh
|
||||
|
||||
CUDA_VERSION=12.9 bash install_cusparselt.sh
|
||||
@ -70,6 +126,40 @@ function install_129 {
|
||||
ldconfig
|
||||
}
|
||||
|
||||
function prune_124 {
|
||||
echo "Pruning CUDA 12.4"
|
||||
#####################################################################################
|
||||
# CUDA 12.4 prune static libs
|
||||
#####################################################################################
|
||||
export NVPRUNE="/usr/local/cuda-12.4/bin/nvprune"
|
||||
export CUDA_LIB_DIR="/usr/local/cuda-12.4/lib64"
|
||||
|
||||
export GENCODE="-gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90"
|
||||
export GENCODE_CUDNN="-gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90"
|
||||
|
||||
if [[ -n "$OVERRIDE_GENCODE" ]]; then
|
||||
export GENCODE=$OVERRIDE_GENCODE
|
||||
fi
|
||||
if [[ -n "$OVERRIDE_GENCODE_CUDNN" ]]; then
|
||||
export GENCODE_CUDNN=$OVERRIDE_GENCODE_CUDNN
|
||||
fi
|
||||
|
||||
# all CUDA libs except CuDNN and CuBLAS
|
||||
ls $CUDA_LIB_DIR/ | grep "\.a" | grep -v "culibos" | grep -v "cudart" | grep -v "cudnn" | grep -v "cublas" | grep -v "metis" \
|
||||
| xargs -I {} bash -c \
|
||||
"echo {} && $NVPRUNE $GENCODE $CUDA_LIB_DIR/{} -o $CUDA_LIB_DIR/{}"
|
||||
|
||||
# prune CuDNN and CuBLAS
|
||||
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublas_static.a -o $CUDA_LIB_DIR/libcublas_static.a
|
||||
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a
|
||||
|
||||
#####################################################################################
|
||||
# CUDA 12.4 prune visual tools
|
||||
#####################################################################################
|
||||
export CUDA_BASE="/usr/local/cuda-12.4/"
|
||||
rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2024.1.0 $CUDA_BASE/nsight-systems-2023.4.4/
|
||||
}
|
||||
|
||||
function prune_126 {
|
||||
echo "Pruning CUDA 12.6"
|
||||
#####################################################################################
|
||||
@ -106,13 +196,15 @@ function prune_126 {
|
||||
|
||||
function install_128 {
|
||||
CUDNN_VERSION=9.8.0.87
|
||||
echo "Installing CUDA 12.8.1 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.7.1"
|
||||
echo "Installing CUDA 12.8.1 and cuDNN ${CUDNN_VERSION} and NVSHMEM and NCCL and cuSparseLt-0.7.1"
|
||||
# install CUDA 12.8.1 in the same container
|
||||
install_cuda 12.8.1 cuda_12.8.1_570.124.06_linux
|
||||
|
||||
# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
|
||||
install_cudnn 12 $CUDNN_VERSION
|
||||
|
||||
install_nvshmem 12 $NVSHMEM_VERSION
|
||||
|
||||
CUDA_VERSION=12.8 bash install_nccl.sh
|
||||
|
||||
CUDA_VERSION=12.8 bash install_cusparselt.sh
|
||||
@ -124,6 +216,8 @@ function install_128 {
|
||||
while test $# -gt 0
|
||||
do
|
||||
case "$1" in
|
||||
12.4) install_124; prune_124
|
||||
;;
|
||||
12.6|12.6.*) install_126; prune_126
|
||||
;;
|
||||
12.8|12.8.*) install_128;
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -n "${CUDNN_VERSION}" ]]; then
|
||||
# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
|
||||
mkdir tmp_cudnn
|
||||
pushd tmp_cudnn
|
||||
if [[ ${CUDA_VERSION:0:4} == "12.9" || ${CUDA_VERSION:0:4} == "12.8" ]]; then
|
||||
CUDNN_NAME="cudnn-linux-x86_64-9.10.2.21_cuda12-archive"
|
||||
elif [[ ${CUDA_VERSION:0:4} == "12.6" ]]; then
|
||||
CUDNN_NAME="cudnn-linux-x86_64-9.10.2.21_cuda12-archive"
|
||||
elif [[ ${CUDA_VERSION:0:2} == "11" ]]; then
|
||||
CUDNN_NAME="cudnn-linux-x86_64-9.1.0.70_cuda11-archive"
|
||||
else
|
||||
print "Unsupported CUDA version ${CUDA_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
curl --retry 3 -OLs https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/${CUDNN_NAME}.tar.xz
|
||||
tar xf ${CUDNN_NAME}.tar.xz
|
||||
cp -a ${CUDNN_NAME}/include/* /usr/local/cuda/include/
|
||||
cp -a ${CUDNN_NAME}/lib/* /usr/local/cuda/lib64/
|
||||
popd
|
||||
rm -rf tmp_cudnn
|
||||
ldconfig
|
||||
fi
|
@ -13,6 +13,14 @@ if [[ ${CUDA_VERSION:0:4} =~ ^12\.[5-9]$ ]]; then
|
||||
fi
|
||||
CUSPARSELT_NAME="libcusparse_lt-linux-${arch_path}-0.7.1.0-archive"
|
||||
curl --retry 3 -OLs https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-${arch_path}/${CUSPARSELT_NAME}.tar.xz
|
||||
elif [[ ${CUDA_VERSION:0:4} == "12.4" ]]; then
|
||||
arch_path='sbsa'
|
||||
export TARGETARCH=${TARGETARCH:-$(uname -m)}
|
||||
if [ ${TARGETARCH} = 'amd64' ] || [ "${TARGETARCH}" = 'x86_64' ]; then
|
||||
arch_path='x86_64'
|
||||
fi
|
||||
CUSPARSELT_NAME="libcusparse_lt-linux-${arch_path}-0.6.2.3-archive"
|
||||
curl --retry 3 -OLs https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-${arch_path}/${CUSPARSELT_NAME}.tar.xz
|
||||
else
|
||||
echo "Not sure which libcusparselt version to install for this ${CUDA_VERSION}"
|
||||
fi
|
||||
|
@ -20,7 +20,7 @@ pip_install \
|
||||
|
||||
pip_install coloredlogs packaging
|
||||
pip_install onnxruntime==1.18.1
|
||||
pip_install onnxscript==0.3.0
|
||||
pip_install onnxscript==0.3.1
|
||||
|
||||
# Cache the transformers model to be used later by ONNX tests. We need to run the transformers
|
||||
# package to download the model. By default, the model is cached at ~/.cache/huggingface/hub/
|
||||
|
@ -4,8 +4,9 @@
|
||||
set -ex
|
||||
|
||||
cd /
|
||||
git clone https://github.com/OpenMathLib/OpenBLAS.git -b "${OPENBLAS_VERSION:-v0.3.29}" --depth 1 --shallow-submodules
|
||||
git clone https://github.com/OpenMathLib/OpenBLAS.git -b "${OPENBLAS_VERSION:-v0.3.30}" --depth 1 --shallow-submodules
|
||||
|
||||
OPENBLAS_CHECKOUT_DIR="OpenBLAS"
|
||||
OPENBLAS_BUILD_FLAGS="
|
||||
NUM_THREADS=128
|
||||
USE_OPENMP=1
|
||||
@ -13,9 +14,8 @@ NO_SHARED=0
|
||||
DYNAMIC_ARCH=1
|
||||
TARGET=ARMV8
|
||||
CFLAGS=-O3
|
||||
BUILD_BFLOAT16=1
|
||||
"
|
||||
|
||||
OPENBLAS_CHECKOUT_DIR="OpenBLAS"
|
||||
|
||||
make -j8 ${OPENBLAS_BUILD_FLAGS} -C ${OPENBLAS_CHECKOUT_DIR}
|
||||
make -j8 ${OPENBLAS_BUILD_FLAGS} install -C ${OPENBLAS_CHECKOUT_DIR}
|
||||
|
@ -8,9 +8,11 @@ ver() {
|
||||
|
||||
install_ubuntu() {
|
||||
apt-get update
|
||||
if [[ $UBUNTU_VERSION == 20.04 ]]; then
|
||||
# gpg-agent is not available by default on 20.04
|
||||
apt-get install -y --no-install-recommends gpg-agent
|
||||
# gpg-agent is not available by default
|
||||
apt-get install -y --no-install-recommends gpg-agent
|
||||
if [[ $(ver $UBUNTU_VERSION) -ge $(ver 22.04) ]]; then
|
||||
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
|
||||
| sudo tee /etc/apt/preferences.d/rocm-pin-600
|
||||
fi
|
||||
apt-get install -y kmod
|
||||
apt-get install -y wget
|
||||
@ -28,16 +30,25 @@ EOF
|
||||
|
||||
# we want the patch version of 6.4 instead
|
||||
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.4) ]]; then
|
||||
ROCM_VERSION="${ROCM_VERSION}.1"
|
||||
ROCM_VERSION="${ROCM_VERSION}.2"
|
||||
fi
|
||||
|
||||
# Default url values
|
||||
rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
|
||||
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${ROCM_VERSION}/ubuntu"
|
||||
|
||||
# Special case for ROCM_VERSION == 7.0
|
||||
if [[ $(ver "$ROCM_VERSION") -eq $(ver 7.0) ]]; then
|
||||
rocm_baseurl="https://repo.radeon.com/rocm/apt/7.0_alpha2"
|
||||
amdgpu_baseurl="https://repo.radeon.com/amdgpu/30.10_alpha2/ubuntu"
|
||||
fi
|
||||
|
||||
# Add amdgpu repository
|
||||
UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'`
|
||||
echo "deb [arch=amd64] https://repo.radeon.com/amdgpu/${ROCM_VERSION}/ubuntu ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
|
||||
echo "deb [arch=amd64] ${amdgpu_baseurl} ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
|
||||
|
||||
# Add rocm repository
|
||||
wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
|
||||
local rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
|
||||
echo "deb [arch=amd64] ${rocm_baseurl} ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/rocm.list
|
||||
apt-get update --allow-insecure-repositories
|
||||
|
||||
@ -71,29 +82,33 @@ EOF
|
||||
done
|
||||
|
||||
# ROCm 6.3 had a regression where initializing static code objects had significant overhead
|
||||
# CI no longer builds for ROCm 6.3, but
|
||||
# ROCm 6.4 did not yet fix the regression, also HIP branch names are different
|
||||
if [[ $(ver $ROCM_VERSION) -ge $(ver 6.3) ]] && [[ $(ver $ROCM_VERSION) -lt $(ver 7.0) ]]; then
|
||||
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.4.1) ]]; then
|
||||
HIP_BRANCH=release/rocm-rel-6.4
|
||||
VER_STR=6.4
|
||||
VER_PATCH=.1
|
||||
if [[ $(ver $ROCM_VERSION) -ge $(ver 6.4) ]] && [[ $(ver $ROCM_VERSION) -lt $(ver 7.0) ]]; then
|
||||
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.4.2) ]]; then
|
||||
HIP_TAG=rocm-6.4.2
|
||||
CLR_HASH=74d78ba3ac4bac235d02bcb48511c30b5cfdd457 # branch release/rocm-rel-6.4.2-statco-hotfix
|
||||
elif [[ $(ver $ROCM_VERSION) -eq $(ver 6.4.1) ]]; then
|
||||
HIP_TAG=rocm-6.4.1
|
||||
CLR_HASH=efe6c35790b9206923bfeed1209902feff37f386 # branch release/rocm-rel-6.4.1-statco-hotfix
|
||||
elif [[ $(ver $ROCM_VERSION) -eq $(ver 6.4) ]]; then
|
||||
HIP_BRANCH=release/rocm-rel-6.4
|
||||
VER_STR=6.4
|
||||
elif [[ $(ver $ROCM_VERSION) -eq $(ver 6.3) ]]; then
|
||||
HIP_BRANCH=rocm-6.3.x
|
||||
VER_STR=6.3
|
||||
HIP_TAG=rocm-6.4.0
|
||||
CLR_HASH=600f5b0d2baed94d5121e2174a9de0851b040b0c # branch release/rocm-rel-6.4-statco-hotfix
|
||||
fi
|
||||
# clr build needs CppHeaderParser but can only find it using conda's python
|
||||
/opt/conda/bin/python -m pip install CppHeaderParser
|
||||
git clone https://github.com/ROCm/HIP -b $HIP_BRANCH
|
||||
python -m pip install CppHeaderParser
|
||||
git clone https://github.com/ROCm/HIP -b $HIP_TAG
|
||||
HIP_COMMON_DIR=$(readlink -f HIP)
|
||||
git clone https://github.com/jeffdaily/clr -b release/rocm-rel-${VER_STR}${VER_PATCH}-statco-hotfix
|
||||
git clone https://github.com/jeffdaily/clr
|
||||
pushd clr
|
||||
git checkout $CLR_HASH
|
||||
popd
|
||||
mkdir -p clr/build
|
||||
pushd clr/build
|
||||
cmake .. -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR
|
||||
# Need to point CMake to the correct python installation to find CppHeaderParser
|
||||
cmake .. -DPython3_EXECUTABLE=/opt/conda/envs/py_${ANACONDA_PYTHON_VERSION}/bin/python3 -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR
|
||||
make -j
|
||||
cp hipamd/lib/libamdhip64.so.${VER_STR}.* /opt/rocm/lib/libamdhip64.so.${VER_STR}.*
|
||||
cp hipamd/lib/libamdhip64.so.6.4.* /opt/rocm/lib/libamdhip64.so.6.4.*
|
||||
popd
|
||||
rm -rf HIP clr
|
||||
fi
|
||||
|
@ -5,7 +5,12 @@ set -eou pipefail
|
||||
|
||||
function do_install() {
|
||||
rocm_version=$1
|
||||
rocm_version_nodot=${1//./}
|
||||
if [[ ${rocm_version} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
# chop off any patch version
|
||||
rocm_version="${rocm_version%.*}"
|
||||
fi
|
||||
|
||||
rocm_version_nodot=${rocm_version//./}
|
||||
|
||||
# Version 2.7.2 + ROCm related updates
|
||||
MAGMA_VERSION=a1625ff4d9bc362906bd01f805dbbe12612953f6
|
||||
|
@ -98,6 +98,10 @@ fi
|
||||
if [ -n "${NUMPY_VERSION}" ]; then
|
||||
pip_install "numpy==${NUMPY_VERSION}"
|
||||
fi
|
||||
|
||||
# IMPORTANT: helion needs to be installed without dependencies.
|
||||
# It depends on torch and triton. We don't want to install
|
||||
# triton and torch from production on Docker CI images
|
||||
if [[ "$ANACONDA_PYTHON_VERSION" != 3.9* ]]; then
|
||||
pip_install helion
|
||||
pip_install helion --no-deps
|
||||
fi
|
||||
|
@ -56,14 +56,10 @@ function install_ubuntu() {
|
||||
|
||||
function install_rhel() {
|
||||
. /etc/os-release
|
||||
if [[ "${ID}" == "rhel" ]]; then
|
||||
if [[ ! " 8.8 8.9 9.0 9.2 9.3 " =~ " ${VERSION_ID} " ]]; then
|
||||
echo "RHEL version ${VERSION_ID} not supported"
|
||||
exit
|
||||
fi
|
||||
elif [[ "${ID}" == "almalinux" ]]; then
|
||||
# Workaround for almalinux8 which used by quay.io/pypa/manylinux_2_28_x86_64
|
||||
VERSION_ID="8.8"
|
||||
|
||||
if [[ ! " 8.8 8.10 9.0 9.2 9.3 " =~ " ${VERSION_ID} " ]]; then
|
||||
echo "RHEL version ${VERSION_ID} not supported"
|
||||
exit
|
||||
fi
|
||||
|
||||
dnf install -y 'dnf-command(config-manager)'
|
||||
|
@ -39,6 +39,10 @@ case ${DOCKER_TAG_PREFIX} in
|
||||
DOCKER_GPU_BUILD_ARG=""
|
||||
;;
|
||||
rocm*)
|
||||
# we want the patch version of 6.4 instead
|
||||
if [[ $(ver $GPU_ARCH_VERSION) -eq $(ver 6.4) ]]; then
|
||||
GPU_ARCH_VERSION="${GPU_ARCH_VERSION}.2"
|
||||
fi
|
||||
BASE_TARGET=rocm
|
||||
GPU_IMAGE=rocm/dev-ubuntu-22.04:${GPU_ARCH_VERSION}-complete
|
||||
PYTORCH_ROCM_ARCH="gfx900;gfx906;gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201"
|
||||
|
@ -27,5 +27,7 @@ COPY ./common/install_linter.sh install_linter.sh
|
||||
RUN bash ./install_linter.sh
|
||||
RUN rm install_linter.sh
|
||||
|
||||
RUN chown -R jenkins:jenkins /var/lib/jenkins/ci_env
|
||||
|
||||
USER jenkins
|
||||
CMD ["bash"]
|
||||
|
@ -131,6 +131,8 @@ RUN pip3 install flatbuffers && \
|
||||
git clone https://github.com/microsoft/onnxruntime && \
|
||||
cd onnxruntime && git checkout v1.21.0 && \
|
||||
git submodule update --init --recursive && \
|
||||
wget https://github.com/microsoft/onnxruntime/commit/f57db79743c4d1a3553aa05cf95bcd10966030e6.patch && \
|
||||
patch -p1 < f57db79743c4d1a3553aa05cf95bcd10966030e6.patch && \
|
||||
./build.sh --config Release --parallel 0 --enable_pybind \
|
||||
--build_wheel --enable_training --enable_training_apis \
|
||||
--enable_training_ops --skip_tests --allow_running_as_root \
|
||||
|
@ -41,7 +41,7 @@ case ${image} in
|
||||
GPU_IMAGE=arm64v8/almalinux:8
|
||||
DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=13 --build-arg NINJA_VERSION=1.12.1"
|
||||
MANY_LINUX_VERSION="2_28_aarch64"
|
||||
OPENBLAS_VERSION="v0.3.29"
|
||||
OPENBLAS_VERSION="v0.3.30"
|
||||
;;
|
||||
manylinuxcxx11-abi-builder:cpu-cxx11-abi)
|
||||
TARGET=final
|
||||
@ -75,6 +75,10 @@ case ${image} in
|
||||
DOCKERFILE_SUFFIX="_cuda_aarch64"
|
||||
;;
|
||||
manylinux2_28-builder:rocm*)
|
||||
# we want the patch version of 6.4 instead
|
||||
if [[ $(ver $GPU_ARCH_VERSION) -eq $(ver 6.4) ]]; then
|
||||
GPU_ARCH_VERSION="${GPU_ARCH_VERSION}.2"
|
||||
fi
|
||||
TARGET=rocm_final
|
||||
MANY_LINUX_VERSION="2_28"
|
||||
DEVTOOLSET_VERSION="11"
|
||||
|
@ -16,6 +16,7 @@ click
|
||||
#test that import:
|
||||
|
||||
coremltools==5.0b5 ; python_version < "3.12"
|
||||
coremltools==8.3 ; python_version == "3.12"
|
||||
#Description: Apple framework for ML integration
|
||||
#Pinned versions: 5.0b5
|
||||
#test that import:
|
||||
@ -49,7 +50,7 @@ flatbuffers==24.12.23
|
||||
hypothesis==5.35.1
|
||||
# Pin hypothesis to avoid flakiness: https://github.com/pytorch/pytorch/issues/31136
|
||||
#Description: advanced library for generating parametrized tests
|
||||
#Pinned versions: 3.44.6, 4.53.2
|
||||
#Pinned versions: 5.35.1
|
||||
#test that import: test_xnnpack_integration.py, test_pruning_op.py, test_nn.py
|
||||
|
||||
junitparser==2.1.1
|
||||
@ -63,6 +64,7 @@ lark==0.12.0
|
||||
#test that import:
|
||||
|
||||
librosa>=0.6.2 ; python_version < "3.11"
|
||||
librosa==0.10.2 ; python_version == "3.12"
|
||||
#Description: A python package for music and audio analysis
|
||||
#Pinned versions: >=0.6.2
|
||||
#test that import: test_spectral_ops.py
|
||||
@ -111,6 +113,7 @@ ninja==1.11.1.3
|
||||
numba==0.49.0 ; python_version < "3.9"
|
||||
numba==0.55.2 ; python_version == "3.9"
|
||||
numba==0.55.2 ; python_version == "3.10"
|
||||
numba==0.60.0 ; python_version == "3.12"
|
||||
#Description: Just-In-Time Compiler for Numerical Functions
|
||||
#Pinned versions: 0.54.1, 0.49.0, <=0.49.1
|
||||
#test that import: test_numba_integration.py
|
||||
@ -218,9 +221,9 @@ pygments==2.15.0
|
||||
#Pinned versions: 2.12.0
|
||||
#test that import: the doctests
|
||||
|
||||
#PyYAML
|
||||
#pyyaml
|
||||
#Description: data serialization format
|
||||
#Pinned versions:
|
||||
#Pinned versions: 6.0.2
|
||||
#test that import:
|
||||
|
||||
#requests
|
||||
@ -230,7 +233,7 @@ pygments==2.15.0
|
||||
|
||||
#rich
|
||||
#Description: rich text and beautiful formatting in the terminal
|
||||
#Pinned versions: 10.9.0
|
||||
#Pinned versions: 14.1.0
|
||||
#test that import:
|
||||
|
||||
scikit-image==0.19.3 ; python_version < "3.10"
|
||||
@ -304,7 +307,7 @@ pytest-cpp==2.3.0
|
||||
#Pinned versions: 2.3.0
|
||||
#test that import:
|
||||
|
||||
z3-solver==4.12.6.0
|
||||
z3-solver==4.15.1.0
|
||||
#Description: The Z3 Theorem Prover Project
|
||||
#Pinned versions:
|
||||
#test that import:
|
||||
@ -339,7 +342,7 @@ onnx==1.18.0
|
||||
#Pinned versions:
|
||||
#test that import:
|
||||
|
||||
onnxscript==0.2.6
|
||||
onnxscript==0.3.1
|
||||
#Description: Required by mypy and test_public_bindings.py when checking torch.onnx._internal
|
||||
#Pinned versions:
|
||||
#test that import:
|
||||
@ -360,10 +363,10 @@ pwlf==2.2.1
|
||||
|
||||
|
||||
# To build PyTorch itself
|
||||
astunparse
|
||||
PyYAML
|
||||
pyyaml
|
||||
pyzstd
|
||||
setuptools
|
||||
setuptools>=70.1.0
|
||||
six
|
||||
|
||||
scons==4.5.2 ; platform_machine == "aarch64"
|
||||
|
||||
@ -383,6 +386,12 @@ cmake==4.0.0
|
||||
tlparse==0.3.30
|
||||
#Description: required for log parsing
|
||||
|
||||
cuda-bindings>=12.0,<13.0
|
||||
cuda-bindings>=12.0,<13.0 ; platform_machine != "s390x"
|
||||
#Description: required for testing CUDAGraph::raw_cuda_graph(). See https://nvidia.github.io/cuda-python/cuda-bindings/latest/support.html for how this version was chosen. Note "Any fix in the latest bindings would be backported to the prior major version" means that only the newest version of cuda-bindings will get fixes. Depending on the latest version of 12.x is okay because all 12.y versions will be supported via "CUDA minor version compatibility". Pytorch builds against 13.z versions of cuda toolkit work with 12.x versions of cuda-bindings as well because newer drivers work with old toolkits.
|
||||
#test that import: test_cuda.py
|
||||
|
||||
setuptools-git-versioning==2.1.0
|
||||
scikit-build==0.18.1
|
||||
pyre-extensions==0.0.32
|
||||
tabulate==0.9.0
|
||||
#Description: These package are needed to build FBGEMM and torchrec on PyTorch CI
|
||||
|
@ -4,8 +4,8 @@ sphinx==5.3.0
|
||||
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
|
||||
|
||||
# TODO: sphinxcontrib.katex 0.9.0 adds a local KaTeX server to speed up pre-rendering
|
||||
# but it doesn't seem to work and hangs around idly. The initial thought is probably
|
||||
# something related to Docker setup. We can investigate this later
|
||||
# but it doesn't seem to work and hangs around idly. The initial thought that it is probably
|
||||
# something related to Docker setup. We can investigate this later.
|
||||
|
||||
sphinxcontrib.katex==0.8.6
|
||||
#Description: This is used to generate PyTorch docs
|
||||
@ -19,9 +19,10 @@ sphinx_sitemap==2.6.0
|
||||
#Description: This is used to generate sitemap for PyTorch docs
|
||||
#Pinned versions: 2.6.0
|
||||
|
||||
matplotlib==3.5.3
|
||||
matplotlib==3.5.3 ; python_version < "3.13"
|
||||
matplotlib==3.6.3 ; python_version >= "3.13"
|
||||
#Description: This is used to generate PyTorch docs
|
||||
#Pinned versions: 3.5.3
|
||||
#Pinned versions: 3.6.3 if python > 3.12. Otherwise 3.5.3.
|
||||
|
||||
tensorboard==2.13.0 ; python_version < "3.13"
|
||||
tensorboard==2.18.0 ; python_version >= "3.13"
|
||||
@ -58,3 +59,4 @@ sphinx-copybutton==0.5.0
|
||||
sphinx-design==0.4.0
|
||||
sphinxcontrib-mermaid==1.0.0
|
||||
myst-parser==0.18.1
|
||||
myst-nb
|
||||
|
@ -1 +1 @@
|
||||
3.3.1
|
||||
3.4.0
|
||||
|
@ -147,6 +147,12 @@ RUN if [ -n "${ACL}" ]; then bash ./install_acl.sh; fi
|
||||
RUN rm install_acl.sh
|
||||
ENV INSTALLED_ACL ${ACL}
|
||||
|
||||
ARG OPENBLAS
|
||||
COPY ./common/install_openblas.sh install_openblas.sh
|
||||
RUN if [ -n "${OPENBLAS}" ]; then bash ./install_openblas.sh; fi
|
||||
RUN rm install_openblas.sh
|
||||
ENV INSTALLED_OPENBLAS ${OPENBLAS}
|
||||
|
||||
# Install ccache/sccache (do this last, so we get priority in PATH)
|
||||
ARG SKIP_SCCACHE_INSTALL
|
||||
COPY ./common/install_cache.sh install_cache.sh
|
||||
|
@ -97,7 +97,7 @@ if [[ -z "$PYTORCH_ROOT" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
pushd "$PYTORCH_ROOT"
|
||||
retry pip install -q cmake
|
||||
retry pip install -qUr requirements-build.txt
|
||||
python setup.py clean
|
||||
retry pip install -qr requirements.txt
|
||||
case ${DESIRED_PYTHON} in
|
||||
|
@ -51,20 +51,23 @@ else
|
||||
fi
|
||||
|
||||
cuda_version_nodot=$(echo $CUDA_VERSION | tr -d '.')
|
||||
EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON")
|
||||
|
||||
TORCH_CUDA_ARCH_LIST="5.0;6.0;7.0;7.5;8.0;8.6"
|
||||
case ${CUDA_VERSION} in
|
||||
12.8|12.9)
|
||||
TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;9.0;10.0;12.0+PTX" #removing sm_50-sm_70 as these architectures are deprecated in CUDA 12.8/9 and will be removed in future releases
|
||||
EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON")
|
||||
#removing sm_50-sm_60 as these architectures are deprecated in CUDA 12.8/9 and will be removed in future releases
|
||||
#however we would like to keep sm_70 architecture see: https://github.com/pytorch/pytorch/issues/157517
|
||||
12.8)
|
||||
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6;9.0;10.0;12.0"
|
||||
;;
|
||||
12.9)
|
||||
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6;9.0;10.0;12.0+PTX"
|
||||
# WAR to resolve the ld error in libtorch build with CUDA 12.9
|
||||
if [[ "$DESIRED_CUDA" == "cu129" && "$PACKAGE_TYPE" == "libtorch" ]]; then
|
||||
if [[ "$PACKAGE_TYPE" == "libtorch" ]]; then
|
||||
TORCH_CUDA_ARCH_LIST="7.5;8.0;9.0;10.0;12.0+PTX"
|
||||
fi
|
||||
;;
|
||||
12.6)
|
||||
TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST};9.0"
|
||||
EXTRA_CAFFE2_CMAKE_FLAGS+=("-DATEN_NO_TEST=ON")
|
||||
TORCH_CUDA_ARCH_LIST="5.0;6.0;7.0;7.5;8.0;8.6;9.0"
|
||||
;;
|
||||
*)
|
||||
echo "unknown cuda version $CUDA_VERSION"
|
||||
@ -131,6 +134,8 @@ if [[ $CUDA_VERSION == 12* ]]; then
|
||||
"/usr/local/cuda/lib64/libnvrtc-builtins.so"
|
||||
"/usr/local/cuda/lib64/libcufile.so.0"
|
||||
"/usr/local/cuda/lib64/libcufile_rdma.so.1"
|
||||
"/usr/local/cuda/extras/CUPTI/lib64/libcupti.so.12"
|
||||
"/usr/local/cuda/extras/CUPTI/lib64/libnvperf_host.so"
|
||||
)
|
||||
DEPS_SONAME+=(
|
||||
"libcudnn_adv.so.9"
|
||||
@ -149,7 +154,14 @@ if [[ $CUDA_VERSION == 12* ]]; then
|
||||
"libnvrtc-builtins.so"
|
||||
"libcufile.so.0"
|
||||
"libcufile_rdma.so.1"
|
||||
"libcupti.so.12"
|
||||
"libnvperf_host.so"
|
||||
)
|
||||
# Add libnvToolsExt only if CUDA version is not 12.9
|
||||
if [[ $CUDA_VERSION != 12.9* ]]; then
|
||||
DEPS_LIST+=("/usr/local/cuda/lib64/libnvToolsExt.so.1")
|
||||
DEPS_SONAME+=("libnvToolsExt.so.1")
|
||||
fi
|
||||
else
|
||||
echo "Using nvidia libs from pypi."
|
||||
CUDA_RPATHS=(
|
||||
|
@ -92,7 +92,7 @@ if [[ -z "$PYTORCH_ROOT" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
pushd "$PYTORCH_ROOT"
|
||||
retry pip install -q cmake
|
||||
retry pip install -qUr requirements-build.txt
|
||||
python setup.py clean
|
||||
retry pip install -qr requirements.txt
|
||||
retry pip install -q numpy==2.0.1
|
||||
@ -104,7 +104,7 @@ if [[ "$DESIRED_CUDA" == *"rocm"* ]]; then
|
||||
export ROCclr_DIR=/opt/rocm/rocclr/lib/cmake/rocclr
|
||||
fi
|
||||
|
||||
echo "Calling setup.py install at $(date)"
|
||||
echo "Calling 'python -m pip install .' at $(date)"
|
||||
|
||||
if [[ $LIBTORCH_VARIANT = *"static"* ]]; then
|
||||
STATIC_CMAKE_FLAG="-DTORCH_STATIC=1"
|
||||
@ -120,7 +120,7 @@ fi
|
||||
# TODO: Remove this flag once https://github.com/pytorch/pytorch/issues/55952 is closed
|
||||
CFLAGS='-Wno-deprecated-declarations' \
|
||||
BUILD_LIBTORCH_CPU_WITH_DEBUG=1 \
|
||||
python setup.py install
|
||||
python -m pip install --no-build-isolation -v .
|
||||
|
||||
mkdir -p libtorch/{lib,bin,include,share}
|
||||
|
||||
|
@ -19,7 +19,7 @@ git config --global --add safe.directory /var/lib/jenkins/workspace
|
||||
|
||||
if [[ "$BUILD_ENVIRONMENT" == *onnx* ]]; then
|
||||
# TODO: This can be removed later once vision is also part of the Docker image
|
||||
pip install -q --user --no-use-pep517 "git+https://github.com/pytorch/vision.git@$(cat .github/ci_commit_pins/vision.txt)"
|
||||
pip install -q --no-use-pep517 "git+https://github.com/pytorch/vision.git@$(cat .github/ci_commit_pins/vision.txt)"
|
||||
# JIT C++ extensions require ninja, so put it into PATH.
|
||||
export PATH="/var/lib/jenkins/.local/bin:$PATH"
|
||||
# NB: ONNX test is fast (~15m) so it's ok to retry it few more times to avoid any flaky issue, we
|
||||
|
@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# DO NOT ADD 'set -x' not to reveal CircleCI secret context environment variables
|
||||
set -eu -o pipefail
|
||||
|
||||
# This script uses linux host toolchain + mobile build options in order to
|
||||
# build & test mobile libtorch without having to setup Android/iOS
|
||||
# toolchain/simulator.
|
||||
|
||||
# shellcheck source=./common.sh
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
||||
# shellcheck source=./common-build.sh
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
|
||||
|
||||
# Install torch & torchvision - used to download & trace test model.
|
||||
# Ideally we should use the libtorch built on the PR so that backward
|
||||
# incompatible changes won't break this script - but it will significantly slow
|
||||
# down mobile CI jobs.
|
||||
# Here we install nightly instead of stable so that we have an option to
|
||||
# temporarily skip mobile CI jobs on BC-breaking PRs until they are in nightly.
|
||||
retry pip install --pre torch torchvision \
|
||||
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html \
|
||||
--progress-bar off
|
||||
|
||||
# Run end-to-end process of building mobile library, linking into the predictor
|
||||
# binary, and running forward pass with a real model.
|
||||
if [[ "$BUILD_ENVIRONMENT" == *-mobile-custom-build-static* ]]; then
|
||||
TEST_CUSTOM_BUILD_STATIC=1 test/mobile/custom_build/build.sh
|
||||
elif [[ "$BUILD_ENVIRONMENT" == *-mobile-lightweight-dispatch* ]]; then
|
||||
test/mobile/lightweight_dispatch/build.sh
|
||||
else
|
||||
TEST_DEFAULT_BUILD=1 test/mobile/custom_build/build.sh
|
||||
fi
|
||||
|
||||
print_sccache_stats
|
@ -11,10 +11,6 @@ source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
||||
# shellcheck source=./common-build.sh
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
|
||||
|
||||
if [[ "$BUILD_ENVIRONMENT" == *-mobile-*build* ]]; then
|
||||
exec "$(dirname "${BASH_SOURCE[0]}")/build-mobile.sh" "$@"
|
||||
fi
|
||||
|
||||
echo "Python version:"
|
||||
python --version
|
||||
|
||||
@ -54,9 +50,6 @@ if [[ ${BUILD_ENVIRONMENT} == *"parallelnative"* ]]; then
|
||||
export ATEN_THREADING=NATIVE
|
||||
fi
|
||||
|
||||
# Enable LLVM dependency for TensorExpr testing
|
||||
export USE_LLVM=/opt/llvm
|
||||
export LLVM_DIR=/opt/llvm/lib/cmake/llvm
|
||||
|
||||
if ! which conda; then
|
||||
# In ROCm CIs, we are doing cross compilation on build machines with
|
||||
@ -124,26 +117,8 @@ if [[ "$BUILD_ENVIRONMENT" == *libtorch* ]]; then
|
||||
fi
|
||||
|
||||
# Use special scripts for Android builds
|
||||
if [[ "${BUILD_ENVIRONMENT}" == *-android* ]]; then
|
||||
export ANDROID_NDK=/opt/ndk
|
||||
build_args=()
|
||||
if [[ "${BUILD_ENVIRONMENT}" == *-arm-v7a* ]]; then
|
||||
build_args+=("-DANDROID_ABI=armeabi-v7a")
|
||||
elif [[ "${BUILD_ENVIRONMENT}" == *-arm-v8a* ]]; then
|
||||
build_args+=("-DANDROID_ABI=arm64-v8a")
|
||||
elif [[ "${BUILD_ENVIRONMENT}" == *-x86_32* ]]; then
|
||||
build_args+=("-DANDROID_ABI=x86")
|
||||
elif [[ "${BUILD_ENVIRONMENT}" == *-x86_64* ]]; then
|
||||
build_args+=("-DANDROID_ABI=x86_64")
|
||||
fi
|
||||
if [[ "${BUILD_ENVIRONMENT}" == *vulkan* ]]; then
|
||||
build_args+=("-DUSE_VULKAN=ON")
|
||||
fi
|
||||
build_args+=("-DUSE_LITE_INTERPRETER_PROFILER=OFF")
|
||||
exec ./scripts/build_android.sh "${build_args[@]}" "$@"
|
||||
fi
|
||||
|
||||
if [[ "$BUILD_ENVIRONMENT" != *android* && "$BUILD_ENVIRONMENT" == *vulkan* ]]; then
|
||||
if [[ "$BUILD_ENVIRONMENT" == *vulkan* ]]; then
|
||||
export USE_VULKAN=1
|
||||
# shellcheck disable=SC1091
|
||||
source /var/lib/jenkins/vulkansdk/setup-env.sh
|
||||
@ -198,10 +173,8 @@ fi
|
||||
|
||||
# We only build FlashAttention files for CUDA 8.0+, and they require large amounts of
|
||||
# memory to build and will OOM
|
||||
if [[ "$BUILD_ENVIRONMENT" == *cuda* ]] && [[ 1 -eq $(echo "${TORCH_CUDA_ARCH_LIST} >= 8.0" | bc) ]] && [ -z "$MAX_JOBS_OVERRIDE" ]; then
|
||||
echo "WARNING: FlashAttention files require large amounts of memory to build and will OOM"
|
||||
echo "Setting MAX_JOBS=(nproc-2)/3 to reduce memory usage"
|
||||
export MAX_JOBS="$(( $(nproc --ignore=2) / 3 ))"
|
||||
if [[ "$BUILD_ENVIRONMENT" == *cuda* ]] && [[ 1 -eq $(echo "${TORCH_CUDA_ARCH_LIST} >= 8.0" | bc) ]]; then
|
||||
export BUILD_CUSTOM_STEP="ninja -C build flash_attention -j 2"
|
||||
fi
|
||||
|
||||
if [[ "${BUILD_ENVIRONMENT}" == *clang* ]]; then
|
||||
@ -216,7 +189,6 @@ if [[ "$BUILD_ENVIRONMENT" == *-clang*-asan* ]]; then
|
||||
export USE_ASAN=1
|
||||
export REL_WITH_DEB_INFO=1
|
||||
export UBSAN_FLAGS="-fno-sanitize-recover=all"
|
||||
unset USE_LLVM
|
||||
fi
|
||||
|
||||
if [[ "${BUILD_ENVIRONMENT}" == *no-ops* ]]; then
|
||||
@ -227,7 +199,7 @@ if [[ "${BUILD_ENVIRONMENT}" == *-pch* ]]; then
|
||||
export USE_PRECOMPILED_HEADERS=1
|
||||
fi
|
||||
|
||||
if [[ "${BUILD_ENVIRONMENT}" != *android* && "${BUILD_ENVIRONMENT}" != *cuda* ]]; then
|
||||
if [[ "${BUILD_ENVIRONMENT}" != *cuda* ]]; then
|
||||
export BUILD_STATIC_RUNTIME_BENCHMARK=ON
|
||||
fi
|
||||
|
||||
@ -308,6 +280,22 @@ else
|
||||
fi
|
||||
pip_install_whl "$(echo dist/*.whl)"
|
||||
|
||||
if [[ "${BUILD_ADDITIONAL_PACKAGES:-}" == *vision* ]]; then
|
||||
install_torchvision
|
||||
fi
|
||||
|
||||
if [[ "${BUILD_ADDITIONAL_PACKAGES:-}" == *audio* ]]; then
|
||||
install_torchaudio
|
||||
fi
|
||||
|
||||
if [[ "${BUILD_ADDITIONAL_PACKAGES:-}" == *torchrec* || "${BUILD_ADDITIONAL_PACKAGES:-}" == *fbgemm* ]]; then
|
||||
install_torchrec_and_fbgemm
|
||||
fi
|
||||
|
||||
if [[ "${BUILD_ADDITIONAL_PACKAGES:-}" == *torchao* ]]; then
|
||||
install_torchao
|
||||
fi
|
||||
|
||||
if [[ "$BUILD_ENVIRONMENT" == *xpu* ]]; then
|
||||
echo "Checking that xpu is compiled"
|
||||
pushd dist/
|
||||
@ -395,10 +383,8 @@ else
|
||||
# This is an attempt to mitigate flaky libtorch build OOM error. By default, the build parallelization
|
||||
# is set to be the number of CPU minus 2. So, let's try a more conservative value here. A 4xlarge has
|
||||
# 16 CPUs
|
||||
if [ -z "$MAX_JOBS_OVERRIDE" ]; then
|
||||
MAX_JOBS=$(nproc --ignore=4)
|
||||
export MAX_JOBS
|
||||
fi
|
||||
MAX_JOBS=$(nproc --ignore=4)
|
||||
export MAX_JOBS
|
||||
|
||||
# NB: Install outside of source directory (at the same level as the root
|
||||
# pytorch folder) so that it doesn't get cleaned away prior to docker push.
|
||||
|
@ -13,6 +13,13 @@ if [[ "$BUILD_ENVIRONMENT" != *win-* ]]; then
|
||||
fi
|
||||
|
||||
if which sccache > /dev/null; then
|
||||
# Clear SCCACHE_BUCKET and SCCACHE_REGION if they are empty, otherwise
|
||||
# sccache will complain about invalid bucket configuration
|
||||
if [[ -z "${SCCACHE_BUCKET:-}" ]]; then
|
||||
unset SCCACHE_BUCKET
|
||||
unset SCCACHE_REGION
|
||||
fi
|
||||
|
||||
# Save sccache logs to file
|
||||
sccache --stop-server > /dev/null 2>&1 || true
|
||||
rm -f ~/sccache_error.log || true
|
||||
|
@ -78,6 +78,34 @@ function pip_install_whl() {
|
||||
fi
|
||||
}
|
||||
|
||||
function pip_build_and_install() {
|
||||
local build_target=$1
|
||||
local wheel_dir=$2
|
||||
|
||||
local found_whl=0
|
||||
for file in "${wheel_dir}"/*.whl
|
||||
do
|
||||
if [[ -f "${file}" ]]; then
|
||||
found_whl=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Build the wheel if it doesn't exist
|
||||
if [ "${found_whl}" == "0" ]; then
|
||||
python3 -m pip wheel \
|
||||
--no-build-isolation \
|
||||
--no-deps \
|
||||
--no-use-pep517 \
|
||||
-w "${wheel_dir}" \
|
||||
"${build_target}"
|
||||
fi
|
||||
|
||||
for file in "${wheel_dir}"/*.whl
|
||||
do
|
||||
pip_install_whl "${file}"
|
||||
done
|
||||
}
|
||||
|
||||
function pip_install() {
|
||||
# retry 3 times
|
||||
@ -124,14 +152,7 @@ function get_pinned_commit() {
|
||||
function install_torchaudio() {
|
||||
local commit
|
||||
commit=$(get_pinned_commit audio)
|
||||
if [[ "$1" == "cuda" ]]; then
|
||||
# TODO: This is better to be passed as a parameter from _linux-test workflow
|
||||
# so that it can be consistent with what is set in build
|
||||
TORCH_CUDA_ARCH_LIST="8.0;8.6" pip_install --no-use-pep517 --user "git+https://github.com/pytorch/audio.git@${commit}"
|
||||
else
|
||||
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/audio.git@${commit}"
|
||||
fi
|
||||
|
||||
pip_build_and_install "git+https://github.com/pytorch/audio.git@${commit}" dist/audio
|
||||
}
|
||||
|
||||
function install_torchtext() {
|
||||
@ -139,8 +160,8 @@ function install_torchtext() {
|
||||
local text_commit
|
||||
data_commit=$(get_pinned_commit data)
|
||||
text_commit=$(get_pinned_commit text)
|
||||
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/data.git@${data_commit}"
|
||||
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/text.git@${text_commit}"
|
||||
pip_build_and_install "git+https://github.com/pytorch/data.git@${data_commit}" dist/data
|
||||
pip_build_and_install "git+https://github.com/pytorch/text.git@${text_commit}" dist/text
|
||||
}
|
||||
|
||||
function install_torchvision() {
|
||||
@ -153,7 +174,14 @@ function install_torchvision() {
|
||||
echo 'char* dlerror(void) { return "";}'|gcc -fpic -shared -o "${HOME}/dlerror.so" -x c -
|
||||
LD_PRELOAD=${orig_preload}:${HOME}/dlerror.so
|
||||
fi
|
||||
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/vision.git@${commit}"
|
||||
|
||||
if [[ "${BUILD_ENVIRONMENT}" == *cuda* ]]; then
|
||||
# Not sure if both are needed, but why not
|
||||
export FORCE_CUDA=1
|
||||
export WITH_CUDA=1
|
||||
fi
|
||||
pip_build_and_install "git+https://github.com/pytorch/vision.git@${commit}" dist/vision
|
||||
|
||||
if [ -n "${LD_PRELOAD}" ]; then
|
||||
LD_PRELOAD=${orig_preload}
|
||||
fi
|
||||
@ -173,25 +201,73 @@ function install_torchrec_and_fbgemm() {
|
||||
|
||||
if [[ "$BUILD_ENVIRONMENT" == *rocm* ]] ; then
|
||||
# install torchrec first because it installs fbgemm nightly on top of rocm fbgemm
|
||||
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/torchrec.git@${torchrec_commit}"
|
||||
pip_build_and_install "git+https://github.com/pytorch/torchrec.git@${torchrec_commit}" dist/torchrec
|
||||
pip_uninstall fbgemm-gpu-nightly
|
||||
|
||||
# Set ROCM_HOME isn't available, use ROCM_PATH if set or /opt/rocm
|
||||
ROCM_HOME="${ROCM_HOME:-${ROCM_PATH:-/opt/rocm}}"
|
||||
|
||||
# Find rocm_version.h header file for ROCm version extract
|
||||
rocm_version_h="${ROCM_HOME}/include/rocm-core/rocm_version.h"
|
||||
if [ ! -f "$rocm_version_h" ]; then
|
||||
rocm_version_h="${ROCM_HOME}/include/rocm_version.h"
|
||||
fi
|
||||
|
||||
# Error out if rocm_version.h not found
|
||||
if [ ! -f "$rocm_version_h" ]; then
|
||||
echo "Error: rocm_version.h not found in expected locations." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract major, minor and patch ROCm version numbers
|
||||
MAJOR_VERSION=$(grep 'ROCM_VERSION_MAJOR' "$rocm_version_h" | awk '{print $3}')
|
||||
MINOR_VERSION=$(grep 'ROCM_VERSION_MINOR' "$rocm_version_h" | awk '{print $3}')
|
||||
PATCH_VERSION=$(grep 'ROCM_VERSION_PATCH' "$rocm_version_h" | awk '{print $3}')
|
||||
ROCM_INT=$((MAJOR_VERSION * 10000 + MINOR_VERSION * 100 + PATCH_VERSION))
|
||||
echo "ROCm version: $ROCM_INT"
|
||||
export BUILD_ROCM_VERSION="$MAJOR_VERSION.$MINOR_VERSION"
|
||||
|
||||
pip_install tabulate # needed for newer fbgemm
|
||||
pip_install patchelf # needed for rocm fbgemm
|
||||
git clone --recursive https://github.com/pytorch/fbgemm
|
||||
pushd fbgemm/fbgemm_gpu
|
||||
git checkout "${fbgemm_commit}"
|
||||
python setup.py install \
|
||||
--package_variant=rocm \
|
||||
-DHIP_ROOT_DIR="${ROCM_PATH}" \
|
||||
-DCMAKE_C_FLAGS="-DTORCH_USE_HIP_DSA" \
|
||||
-DCMAKE_CXX_FLAGS="-DTORCH_USE_HIP_DSA"
|
||||
popd
|
||||
pushd /tmp
|
||||
|
||||
local wheel_dir=dist/fbgemm_gpu
|
||||
local found_whl=0
|
||||
for file in "${wheel_dir}"/*.whl
|
||||
do
|
||||
if [[ -f "${file}" ]]; then
|
||||
found_whl=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Build the wheel if it doesn't exist
|
||||
if [ "${found_whl}" == "0" ]; then
|
||||
git clone --recursive https://github.com/pytorch/fbgemm
|
||||
pushd fbgemm/fbgemm_gpu
|
||||
git checkout "${fbgemm_commit}"
|
||||
python setup.py bdist_wheel \
|
||||
--build-variant=rocm \
|
||||
-DHIP_ROOT_DIR="${ROCM_PATH}" \
|
||||
-DCMAKE_C_FLAGS="-DTORCH_USE_HIP_DSA" \
|
||||
-DCMAKE_CXX_FLAGS="-DTORCH_USE_HIP_DSA"
|
||||
popd
|
||||
|
||||
# Save the wheel before cleaning up
|
||||
mkdir -p dist/fbgemm_gpu
|
||||
cp fbgemm/fbgemm_gpu/dist/*.whl dist/fbgemm_gpu
|
||||
fi
|
||||
|
||||
for file in "${wheel_dir}"/*.whl
|
||||
do
|
||||
pip_install_whl "${file}"
|
||||
done
|
||||
|
||||
rm -rf fbgemm
|
||||
popd
|
||||
else
|
||||
# See https://github.com/pytorch/pytorch/issues/106971
|
||||
CUDA_PATH=/usr/local/cuda-12.1 pip_install --no-use-pep517 --user "git+https://github.com/pytorch/FBGEMM.git@${fbgemm_commit}#egg=fbgemm-gpu&subdirectory=fbgemm_gpu"
|
||||
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/torchrec.git@${torchrec_commit}"
|
||||
pip_build_and_install "git+https://github.com/pytorch/torchrec.git@${torchrec_commit}" dist/torchrec
|
||||
pip_build_and_install "git+https://github.com/pytorch/FBGEMM.git@${fbgemm_commit}#subdirectory=fbgemm_gpu" dist/fbgemm_gpu
|
||||
fi
|
||||
}
|
||||
|
||||
@ -234,7 +310,7 @@ function checkout_install_torchbench() {
|
||||
function install_torchao() {
|
||||
local commit
|
||||
commit=$(get_pinned_commit torchao)
|
||||
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/ao.git@${commit}"
|
||||
pip_build_and_install "git+https://github.com/pytorch/ao.git@${commit}" dist/ao
|
||||
}
|
||||
|
||||
function print_sccache_stats() {
|
||||
|
@ -1,123 +0,0 @@
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from tempfile import mkdtemp
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.primitives import hashes, serialization
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
from cryptography.x509.oid import NameOID
|
||||
|
||||
|
||||
temp_dir = mkdtemp()
|
||||
print(temp_dir)
|
||||
|
||||
|
||||
def genrsa(path):
|
||||
key = rsa.generate_private_key(
|
||||
public_exponent=65537,
|
||||
key_size=2048,
|
||||
)
|
||||
with open(path, "wb") as f:
|
||||
f.write(
|
||||
key.private_bytes(
|
||||
encoding=serialization.Encoding.PEM,
|
||||
format=serialization.PrivateFormat.TraditionalOpenSSL,
|
||||
encryption_algorithm=serialization.NoEncryption(),
|
||||
)
|
||||
)
|
||||
return key
|
||||
|
||||
|
||||
def create_cert(path, C, ST, L, O, key):
|
||||
subject = issuer = x509.Name(
|
||||
[
|
||||
x509.NameAttribute(NameOID.COUNTRY_NAME, C),
|
||||
x509.NameAttribute(NameOID.STATE_OR_PROVINCE_NAME, ST),
|
||||
x509.NameAttribute(NameOID.LOCALITY_NAME, L),
|
||||
x509.NameAttribute(NameOID.ORGANIZATION_NAME, O),
|
||||
]
|
||||
)
|
||||
cert = (
|
||||
x509.CertificateBuilder()
|
||||
.subject_name(subject)
|
||||
.issuer_name(issuer)
|
||||
.public_key(key.public_key())
|
||||
.serial_number(x509.random_serial_number())
|
||||
.not_valid_before(datetime.now(timezone.utc))
|
||||
.not_valid_after(
|
||||
# Our certificate will be valid for 10 days
|
||||
datetime.now(timezone.utc) + timedelta(days=10)
|
||||
)
|
||||
.add_extension(
|
||||
x509.BasicConstraints(ca=True, path_length=None),
|
||||
critical=True,
|
||||
)
|
||||
.sign(key, hashes.SHA256())
|
||||
)
|
||||
# Write our certificate out to disk.
|
||||
with open(path, "wb") as f:
|
||||
f.write(cert.public_bytes(serialization.Encoding.PEM))
|
||||
return cert
|
||||
|
||||
|
||||
def create_req(path, C, ST, L, O, key):
|
||||
csr = (
|
||||
x509.CertificateSigningRequestBuilder()
|
||||
.subject_name(
|
||||
x509.Name(
|
||||
[
|
||||
# Provide various details about who we are.
|
||||
x509.NameAttribute(NameOID.COUNTRY_NAME, C),
|
||||
x509.NameAttribute(NameOID.STATE_OR_PROVINCE_NAME, ST),
|
||||
x509.NameAttribute(NameOID.LOCALITY_NAME, L),
|
||||
x509.NameAttribute(NameOID.ORGANIZATION_NAME, O),
|
||||
]
|
||||
)
|
||||
)
|
||||
.sign(key, hashes.SHA256())
|
||||
)
|
||||
with open(path, "wb") as f:
|
||||
f.write(csr.public_bytes(serialization.Encoding.PEM))
|
||||
return csr
|
||||
|
||||
|
||||
def sign_certificate_request(path, csr_cert, ca_cert, private_ca_key):
|
||||
cert = (
|
||||
x509.CertificateBuilder()
|
||||
.subject_name(csr_cert.subject)
|
||||
.issuer_name(ca_cert.subject)
|
||||
.public_key(csr_cert.public_key())
|
||||
.serial_number(x509.random_serial_number())
|
||||
.not_valid_before(datetime.now(timezone.utc))
|
||||
.not_valid_after(
|
||||
# Our certificate will be valid for 10 days
|
||||
datetime.now(timezone.utc) + timedelta(days=10)
|
||||
# Sign our certificate with our private key
|
||||
)
|
||||
.sign(private_ca_key, hashes.SHA256())
|
||||
)
|
||||
with open(path, "wb") as f:
|
||||
f.write(cert.public_bytes(serialization.Encoding.PEM))
|
||||
return cert
|
||||
|
||||
|
||||
ca_key = genrsa(temp_dir + "/ca.key")
|
||||
ca_cert = create_cert(
|
||||
temp_dir + "/ca.pem",
|
||||
"US",
|
||||
"New York",
|
||||
"New York",
|
||||
"Gloo Certificate Authority",
|
||||
ca_key,
|
||||
)
|
||||
|
||||
pkey = genrsa(temp_dir + "/pkey.key")
|
||||
csr = create_req(
|
||||
temp_dir + "/csr.csr",
|
||||
"US",
|
||||
"California",
|
||||
"San Francisco",
|
||||
"Gloo Testing Company",
|
||||
pkey,
|
||||
)
|
||||
|
||||
cert = sign_certificate_request(temp_dir + "/cert.pem", csr, ca_cert, ca_key)
|
@ -185,7 +185,7 @@ torchbench_setup_macos() {
|
||||
}
|
||||
|
||||
pip_benchmark_deps() {
|
||||
python -mpip install --no-input astunparse requests cython scikit-learn
|
||||
python -mpip install --no-input requests cython scikit-learn six
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
CREATE_TEST_CERT="$(dirname "${BASH_SOURCE[0]}")/create_test_cert.py"
|
||||
TMP_CERT_DIR=$(python "$CREATE_TEST_CERT")
|
||||
|
||||
openssl verify -CAfile "${TMP_CERT_DIR}/ca.pem" "${TMP_CERT_DIR}/cert.pem"
|
||||
|
||||
export GLOO_DEVICE_TRANSPORT=TCP_TLS
|
||||
export GLOO_DEVICE_TRANSPORT_TCP_TLS_PKEY=${TMP_CERT_DIR}/pkey.key
|
||||
export GLOO_DEVICE_TRANSPORT_TCP_TLS_CERT=${TMP_CERT_DIR}/cert.pem
|
||||
export GLOO_DEVICE_TRANSPORT_TCP_TLS_CA_FILE=${TMP_CERT_DIR}/ca.pem
|
||||
|
||||
time python test/run_test.py --include distributed/test_c10d_gloo --verbose -- ProcessGroupGlooTest
|
||||
|
||||
unset GLOO_DEVICE_TRANSPORT
|
||||
unset GLOO_DEVICE_TRANSPORT_TCP_TLS_PKEY
|
||||
unset GLOO_DEVICE_TRANSPORT_TCP_TLS_CERT
|
||||
unset GLOO_DEVICE_TRANSPORT_TCP_TLS_CA_FILE
|
@ -74,12 +74,13 @@ else
|
||||
fi
|
||||
|
||||
# Environment initialization
|
||||
retry pip install -qUr requirements-build.txt
|
||||
if [[ "$(uname)" == Darwin ]]; then
|
||||
# Install the testing dependencies
|
||||
retry pip install -q future hypothesis ${NUMPY_PACKAGE} ${PROTOBUF_PACKAGE} pytest setuptools six typing_extensions pyyaml
|
||||
retry pip install -q future hypothesis ${NUMPY_PACKAGE} ${PROTOBUF_PACKAGE} pytest
|
||||
else
|
||||
retry pip install -qr requirements.txt || true
|
||||
retry pip install -q hypothesis protobuf pytest setuptools || true
|
||||
retry pip install -q hypothesis protobuf pytest || true
|
||||
numpy_ver=1.15
|
||||
case "$(python --version 2>&1)" in
|
||||
*2* | *3.5* | *3.6*)
|
||||
|
@ -385,6 +385,29 @@ def smoke_test_compile(device: str = "cpu") -> None:
|
||||
x_pt2 = torch.compile(model, mode="max-autotune")(x)
|
||||
|
||||
|
||||
def smoke_test_nvshmem() -> None:
|
||||
if not torch.cuda.is_available():
|
||||
print("CUDA is not available, skipping NVSHMEM test")
|
||||
return
|
||||
|
||||
# Check if NVSHMEM is compiled in current build
|
||||
try:
|
||||
from torch._C._distributed_c10d import _is_nvshmem_available
|
||||
except ImportError:
|
||||
# Not built with NVSHMEM support.
|
||||
# torch is not compiled with NVSHMEM prior to 2.9
|
||||
if torch.__version__ < "2.9":
|
||||
return
|
||||
else:
|
||||
# After 2.9: NVSHMEM is expected to be compiled in current build
|
||||
raise RuntimeError("torch not compiled with NVSHMEM") from None
|
||||
|
||||
print("torch compiled with NVSHMEM")
|
||||
|
||||
# Check if NVSHMEM is available on current system.
|
||||
print(f"NVSHMEM available at run time: {_is_nvshmem_available()}")
|
||||
|
||||
|
||||
def smoke_test_modules():
|
||||
cwd = os.getcwd()
|
||||
for module in MODULES:
|
||||
@ -479,6 +502,8 @@ def main() -> None:
|
||||
options.pypi_pkg_check,
|
||||
)
|
||||
|
||||
smoke_test_nvshmem()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -11,6 +11,8 @@ export TERM=vt100
|
||||
|
||||
# shellcheck source=./common.sh
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
||||
# shellcheck source=./common-build.sh
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/common-build.sh"
|
||||
|
||||
# Do not change workspace permissions for ROCm and s390x CI jobs
|
||||
# as it can leave workspace with bad permissions for cancelled jobs
|
||||
@ -163,8 +165,6 @@ elif [[ "$BUILD_ENVIRONMENT" == *xpu* ]]; then
|
||||
export PYTORCH_TESTING_DEVICE_ONLY_FOR="xpu"
|
||||
# setting PYTHON_TEST_EXTRA_OPTION
|
||||
export PYTHON_TEST_EXTRA_OPTION="--xpu"
|
||||
# Disable sccache for xpu test due to flaky issue https://github.com/pytorch/pytorch/issues/143585
|
||||
sudo rm -rf /opt/cache
|
||||
fi
|
||||
|
||||
if [[ "$TEST_CONFIG" == *crossref* ]]; then
|
||||
@ -201,7 +201,7 @@ fi
|
||||
|
||||
if [[ "$BUILD_ENVIRONMENT" != *-bazel-* ]] ; then
|
||||
# JIT C++ extensions require ninja.
|
||||
pip_install --user "ninja==1.10.2"
|
||||
pip_install "ninja==1.10.2"
|
||||
# ninja is installed in $HOME/.local/bin, e.g., /var/lib/jenkins/.local/bin for CI user jenkins
|
||||
# but this script should be runnable by any user, including root
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
@ -289,6 +289,12 @@ elif [[ $TEST_CONFIG == 'nogpu_AVX512' ]]; then
|
||||
export ATEN_CPU_CAPABILITY=avx2
|
||||
fi
|
||||
|
||||
if [[ "${TEST_CONFIG}" == "legacy_nvidia_driver" ]]; then
|
||||
# Make sure that CUDA can be initialized
|
||||
(cd test && python -c "import torch; torch.rand(2, 2, device='cuda')")
|
||||
export USE_LEGACY_DRIVER=1
|
||||
fi
|
||||
|
||||
test_python_legacy_jit() {
|
||||
time python test/run_test.py --include test_jit_legacy test_jit_fuser_legacy --verbose
|
||||
assert_git_not_dirty
|
||||
@ -327,12 +333,24 @@ test_h100_distributed() {
|
||||
time python test/run_test.py --include distributed/_composable/test_composability/test_pp_composability.py $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
# This test requires multicast support
|
||||
time python test/run_test.py --include distributed/_composable/fsdp/test_fully_shard_comm.py -k TestFullyShardAllocFromPG $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
assert_git_not_dirty
|
||||
}
|
||||
|
||||
test_h100_symm_mem() {
|
||||
# symmetric memory test
|
||||
time python test/run_test.py --include distributed/test_symmetric_memory.py $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
time python test/run_test.py --include distributed/test_nvshmem.py $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
time python test/run_test.py --include distributed/test_nvshmem_triton.py $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
time python test/run_test.py --include distributed/test_nccl.py $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
assert_git_not_dirty
|
||||
}
|
||||
|
||||
test_h100_cutlass_backend() {
|
||||
# cutlass backend tests for H100
|
||||
TORCHINDUCTOR_CUTLASS_DIR=$(realpath "./third_party/cutlass") python test/run_test.py --include inductor/test_cutlass_backend -k "not addmm" $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
TORCHINDUCTOR_CUTLASS_DIR=$(realpath "./third_party/cutlass") python test/run_test.py --include inductor/test_cutlass_evt $PYTHON_TEST_EXTRA_OPTION --upload-artifacts-while-running
|
||||
}
|
||||
|
||||
test_lazy_tensor_meta_reference_disabled() {
|
||||
export TORCH_DISABLE_FUNCTIONALIZATION_META_REFERENCE=1
|
||||
echo "Testing lazy tensor operations without meta reference"
|
||||
@ -361,12 +379,24 @@ test_dynamo_wrapped_shard() {
|
||||
assert_git_not_dirty
|
||||
}
|
||||
|
||||
test_einops() {
|
||||
pip install einops==0.6.1
|
||||
time python test/run_test.py --einops --verbose --upload-artifacts-while-running
|
||||
pip install einops==0.7.0
|
||||
time python test/run_test.py --einops --verbose --upload-artifacts-while-running
|
||||
pip install einops==0.8.1
|
||||
time python test/run_test.py --einops --verbose --upload-artifacts-while-running
|
||||
assert_git_not_dirty
|
||||
}
|
||||
|
||||
|
||||
test_inductor_distributed() {
|
||||
# Smuggle a few multi-gpu tests here so that we don't have to request another large node
|
||||
echo "Testing multi_gpu tests in test_torchinductor"
|
||||
python test/run_test.py -i inductor/test_torchinductor.py -k test_multi_gpu --verbose
|
||||
python test/run_test.py -i inductor/test_aot_inductor.py -k test_non_default_cuda_device --verbose
|
||||
python test/run_test.py -i inductor/test_aot_inductor.py -k test_replicate_on_devices --verbose
|
||||
python test/run_test.py -i inductor/test_aot_inductor.py -k test_on_gpu_device1 --verbose
|
||||
python test/run_test.py -i inductor/test_aot_inductor.py -k test_non_default_gpu_device --verbose
|
||||
python test/run_test.py -i inductor/test_aot_inductor.py -k test_load_package_multiple_gpus --verbose
|
||||
python test/run_test.py -i distributed/test_c10d_functional_native.py --verbose
|
||||
python test/run_test.py -i distributed/tensor/test_dtensor_compile.py --verbose
|
||||
python test/run_test.py -i distributed/tensor/parallel/test_micro_pipeline_tp.py --verbose
|
||||
@ -418,14 +448,21 @@ test_inductor_aoti() {
|
||||
python3 tools/amd_build/build_amd.py
|
||||
fi
|
||||
if [[ "$BUILD_ENVIRONMENT" == *sm86* ]]; then
|
||||
BUILD_AOT_INDUCTOR_TEST=1 TORCH_CUDA_ARCH_LIST=8.6 USE_FLASH_ATTENTION=OFF python setup.py develop
|
||||
BUILD_COMMAND=(TORCH_CUDA_ARCH_LIST=8.6 USE_FLASH_ATTENTION=OFF python -m pip install --no-build-isolation -v -e .)
|
||||
# TODO: Replace me completely, as one should not use conda libstdc++, nor need special path to TORCH_LIB
|
||||
LD_LIBRARY_PATH=/opt/conda/envs/py_3.10/lib/:${TORCH_LIB_DIR}:$LD_LIBRARY_PATH
|
||||
CPP_TESTS_DIR="${BUILD_BIN_DIR}" python test/run_test.py --cpp --verbose -i cpp/test_aoti_abi_check cpp/test_aoti_inference -dist=loadfile
|
||||
TEST_ENVS=(CPP_TESTS_DIR="${BUILD_BIN_DIR}" LD_LIBRARY_PATH="/opt/conda/envs/py_3.10/lib:${TORCH_LIB_DIR}:${LD_LIBRARY_PATH}")
|
||||
else
|
||||
BUILD_AOT_INDUCTOR_TEST=1 python setup.py develop
|
||||
CPP_TESTS_DIR="${BUILD_BIN_DIR}" LD_LIBRARY_PATH="${TORCH_LIB_DIR}" python test/run_test.py --cpp --verbose -i cpp/test_aoti_abi_check cpp/test_aoti_inference -dist=loadfile
|
||||
BUILD_COMMAND=(python -m pip install --no-build-isolation -v -e .)
|
||||
TEST_ENVS=(CPP_TESTS_DIR="${BUILD_BIN_DIR}" LD_LIBRARY_PATH="${TORCH_LIB_DIR}")
|
||||
fi
|
||||
|
||||
# aoti cmake custom command requires `torch` to be installed
|
||||
# initialize the cmake build cache and install torch
|
||||
/usr/bin/env "${BUILD_COMMAND[@]}"
|
||||
# rebuild with the build cache with `BUILD_AOT_INDUCTOR_TEST` enabled
|
||||
/usr/bin/env CMAKE_FRESH=1 BUILD_AOT_INDUCTOR_TEST=1 "${BUILD_COMMAND[@]}"
|
||||
|
||||
/usr/bin/env "${TEST_ENVS[@]}" python test/run_test.py --cpp --verbose -i cpp/test_aoti_abi_check cpp/test_aoti_inference -dist=loadfile
|
||||
}
|
||||
|
||||
test_inductor_cpp_wrapper_shard() {
|
||||
@ -438,47 +475,26 @@ test_inductor_cpp_wrapper_shard() {
|
||||
TEST_REPORTS_DIR=$(pwd)/test/test-reports
|
||||
mkdir -p "$TEST_REPORTS_DIR"
|
||||
|
||||
if [[ "$1" -eq "2" ]]; then
|
||||
# For now, manually put the opinfo tests in shard 2, and all other tests in
|
||||
# shard 1. Run all CPU tests, as well as specific GPU tests triggering past
|
||||
# bugs, for now.
|
||||
python test/run_test.py \
|
||||
--include inductor/test_torchinductor_opinfo \
|
||||
-k 'linalg or to_sparse or TestInductorOpInfoCPU' \
|
||||
--verbose
|
||||
exit
|
||||
fi
|
||||
|
||||
# Run certain inductor unit tests with cpp wrapper. In the end state, we
|
||||
# should be able to run all the inductor unit tests with cpp_wrapper.
|
||||
#
|
||||
# TODO: I'm pretty sure that "TestInductorOpInfoCPU" is not a valid filter,
|
||||
# but change that in another PR to more accurately monitor the increased CI
|
||||
# usage.
|
||||
python test/run_test.py \
|
||||
--include inductor/test_torchinductor_opinfo \
|
||||
-k 'linalg or to_sparse or TestInductorOpInfoCPU' \
|
||||
--shard "$1" "$NUM_TEST_SHARDS" \
|
||||
--verbose
|
||||
python test/run_test.py \
|
||||
--include inductor/test_torchinductor inductor/test_max_autotune inductor/test_cpu_repro \
|
||||
--shard "$1" "$NUM_TEST_SHARDS" \
|
||||
--verbose
|
||||
python test/run_test.py --inductor \
|
||||
--include test_torch \
|
||||
-k 'take' \
|
||||
--shard "$1" "$NUM_TEST_SHARDS" \
|
||||
--verbose
|
||||
python test/run_test.py --inductor --include test_torch -k 'take' --verbose
|
||||
|
||||
# Run inductor benchmark tests with cpp wrapper.
|
||||
# Skip benchmark tests if it's in rerun-disabled-mode.
|
||||
if [[ "${PYTORCH_TEST_RERUN_DISABLED_TESTS}" == "1" ]]; then
|
||||
echo "skip dynamo benchmark tests for rerun-disabled-test"
|
||||
else
|
||||
echo "run dynamo benchmark tests with cpp wrapper"
|
||||
python benchmarks/dynamo/timm_models.py --device cuda --accuracy --amp \
|
||||
--training --inductor --disable-cudagraphs --only vit_base_patch16_224 \
|
||||
--output "$TEST_REPORTS_DIR/inductor_cpp_wrapper_training.csv"
|
||||
python benchmarks/dynamo/check_accuracy.py \
|
||||
--actual "$TEST_REPORTS_DIR/inductor_cpp_wrapper_training.csv" \
|
||||
--expected "benchmarks/dynamo/ci_expected_accuracy/${MAYBE_ROCM}inductor_timm_training.csv"
|
||||
|
||||
python benchmarks/dynamo/torchbench.py --device cuda --accuracy \
|
||||
--bfloat16 --inference --inductor --only hf_T5 --output "$TEST_REPORTS_DIR/inductor_cpp_wrapper_inference.csv"
|
||||
python benchmarks/dynamo/torchbench.py --device cuda --accuracy \
|
||||
--bfloat16 --inference --inductor --only llama --output "$TEST_REPORTS_DIR/inductor_cpp_wrapper_inference.csv"
|
||||
python benchmarks/dynamo/torchbench.py --device cuda --accuracy \
|
||||
--bfloat16 --inference --inductor --only moco --output "$TEST_REPORTS_DIR/inductor_cpp_wrapper_inference.csv"
|
||||
python benchmarks/dynamo/check_accuracy.py \
|
||||
--actual "$TEST_REPORTS_DIR/inductor_cpp_wrapper_inference.csv" \
|
||||
--expected "benchmarks/dynamo/ci_expected_accuracy/${MAYBE_ROCM}inductor_torchbench_inference.csv"
|
||||
fi
|
||||
}
|
||||
|
||||
# "Global" flags for inductor benchmarking controlled by TEST_CONFIG
|
||||
@ -491,7 +507,7 @@ DYNAMO_BENCHMARK_FLAGS=()
|
||||
|
||||
pr_time_benchmarks() {
|
||||
|
||||
pip_install --user "fbscribelogger"
|
||||
pip_install "fbscribelogger"
|
||||
|
||||
TEST_REPORTS_DIR=$(pwd)/test/test-reports
|
||||
mkdir -p "$TEST_REPORTS_DIR"
|
||||
@ -599,8 +615,8 @@ test_perf_for_dashboard() {
|
||||
|
||||
local device=cuda
|
||||
if [[ "${TEST_CONFIG}" == *cpu* ]]; then
|
||||
if [[ "${TEST_CONFIG}" == *zen_cpu_x86* ]]; then
|
||||
device=zen_cpu_x86
|
||||
if [[ "${TEST_CONFIG}" == *cpu_x86_zen* ]]; then
|
||||
device=cpu_x86_zen
|
||||
elif [[ "${TEST_CONFIG}" == *cpu_x86* ]]; then
|
||||
device=cpu_x86
|
||||
elif [[ "${TEST_CONFIG}" == *cpu_aarch64* ]]; then
|
||||
@ -617,7 +633,11 @@ test_perf_for_dashboard() {
|
||||
|
||||
for mode in "${modes[@]}"; do
|
||||
if [[ "$mode" == "inference" ]]; then
|
||||
dtype=bfloat16
|
||||
if [[ "$device" == "cpu_x86" ]]; then
|
||||
dtype=amp
|
||||
else
|
||||
dtype=bfloat16
|
||||
fi
|
||||
elif [[ "$mode" == "training" ]]; then
|
||||
dtype=amp
|
||||
fi
|
||||
@ -629,6 +649,10 @@ test_perf_for_dashboard() {
|
||||
target_flag+=( --no-translation-validation)
|
||||
fi
|
||||
|
||||
if [[ "$DASHBOARD_TAG" == *freezing-true* ]]; then
|
||||
target_flag+=( --freezing)
|
||||
fi
|
||||
|
||||
if [[ "$DASHBOARD_TAG" == *default-true* ]]; then
|
||||
$TASKSET python "benchmarks/dynamo/$suite.py" \
|
||||
"${target_flag[@]}" --"$mode" --"$dtype" --backend "$backend" --disable-cudagraphs "$@" \
|
||||
@ -904,12 +928,6 @@ test_torchbench_gcp_smoketest(){
|
||||
popd
|
||||
}
|
||||
|
||||
test_python_gloo_with_tls() {
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/run_glootls_test.sh"
|
||||
assert_git_not_dirty
|
||||
}
|
||||
|
||||
|
||||
test_aten() {
|
||||
# Test ATen
|
||||
# The following test(s) of ATen have already been skipped by caffe2 in rocm environment:
|
||||
@ -956,6 +974,8 @@ test_without_numpy() {
|
||||
if [[ "${TEST_CONFIG}" == *dynamo_wrapped* ]]; then
|
||||
python -c "import sys;sys.path.insert(0, 'fake_numpy');import torch;torch.compile(lambda x:print(x))('Hello World')"
|
||||
fi
|
||||
# Regression test for https://github.com/pytorch/pytorch/pull/157734 (torch.onnx should be importable without numpy)
|
||||
python -c "import sys;sys.path.insert(0, 'fake_numpy');import torch; import torch.onnx"
|
||||
popd
|
||||
}
|
||||
|
||||
@ -1019,20 +1039,10 @@ test_libtorch_api() {
|
||||
mkdir -p $TEST_REPORTS_DIR
|
||||
|
||||
OMP_NUM_THREADS=2 TORCH_CPP_TEST_MNIST_PATH="${MNIST_DIR}" "$TORCH_BIN_DIR"/test_api --gtest_filter='-IMethodTest.*' --gtest_output=xml:$TEST_REPORTS_DIR/test_api.xml
|
||||
"$TORCH_BIN_DIR"/test_tensorexpr --gtest_output=xml:$TEST_REPORTS_DIR/test_tensorexpr.xml
|
||||
else
|
||||
# Exclude IMethodTest that relies on torch::deploy, which will instead be ran in test_deploy
|
||||
OMP_NUM_THREADS=2 TORCH_CPP_TEST_MNIST_PATH="${MNIST_DIR}" python test/run_test.py --cpp --verbose -i cpp/test_api -k "not IMethodTest"
|
||||
|
||||
# On s390x, pytorch is built without llvm.
|
||||
# Even if it would be built with llvm, llvm currently doesn't support used features on s390x and
|
||||
# test fails with errors like:
|
||||
# JIT session error: Unsupported target machine architecture in ELF object pytorch-jitted-objectbuffer
|
||||
# unknown file: Failure
|
||||
# C++ exception with description "valOrErr INTERNAL ASSERT FAILED at "/var/lib/jenkins/workspace/torch/csrc/jit/tensorexpr/llvm_jit.h":34, please report a bug to PyTorch. Unexpected failure in LLVM JIT: Failed to materialize symbols: { (main, { func }) }
|
||||
if [[ "${BUILD_ENVIRONMENT}" != *s390x* ]]; then
|
||||
python test/run_test.py --cpp --verbose -i cpp/test_tensorexpr
|
||||
fi
|
||||
fi
|
||||
|
||||
# quantization is not fully supported on s390x yet
|
||||
@ -1300,10 +1310,13 @@ EOF
|
||||
|
||||
# Step 2. Make sure that the public API test "test_correct_module_names" fails when an existing
|
||||
# file is modified to introduce an invalid public API function.
|
||||
EXISTING_FILEPATH="${TORCH_INSTALL_DIR}/nn/parameter.py"
|
||||
# The filepath here must not have __all__ defined in it, otherwise the test will pass.
|
||||
# If your PR introduces __all__ to torch/cuda/streams.py please point this to another file
|
||||
# that does not have __all__ defined.
|
||||
EXISTING_FILEPATH="${TORCH_INSTALL_DIR}/cuda/streams.py"
|
||||
cp -v "${EXISTING_FILEPATH}" "${EXISTING_FILEPATH}.orig"
|
||||
echo "${BAD_PUBLIC_FUNC}" >> "${EXISTING_FILEPATH}"
|
||||
invalid_api="torch.nn.parameter.new_public_func"
|
||||
invalid_api="torch.cuda.streams.new_public_func"
|
||||
echo "Appended an invalid public API function to existing file ${EXISTING_FILEPATH}..."
|
||||
|
||||
check_public_api_test_fails \
|
||||
@ -1458,8 +1471,8 @@ test_bazel() {
|
||||
|
||||
test_benchmarks() {
|
||||
if [[ "$BUILD_ENVIRONMENT" == *cuda* && $TEST_CONFIG != *nogpu* ]]; then
|
||||
pip_install --user "pytest-benchmark==3.2.3"
|
||||
pip_install --user "requests"
|
||||
pip_install "pytest-benchmark==3.2.3"
|
||||
pip_install "requests"
|
||||
BENCHMARK_DATA="benchmarks/.data"
|
||||
mkdir -p ${BENCHMARK_DATA}
|
||||
pytest benchmarks/fastrnns/test_bench.py --benchmark-sort=Name --benchmark-json=${BENCHMARK_DATA}/fastrnns_default.json --fuser=default --executor=default
|
||||
@ -1537,7 +1550,7 @@ test_executorch() {
|
||||
test_linux_aarch64() {
|
||||
python test/run_test.py --include test_modules test_mkldnn test_mkldnn_fusion test_openmp test_torch test_dynamic_shapes \
|
||||
test_transformers test_multiprocessing test_numpy_interop test_autograd test_binary_ufuncs test_complex test_spectral_ops \
|
||||
test_foreach test_reductions test_unary_ufuncs test_tensor_creation_ops test_ops test_cpp_extensions_open_device_registration \
|
||||
test_foreach test_reductions test_unary_ufuncs test_tensor_creation_ops test_ops \
|
||||
--shard "$SHARD_NUMBER" "$NUM_TEST_SHARDS" --verbose
|
||||
|
||||
# Dynamo tests
|
||||
@ -1567,7 +1580,7 @@ test_operator_benchmark() {
|
||||
test_inductor_set_cpu_affinity
|
||||
|
||||
cd benchmarks/operator_benchmark/pt_extension
|
||||
python setup.py install
|
||||
python -m pip install .
|
||||
|
||||
cd "${TEST_DIR}"/benchmarks/operator_benchmark
|
||||
$TASKSET python -m benchmark_all_test --device "$1" --tag-filter "$2" \
|
||||
@ -1587,7 +1600,13 @@ if ! [[ "${BUILD_ENVIRONMENT}" == *libtorch* || "${BUILD_ENVIRONMENT}" == *-baze
|
||||
fi
|
||||
if [[ "${TEST_CONFIG}" == *numpy_2* ]]; then
|
||||
# Install numpy-2.0.2 and compatible scipy & numba versions
|
||||
python -mpip install --pre numpy==2.0.2 scipy==1.13.1 numba==0.60.0
|
||||
# Force re-install of pandas to avoid error where pandas checks numpy version from initial install and fails upon import
|
||||
TMP_PANDAS_VERSION=$(python -c "import pandas; print(pandas.__version__)" 2>/dev/null)
|
||||
if [ -n "$TMP_PANDAS_VERSION" ]; then
|
||||
python -m pip install --pre numpy==2.0.2 scipy==1.13.1 numba==0.60.0 pandas=="$TMP_PANDAS_VERSION" --force-reinstall
|
||||
else
|
||||
python -m pip install --pre numpy==2.0.2 scipy==1.13.1 numba==0.60.0
|
||||
fi
|
||||
python test/run_test.py --include dynamo/test_functions.py dynamo/test_unspec.py test_binary_ufuncs.py test_fake_tensor.py test_linalg.py test_numpy_interop.py test_tensor_creation_ops.py test_torch.py torch_np/test_basic.py
|
||||
elif [[ "${BUILD_ENVIRONMENT}" == *aarch64* && "${TEST_CONFIG}" != *perf_cpu_aarch64* ]]; then
|
||||
test_linux_aarch64
|
||||
@ -1641,23 +1660,19 @@ elif [[ "${TEST_CONFIG}" == *timm* ]]; then
|
||||
id=$((SHARD_NUMBER-1))
|
||||
test_dynamo_benchmark timm_models "$id"
|
||||
elif [[ "${TEST_CONFIG}" == cachebench ]]; then
|
||||
install_torchaudio cuda
|
||||
install_torchaudio
|
||||
install_torchvision
|
||||
checkout_install_torchbench nanogpt BERT_pytorch resnet50 hf_T5 llama moco
|
||||
PYTHONPATH=$(pwd)/torchbench test_cachebench
|
||||
elif [[ "${TEST_CONFIG}" == verify_cachebench ]]; then
|
||||
install_torchaudio cpu
|
||||
install_torchaudio
|
||||
install_torchvision
|
||||
checkout_install_torchbench nanogpt
|
||||
PYTHONPATH=$(pwd)/torchbench test_verify_cachebench
|
||||
elif [[ "${TEST_CONFIG}" == *torchbench* ]]; then
|
||||
if [[ "${TEST_CONFIG}" == *cpu* ]]; then
|
||||
install_torchaudio cpu
|
||||
else
|
||||
install_torchaudio cuda
|
||||
fi
|
||||
install_torchaudio
|
||||
install_torchvision
|
||||
TORCH_CUDA_ARCH_LIST="8.0;8.6" install_torchao
|
||||
install_torchao
|
||||
id=$((SHARD_NUMBER-1))
|
||||
# https://github.com/opencv/opencv-python/issues/885
|
||||
pip_install opencv-python==4.8.0.74
|
||||
@ -1682,11 +1697,11 @@ elif [[ "${TEST_CONFIG}" == *torchbench* ]]; then
|
||||
PYTHONPATH=$(pwd)/torchbench test_dynamo_benchmark torchbench "$id"
|
||||
fi
|
||||
elif [[ "${TEST_CONFIG}" == *inductor_cpp_wrapper* ]]; then
|
||||
install_torchaudio cuda
|
||||
install_torchvision
|
||||
checkout_install_torchbench hf_T5 llama moco
|
||||
PYTHONPATH=$(pwd)/torchbench test_inductor_cpp_wrapper_shard "$SHARD_NUMBER"
|
||||
test_inductor_aoti
|
||||
if [[ "$SHARD_NUMBER" -eq "1" ]]; then
|
||||
test_inductor_aoti
|
||||
fi
|
||||
elif [[ "${TEST_CONFIG}" == *inductor* ]]; then
|
||||
install_torchvision
|
||||
test_inductor_shard "${SHARD_NUMBER}"
|
||||
@ -1695,6 +1710,8 @@ elif [[ "${TEST_CONFIG}" == *inductor* ]]; then
|
||||
test_inductor_distributed
|
||||
fi
|
||||
fi
|
||||
elif [[ "${TEST_CONFIG}" == *einops* ]]; then
|
||||
test_einops
|
||||
elif [[ "${TEST_CONFIG}" == *dynamo_wrapped* ]]; then
|
||||
install_torchvision
|
||||
test_dynamo_wrapped_shard "${SHARD_NUMBER}"
|
||||
@ -1744,6 +1761,10 @@ elif [[ "${TEST_CONFIG}" == smoke ]]; then
|
||||
test_python_smoke
|
||||
elif [[ "${TEST_CONFIG}" == h100_distributed ]]; then
|
||||
test_h100_distributed
|
||||
elif [[ "${TEST_CONFIG}" == "h100-symm-mem" ]]; then
|
||||
test_h100_symm_mem
|
||||
elif [[ "${TEST_CONFIG}" == h100_cutlass_backend ]]; then
|
||||
test_h100_cutlass_backend
|
||||
else
|
||||
install_torchvision
|
||||
install_monkeytype
|
||||
|
@ -16,7 +16,7 @@ target_link_libraries(simple-torch-test CUDA::cudart CUDA::cufft CUDA::cusparse
|
||||
find_library(CUDNN_LIBRARY NAMES cudnn)
|
||||
target_link_libraries(simple-torch-test ${CUDNN_LIBRARY} )
|
||||
if(MSVC)
|
||||
file(GLOB TORCH_DLLS "$ENV{CUDA_PATH}/bin/cudnn64_8.dll")
|
||||
file(GLOB TORCH_DLLS "$ENV{CUDA_PATH}/bin/cudnn64_8.dll" "$ENV{NVTOOLSEXT_PATH}/bin/x64/*.dll")
|
||||
message("dlls to copy " ${TORCH_DLLS})
|
||||
add_custom_command(TARGET simple-torch-test
|
||||
POST_BUILD
|
||||
|
34
.ci/pytorch/win-arm64-build.ps1
Normal file
34
.ci/pytorch/win-arm64-build.ps1
Normal file
@ -0,0 +1,34 @@
|
||||
# If you want to rebuild, run this with $env:REBUILD=1
|
||||
# If you want to build with CUDA, run this with $env:USE_CUDA=1
|
||||
# If you want to build without CUDA, run this with $env:USE_CUDA=0
|
||||
|
||||
# Check for setup.py in the current directory
|
||||
if (-not (Test-Path "setup.py")) {
|
||||
Write-Host "ERROR: Please run this build script from PyTorch root directory."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get the script's parent directory
|
||||
$ScriptParentDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
|
||||
# Set TMP_DIR and convert to Windows path
|
||||
$env:TMP_DIR = Join-Path (Get-Location) "build\win_tmp"
|
||||
$env:TMP_DIR_WIN = $env:TMP_DIR # Already in Windows format, no cygpath needed
|
||||
|
||||
# Set final package directory with default fallback
|
||||
if (-not $env:PYTORCH_FINAL_PACKAGE_DIR) {
|
||||
$env:PYTORCH_FINAL_PACKAGE_DIR = "C:\w\build-results"
|
||||
}
|
||||
|
||||
# Create the final package directory if it doesn't exist
|
||||
if (-not (Test-Path $env:PYTORCH_FINAL_PACKAGE_DIR)) {
|
||||
New-Item -Path $env:PYTORCH_FINAL_PACKAGE_DIR -ItemType Directory -Force | Out-Null
|
||||
}
|
||||
|
||||
# Set script helpers directory
|
||||
$env:SCRIPT_HELPERS_DIR = Join-Path $ScriptParentDir "win-test-helpers\arm64"
|
||||
|
||||
# Run the main build script
|
||||
& "$env:SCRIPT_HELPERS_DIR\build_pytorch.ps1"
|
||||
|
||||
Write-Host "BUILD PASSED"
|
24
.ci/pytorch/win-arm64-test.sh
Normal file
24
.ci/pytorch/win-arm64-test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -ex -o pipefail
|
||||
|
||||
SCRIPT_PARENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
# shellcheck source=./common.sh
|
||||
source "$SCRIPT_PARENT_DIR/common.sh"
|
||||
|
||||
run_tests() {
|
||||
echo Running smoke_test.py...
|
||||
python ./.ci/pytorch/smoke_test/smoke_test.py --package torchonly
|
||||
|
||||
echo Running test_autograd.oy, test_nn.py, test_torch.py...
|
||||
cd test
|
||||
|
||||
CORE_TEST_LIST=("test_autograd.py" "test_nn.py" "test_modules.py")
|
||||
|
||||
for t in "${CORE_TEST_LIST[@]}"; do
|
||||
echo "Running test: $t"
|
||||
python "$t" --verbose --save-xml --use-pytest -vvvv -rfEsxXP -p no:xdist
|
||||
done
|
||||
}
|
||||
|
||||
run_tests
|
||||
echo "TEST PASSED"
|
98
.ci/pytorch/win-test-helpers/arm64/build_pytorch.ps1
Normal file
98
.ci/pytorch/win-test-helpers/arm64/build_pytorch.ps1
Normal file
@ -0,0 +1,98 @@
|
||||
# TODO: we may can use existing build_pytorch.bat for arm64
|
||||
|
||||
if ($env:DEBUG -eq "1") {
|
||||
$env:BUILD_TYPE = "debug"
|
||||
} else {
|
||||
$env:BUILD_TYPE = "release"
|
||||
}
|
||||
|
||||
# This inflates our log size slightly, but it is REALLY useful to be
|
||||
# able to see what our cl.exe commands are. (since you can actually
|
||||
# just copy-paste them into a local Windows setup to just rebuild a
|
||||
# single file.)
|
||||
# log sizes are too long, but leaving this here in case someone wants to use it locally
|
||||
# $env:CMAKE_VERBOSE_MAKEFILE = "1"
|
||||
|
||||
$env:INSTALLER_DIR = Join-Path $env:SCRIPT_HELPERS_DIR "installation-helpers"
|
||||
|
||||
cd ..
|
||||
|
||||
# Environment variables
|
||||
$env:SCCACHE_IDLE_TIMEOUT = "0"
|
||||
$env:SCCACHE_IGNORE_SERVER_IO_ERROR = "1"
|
||||
$env:CMAKE_BUILD_TYPE = $env:BUILD_TYPE
|
||||
$env:CMAKE_C_COMPILER_LAUNCHER = "sccache"
|
||||
$env:CMAKE_CXX_COMPILER_LAUNCHER = "sccache"
|
||||
$env:libuv_ROOT = Join-Path $env:DEPENDENCIES_DIR "libuv\install"
|
||||
$env:MSSdk = "1"
|
||||
|
||||
if ($env:PYTORCH_BUILD_VERSION) {
|
||||
$env:PYTORCH_BUILD_VERSION = $env:PYTORCH_BUILD_VERSION
|
||||
$env:PYTORCH_BUILD_NUMBER = "1"
|
||||
}
|
||||
|
||||
$env:CMAKE_POLICY_VERSION_MINIMUM = "3.5"
|
||||
|
||||
# Set BLAS type
|
||||
if ($env:ENABLE_APL -eq "1") {
|
||||
$env:BLAS = "APL"
|
||||
$env:USE_LAPACK = "1"
|
||||
} elseif ($env:ENABLE_OPENBLAS -eq "1") {
|
||||
$env:BLAS = "OpenBLAS"
|
||||
$env:OpenBLAS_HOME = Join-Path $env:DEPENDENCIES_DIR "OpenBLAS\install"
|
||||
}
|
||||
|
||||
# Change to source directory
|
||||
Set-Location $env:PYTORCH_ROOT
|
||||
|
||||
# Copy libuv.dll
|
||||
Copy-Item -Path (Join-Path $env:libuv_ROOT "lib\Release\uv.dll") -Destination "torch\lib\uv.dll" -Force
|
||||
|
||||
# Create virtual environment
|
||||
python -m venv .venv
|
||||
.\.venv\Scripts\Activate.ps1
|
||||
where.exe python
|
||||
|
||||
# Python install dependencies
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools pyyaml
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Set after installing psutil
|
||||
$env:DISTUTILS_USE_SDK = "1"
|
||||
|
||||
# Print all environment variables
|
||||
Get-ChildItem Env:
|
||||
|
||||
# Start and inspect sccache
|
||||
sccache --start-server
|
||||
sccache --zero-stats
|
||||
sccache --show-stats
|
||||
|
||||
# Build the wheel
|
||||
python setup.py bdist_wheel
|
||||
if ($LASTEXITCODE -ne 0) { exit 1 }
|
||||
|
||||
# Install the wheel locally
|
||||
$whl = Get-ChildItem -Path "dist\*.whl" | Select-Object -First 1
|
||||
if ($whl) {
|
||||
python -mpip install --no-index --no-deps $whl.FullName
|
||||
}
|
||||
|
||||
# Copy final wheel
|
||||
robocopy "dist" "$env:PYTORCH_FINAL_PACKAGE_DIR" *.whl
|
||||
|
||||
# Export test times
|
||||
python tools/stats/export_test_times.py
|
||||
|
||||
# Copy additional CI files
|
||||
robocopy ".additional_ci_files" "$env:PYTORCH_FINAL_PACKAGE_DIR\.additional_ci_files" /E
|
||||
|
||||
# Save ninja log
|
||||
Copy-Item -Path "build\.ninja_log" -Destination $env:PYTORCH_FINAL_PACKAGE_DIR -Force
|
||||
|
||||
# Final sccache stats and stop
|
||||
sccache --show-stats
|
||||
sccache --stop-server
|
||||
|
||||
exit 0
|
@ -42,7 +42,7 @@ call choco upgrade -y cmake --no-progress --installargs 'ADD_CMAKE_TO_PATH=Syste
|
||||
if errorlevel 1 goto fail
|
||||
if not errorlevel 0 goto fail
|
||||
|
||||
call pip install mkl-include==2021.4.0 mkl-devel==2021.4.0
|
||||
call pip install mkl==2024.2.0 mkl-static==2024.2.0 mkl-include==2024.2.0
|
||||
if errorlevel 1 goto fail
|
||||
if not errorlevel 0 goto fail
|
||||
|
||||
|
@ -41,7 +41,7 @@ fi
|
||||
python -m pip install pytest-rerunfailures==10.3 pytest-cpp==2.3.0 tensorboard==2.13.0 protobuf==5.29.4 pytest-subtests==0.13.1
|
||||
|
||||
# Install Z3 optional dependency for Windows builds.
|
||||
python -m pip install z3-solver==4.12.2.0
|
||||
python -m pip install z3-solver==4.15.1.0
|
||||
|
||||
# Install tlparse for test\dynamo\test_structured_trace.py UTs.
|
||||
python -m pip install tlparse==0.3.30
|
||||
@ -52,6 +52,9 @@ python -m pip install parameterized==0.8.1
|
||||
# Install pulp for testing ilps under torch\distributed\_tools
|
||||
python -m pip install pulp==2.9.0
|
||||
|
||||
# Install expecttest to merge https://github.com/pytorch/pytorch/pull/155308
|
||||
python -m pip install expecttest==0.3.0
|
||||
|
||||
run_tests() {
|
||||
# Run nvidia-smi if available
|
||||
for path in '/c/Program Files/NVIDIA Corporation/NVSMI/nvidia-smi.exe' /c/Windows/System32/nvidia-smi.exe; do
|
||||
|
@ -18,6 +18,15 @@ REM Check for optional components
|
||||
set USE_CUDA=
|
||||
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
|
||||
|
||||
IF "%NVTOOLSEXT_PATH%"=="" (
|
||||
IF EXIST "C:\Program Files\NVIDIA Corporation\NvToolsExt\lib\x64\nvToolsExt64_1.lib" (
|
||||
set NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt
|
||||
) ELSE (
|
||||
echo NVTX ^(Visual Studio Extension ^for CUDA^) ^not installed, failing
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
IF "%CUDA_PATH_V126%"=="" (
|
||||
IF EXIST "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\nvcc.exe" (
|
||||
set "CUDA_PATH_V126=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6"
|
||||
|
@ -18,6 +18,15 @@ REM Check for optional components
|
||||
set USE_CUDA=
|
||||
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
|
||||
|
||||
IF "%NVTOOLSEXT_PATH%"=="" (
|
||||
IF EXIST "C:\Program Files\NVIDIA Corporation\NvToolsExt\lib\x64\nvToolsExt64_1.lib" (
|
||||
set NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt
|
||||
) ELSE (
|
||||
echo NVTX ^(Visual Studio Extension ^for CUDA^) ^not installed, failing
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
IF "%CUDA_PATH_V128%"=="" (
|
||||
IF EXIST "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\bin\nvcc.exe" (
|
||||
set "CUDA_PATH_V128=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8"
|
||||
|
@ -18,6 +18,15 @@ REM Check for optional components
|
||||
set USE_CUDA=
|
||||
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
|
||||
|
||||
IF "%NVTOOLSEXT_PATH%"=="" (
|
||||
IF EXIST "C:\Program Files\NVIDIA Corporation\NvToolsExt\lib\x64\nvToolsExt64_1.lib" (
|
||||
set NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt
|
||||
) ELSE (
|
||||
echo NVTX ^(Visual Studio Extension ^for CUDA^) ^not installed, failing
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
IF "%CUDA_PATH_V129%"=="" (
|
||||
IF EXIST "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\bin\nvcc.exe" (
|
||||
set "CUDA_PATH_V129=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9"
|
||||
@ -28,10 +37,10 @@ IF "%CUDA_PATH_V129%"=="" (
|
||||
)
|
||||
|
||||
IF "%BUILD_VISION%" == "" (
|
||||
set TORCH_CUDA_ARCH_LIST=7.5;8.0;8.6;9.0;10.0;12.0
|
||||
set TORCH_CUDA_ARCH_LIST=7.0;7.5;8.0;8.6;9.0;10.0;12.0
|
||||
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all
|
||||
) ELSE (
|
||||
set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_90,code=compute_90 -gencode=arch=compute_100,code=compute_100 -gencode=arch=compute_120,code=compute_120
|
||||
set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_90,code=compute_90 -gencode=arch=compute_100,code=compute_100 -gencode=arch=compute_120,code=compute_120
|
||||
)
|
||||
|
||||
set "CUDA_PATH=%CUDA_PATH_V129%"
|
||||
|
@ -8,7 +8,9 @@ copy "%CUDA_PATH%\bin\cusolver*64_*.dll*" pytorch\torch\lib
|
||||
copy "%CUDA_PATH%\bin\cudnn*64_*.dll*" pytorch\torch\lib
|
||||
copy "%CUDA_PATH%\bin\nvrtc*64_*.dll*" pytorch\torch\lib
|
||||
copy "%CUDA_PATH%\extras\CUPTI\lib64\cupti64_*.dll*" pytorch\torch\lib
|
||||
copy "%CUDA_PATH%\extras\CUPTI\lib64\nvperf_host*.dll*" pytorch\torch\lib
|
||||
|
||||
copy "C:\Program Files\NVIDIA Corporation\NvToolsExt\bin\x64\nvToolsExt64_1.dll*" pytorch\torch\lib
|
||||
copy "%PYTHON_LIB_PATH%\libiomp*5md.dll" pytorch\torch\lib
|
||||
|
||||
:: Should be set in build_pytorch.bat
|
||||
|
@ -119,6 +119,11 @@ goto cuda_common
|
||||
:: If you cannot find the CUDA version you want to build for here then please
|
||||
:: add it @ https://github.com/pytorch/test-infra/tree/main/aws/ami/windows
|
||||
if not exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin\nvcc.exe" (
|
||||
if not exist "%SRC_DIR%\temp_build\NvToolsExt.7z" (
|
||||
curl -k -L https://ossci-windows.s3.us-east-1.amazonaws.com/builder/NvToolsExt.7z --output "%SRC_DIR%\temp_build\NvToolsExt.7z"
|
||||
if errorlevel 1 exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%SRC_DIR%\temp_build\gpu_driver_dlls.zip" (
|
||||
curl -k -L "https://ossci-windows.s3.us-east-1.amazonaws.com/builder/additional_dlls.zip" --output "%SRC_DIR%\temp_build\gpu_driver_dlls.zip"
|
||||
if errorlevel 1 exit /b 1
|
||||
@ -145,6 +150,15 @@ if not exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_
|
||||
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations"
|
||||
)
|
||||
|
||||
echo Installing NvToolsExt...
|
||||
7z x %SRC_DIR%\temp_build\NvToolsExt.7z -o"%SRC_DIR%\temp_build\NvToolsExt"
|
||||
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"
|
||||
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\include"
|
||||
mkdir "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\lib\x64"
|
||||
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\bin\x64\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"
|
||||
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\include\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\include"
|
||||
xcopy /Y "%SRC_DIR%\temp_build\NvToolsExt\lib\x64\*.*" "%ProgramFiles%\NVIDIA Corporation\NvToolsExt\lib\x64"
|
||||
|
||||
echo Installing cuDNN...
|
||||
7z x %CUDNN_SETUP_FILE% -o"%SRC_DIR%\temp_build\cudnn"
|
||||
xcopy /Y "%SRC_DIR%\temp_build\cudnn\%CUDNN_FOLDER%\bin\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin"
|
||||
@ -175,3 +189,4 @@ echo Setting up environment...
|
||||
set "PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin;%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\libnvvp;%PATH%"
|
||||
set "CUDA_PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%"
|
||||
set "CUDA_PATH_V%CUDA_VER_MAJOR%_%CUDA_VER_MINOR%=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%"
|
||||
set "NVTOOLSEXT_PATH=%ProgramFiles%\NVIDIA Corporation\NvToolsExt"
|
||||
|
@ -18,3 +18,5 @@ start /wait "" python-amd64.exe /quiet InstallAllUsers=1 PrependPath=0 Include_t
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
set "PATH=%CD%\Python\Scripts;%CD%\Python;%PATH%"
|
||||
%PYTHON_EXEC% -m pip install --upgrade pip setuptools packaging wheel
|
||||
if errorlevel 1 exit /b 1
|
||||
|
@ -148,14 +148,7 @@ if "%NVIDIA_GPU_EXISTS%" == "0" (
|
||||
goto end
|
||||
)
|
||||
|
||||
set BUILD_SPLIT_CUDA=
|
||||
if exist "%install_root%\lib\torch_cuda_cu.lib" if exist "%install_root%\lib\torch_cuda_cpp.lib" set BUILD_SPLIT_CUDA=ON
|
||||
|
||||
if "%BUILD_SPLIT_CUDA%" == "ON" (
|
||||
cl %PYTORCH_ROOT%\.ci\pytorch\test_example_code\check-torch-cuda.cpp torch_cpu.lib c10.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EHsc /std:c++17 /link /INCLUDE:?warp_size@cuda@at@@YAHXZ /INCLUDE:?_torch_cuda_cu_linker_symbol_op_cuda@native@at@@YA?AVTensor@2@AEBV32@@Z
|
||||
) else (
|
||||
cl %PYTORCH_ROOT%\.ci\pytorch\test_example_code\check-torch-cuda.cpp torch_cpu.lib c10.lib torch_cuda.lib /EHsc /std:c++17 /link /INCLUDE:?warp_size@cuda@at@@YAHXZ
|
||||
)
|
||||
cl %PYTORCH_ROOT%\.ci\pytorch\test_example_code\check-torch-cuda.cpp torch_cpu.lib c10.lib torch_cuda.lib /EHsc /std:c++17 /link /INCLUDE:?warp_size@cuda@at@@YAHXZ
|
||||
.\check-torch-cuda.exe
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
|
||||
|
@ -127,7 +127,7 @@ export INSTALL_TEST=0 # dont install test binaries into site-packages
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.15
|
||||
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
|
||||
|
||||
SETUPTOOLS_PINNED_VERSION="=46.0.0"
|
||||
SETUPTOOLS_PINNED_VERSION="==70.1.0"
|
||||
PYYAML_PINNED_VERSION="=5.3"
|
||||
EXTRA_CONDA_INSTALL_FLAGS=""
|
||||
CONDA_ENV_CREATE_FLAGS=""
|
||||
@ -135,7 +135,7 @@ RENAME_WHEEL=true
|
||||
case $desired_python in
|
||||
3.13t)
|
||||
echo "Using 3.13 deps"
|
||||
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
|
||||
SETUPTOOLS_PINNED_VERSION=">=70.1.0"
|
||||
PYYAML_PINNED_VERSION=">=6.0.1"
|
||||
NUMPY_PINNED_VERSION="=2.1.0"
|
||||
CONDA_ENV_CREATE_FLAGS="python-freethreading"
|
||||
@ -145,31 +145,31 @@ case $desired_python in
|
||||
;;
|
||||
3.13)
|
||||
echo "Using 3.13 deps"
|
||||
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
|
||||
SETUPTOOLS_PINNED_VERSION=">=70.1.0"
|
||||
PYYAML_PINNED_VERSION=">=6.0.1"
|
||||
NUMPY_PINNED_VERSION="=2.1.0"
|
||||
;;
|
||||
3.12)
|
||||
echo "Using 3.12 deps"
|
||||
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
|
||||
SETUPTOOLS_PINNED_VERSION=">=70.1.0"
|
||||
PYYAML_PINNED_VERSION=">=6.0.1"
|
||||
NUMPY_PINNED_VERSION="=2.0.2"
|
||||
;;
|
||||
3.11)
|
||||
echo "Using 3.11 deps"
|
||||
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
|
||||
SETUPTOOLS_PINNED_VERSION=">=70.1.0"
|
||||
PYYAML_PINNED_VERSION=">=5.3"
|
||||
NUMPY_PINNED_VERSION="=2.0.2"
|
||||
;;
|
||||
3.10)
|
||||
echo "Using 3.10 deps"
|
||||
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
|
||||
SETUPTOOLS_PINNED_VERSION=">=70.1.0"
|
||||
PYYAML_PINNED_VERSION=">=5.3"
|
||||
NUMPY_PINNED_VERSION="=2.0.2"
|
||||
;;
|
||||
3.9)
|
||||
echo "Using 3.9 deps"
|
||||
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
|
||||
SETUPTOOLS_PINNED_VERSION=">=70.1.0"
|
||||
PYYAML_PINNED_VERSION=">=5.3"
|
||||
NUMPY_PINNED_VERSION="=2.0.2"
|
||||
;;
|
||||
@ -184,7 +184,8 @@ tmp_env_name="wheel_py$python_nodot"
|
||||
conda create ${EXTRA_CONDA_INSTALL_FLAGS} -yn "$tmp_env_name" python="$desired_python" ${CONDA_ENV_CREATE_FLAGS}
|
||||
source activate "$tmp_env_name"
|
||||
|
||||
pip install "numpy=${NUMPY_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" requests ninja "setuptools${SETUPTOOLS_PINNED_VERSION}" typing_extensions
|
||||
retry pip install -r "${pytorch_rootdir}/requirements-build.txt"
|
||||
pip install "numpy=${NUMPY_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" requests ninja "setuptools${SETUPTOOLS_PINNED_VERSION}" typing-extensions
|
||||
retry pip install -r "${pytorch_rootdir}/requirements.txt" || true
|
||||
retry brew install libomp
|
||||
|
||||
|
@ -75,8 +75,8 @@ TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt)
|
||||
# Here PYTORCH_EXTRA_INSTALL_REQUIREMENTS is already set for the all the wheel builds hence append TRITON_CONSTRAINT
|
||||
TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64'"
|
||||
|
||||
# CUDA 12.8 builds have triton for Linux and Linux aarch64 binaries.
|
||||
if [[ "$DESIRED_CUDA" == cu128 ]]; then
|
||||
# CUDA 12.9 builds have triton for Linux and Linux aarch64 binaries.
|
||||
if [[ "$DESIRED_CUDA" == "cu129" ]]; then
|
||||
TRITON_CONSTRAINT="platform_system == 'Linux'"
|
||||
fi
|
||||
|
||||
|
@ -120,6 +120,7 @@ UseTab: Never
|
||||
Language: ObjC
|
||||
ColumnLimit: 120
|
||||
AlignAfterOpenBracket: Align
|
||||
IndentWidth: 2
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: false
|
||||
|
@ -61,8 +61,8 @@ You are now all set to start developing with PyTorch in a DevContainer environme
|
||||
## Step 8: Build PyTorch
|
||||
|
||||
To build pytorch from source, simply run:
|
||||
```
|
||||
python setup.py develop
|
||||
```bash
|
||||
python -m pip install --no-build-isolation -v -e .
|
||||
```
|
||||
|
||||
The process involves compiling thousands of files, and would take a long time. Fortunately, the compiled objects can be useful for your next build. When you modify some files, you only need to compile the changed files the next time.
|
||||
|
@ -1,14 +1,36 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
# Python
|
||||
[*.py]
|
||||
[*.{py,pyi,py.in,pyi.in}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# C/C++/CUDA
|
||||
[*.{cpp,hpp,cxx,cc,c,h,cu,cuh}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Objective-C
|
||||
[*.{mm,m,M}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Clang tools
|
||||
[.clang-{format,tidy}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Make
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
# Batch file
|
||||
[*.bat]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = crlf
|
||||
|
4
.flake8
4
.flake8
@ -7,12 +7,12 @@ max-line-length = 120
|
||||
# C408 ignored because we like the dict keyword argument syntax
|
||||
# E501 is not flexible enough, we're using B950 instead
|
||||
ignore =
|
||||
E203,E305,E402,E501,E704,E721,E741,F405,F841,F999,W503,W504,C408,E302,W291,E303,
|
||||
E203,E305,E402,E501,E704,E721,E741,F405,F841,F999,W503,W504,C408,E302,W291,E303,F824,
|
||||
# shebang has extra meaning in fbcode lints, so I think it's not worth trying
|
||||
# to line this up with executable bit
|
||||
EXE001,
|
||||
# these ignores are from flake8-bugbear; please fix!
|
||||
B007,B008,B017,B019,B023,B028,B903,B904,B905,B906,B907
|
||||
B007,B008,B017,B019,B023,B028,B903,B904,B905,B906,B907,B908,B910
|
||||
# these ignores are from flake8-comprehensions; please fix!
|
||||
C407,
|
||||
# these ignores are from flake8-logging-format; please fix!
|
||||
|
3
.github/actionlint.yaml
vendored
3
.github/actionlint.yaml
vendored
@ -57,9 +57,6 @@ self-hosted-runner:
|
||||
- linux.rocm.gpu.mi300.2
|
||||
- linux.rocm.gpu.mi300.4
|
||||
- rocm-docker
|
||||
# Repo-specific Apple hosted runners
|
||||
- macos-m1-ultra
|
||||
- macos-m2-14
|
||||
# Org wise AWS `mac2.metal` runners (2020 Mac mini hardware powered by Apple silicon M1 processors)
|
||||
- macos-m1-stable
|
||||
- macos-m1-13
|
||||
|
78
.github/actions/build-android/action.yml
vendored
78
.github/actions/build-android/action.yml
vendored
@ -1,78 +0,0 @@
|
||||
name: build android
|
||||
|
||||
description: build android for a specific arch
|
||||
|
||||
inputs:
|
||||
arch:
|
||||
description: arch to build
|
||||
required: true
|
||||
arch-for-build-env:
|
||||
description: |
|
||||
arch to pass to build environment.
|
||||
This is currently different than the arch name we use elsewhere, which
|
||||
should be fixed.
|
||||
required: true
|
||||
github-secret:
|
||||
description: github token
|
||||
required: true
|
||||
build-environment:
|
||||
required: true
|
||||
description: Top-level label for what's being built/tested.
|
||||
docker-image:
|
||||
required: true
|
||||
description: Name of the base docker image to build with.
|
||||
branch:
|
||||
required: true
|
||||
description: What branch we are building on.
|
||||
outputs:
|
||||
container_id:
|
||||
description: Docker container identifier used to build the artifacts
|
||||
value: ${{ steps.build.outputs.container_id }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Build-${{ inputs.arch }}
|
||||
id: build
|
||||
shell: bash
|
||||
env:
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-${{ inputs.arch-for-build-env }}-build"
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
|
||||
SCCACHE_REGION: us-east-1
|
||||
DOCKER_IMAGE: ${{ inputs.docker-image }}
|
||||
MATRIX_ARCH: ${{ inputs.arch }}
|
||||
run: |
|
||||
# detached container should get cleaned up by teardown_ec2_linux
|
||||
set -exo pipefail
|
||||
export container_name
|
||||
container_name=$(docker run \
|
||||
-e BUILD_ENVIRONMENT \
|
||||
-e MAX_JOBS="$(nproc --ignore=2)" \
|
||||
-e AWS_DEFAULT_REGION \
|
||||
-e PR_NUMBER \
|
||||
-e SHA1 \
|
||||
-e BRANCH \
|
||||
-e SCCACHE_BUCKET \
|
||||
-e SCCACHE_REGION \
|
||||
-e SKIP_SCCACHE_INITIALIZATION=1 \
|
||||
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
|
||||
--security-opt seccomp=unconfined \
|
||||
--cap-add=SYS_PTRACE \
|
||||
--tty \
|
||||
--detach \
|
||||
--user jenkins \
|
||||
-w /var/lib/jenkins/workspace \
|
||||
"${DOCKER_IMAGE}"
|
||||
)
|
||||
git submodule sync && git submodule update -q --init --recursive --depth 1
|
||||
docker cp "${GITHUB_WORKSPACE}/." "${container_name}:/var/lib/jenkins/workspace"
|
||||
(echo "sudo chown -R jenkins . && .ci/pytorch/build.sh && find ${BUILD_ROOT} -type f -name "*.a" -or -name "*.o" -delete" | docker exec -u jenkins -i "${container_name}" bash) 2>&1
|
||||
|
||||
# Copy install binaries back
|
||||
mkdir -p "${GITHUB_WORKSPACE}/build_android_install_${MATRIX_ARCH}"
|
||||
docker cp "${container_name}:/var/lib/jenkins/workspace/build_android/install" "${GITHUB_WORKSPACE}/build_android_install_${MATRIX_ARCH}"
|
||||
echo "container_id=${container_name}" >> "${GITHUB_OUTPUT}"
|
@ -70,7 +70,7 @@ runs:
|
||||
set -eux
|
||||
# PyYAML 6.0 doesn't work with MacOS x86 anymore
|
||||
# This must run on Python-3.7 (AmazonLinux2) so can't use request=3.32.2
|
||||
python3 -m pip install requests==2.27.1 pyyaml==6.0.1
|
||||
python3 -m pip install requests==2.27.1 pyyaml==6.0.2
|
||||
|
||||
- name: Parse ref
|
||||
id: parse-ref
|
||||
@ -125,7 +125,7 @@ runs:
|
||||
TAG: ${{ steps.parse-ref.outputs.tag }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
SCHEDULE: ${{ github.event.schedule }}
|
||||
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
|
||||
HEAD_BRANCH: ${{ steps.parse-ref.outputs.branch }}
|
||||
id: filter
|
||||
run: |
|
||||
echo "Workflow: ${GITHUB_WORKFLOW}"
|
||||
|
2
.github/actions/linux-test/action.yml
vendored
2
.github/actions/linux-test/action.yml
vendored
@ -126,7 +126,7 @@ runs:
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
run: |
|
||||
python3 -m pip install psutil==5.9.1 nvidia-ml-py==11.525.84
|
||||
python3 -m pip install psutil==5.9.8 nvidia-ml-py==11.525.84
|
||||
python3 -m tools.stats.monitor > usage_log.txt 2>&1 &
|
||||
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
|
@ -304,8 +304,7 @@ def unzip_artifact_and_replace_files() -> None:
|
||||
|
||||
|
||||
def set_output() -> None:
|
||||
# Disable for now so we can monitor first
|
||||
# pass
|
||||
print("Setting output reuse=true")
|
||||
if os.getenv("GITHUB_OUTPUT"):
|
||||
with open(str(os.getenv("GITHUB_OUTPUT")), "a") as env:
|
||||
print("reuse=true", file=env)
|
||||
|
2
.github/ci_commit_pins/audio.txt
vendored
2
.github/ci_commit_pins/audio.txt
vendored
@ -1 +1 @@
|
||||
4e94321c54617dd738a05bfedfc28bc0fa635b5c
|
||||
f6dfe1231dcdd221a68416e49ab85c2575cbb824
|
||||
|
2
.github/ci_commit_pins/fbgemm_rocm.txt
vendored
2
.github/ci_commit_pins/fbgemm_rocm.txt
vendored
@ -1 +1 @@
|
||||
5fb5024118e9bb9decf96c2b0b1a8f0010bf56be
|
||||
7f1de94a4c2d14f59ad4ca84538c36084ea6b2c8
|
||||
|
1
.github/ci_commit_pins/vllm.txt
vendored
Normal file
1
.github/ci_commit_pins/vllm.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
8f605ee30912541126c0fe46d0c8c413101b600a
|
2
.github/ci_commit_pins/xla.txt
vendored
2
.github/ci_commit_pins/xla.txt
vendored
@ -1 +1 @@
|
||||
55a75404c9b75cd5fd62ab5d4deafc8c506b3af2
|
||||
29ae4c76c026185f417a25e841d2cd5e65f087a3
|
||||
|
9
.github/label_to_label.yml
vendored
9
.github/label_to_label.yml
vendored
@ -48,3 +48,12 @@
|
||||
- "module: dynamic shapes"
|
||||
then:
|
||||
- "oncall: pt2"
|
||||
- any:
|
||||
- "release notes: distributed (c10d)"
|
||||
- "release notes: distributed (symm_mem)"
|
||||
- "release notes: distributed (pipeline)"
|
||||
- "release notes: distributed (fsdp)"
|
||||
- "release notes: distributed (dtensor)"
|
||||
- "oncall: distributed"
|
||||
then:
|
||||
- "ciflow/h100-distributed"
|
||||
|
31
.github/merge_rules.yaml
vendored
31
.github/merge_rules.yaml
vendored
@ -76,6 +76,7 @@
|
||||
- .github/ci_commit_pins/audio.txt
|
||||
- .github/ci_commit_pins/vision.txt
|
||||
- .github/ci_commit_pins/torchdynamo.txt
|
||||
- .github/ci_commit_pins/vllm.txt
|
||||
- .ci/docker/ci_commit_pins/triton.txt
|
||||
approved_by:
|
||||
- pytorchbot
|
||||
@ -130,21 +131,6 @@
|
||||
- Lint
|
||||
- pull
|
||||
|
||||
- name: Mobile
|
||||
patterns:
|
||||
- ios/**
|
||||
- android/**
|
||||
- test/mobile/**
|
||||
approved_by:
|
||||
- linbinyu
|
||||
- IvanKobzarev
|
||||
- dreiss
|
||||
- raziel
|
||||
mandatory_checks_name:
|
||||
- EasyCLA
|
||||
- Lint
|
||||
- pull
|
||||
|
||||
- name: PrimTorch
|
||||
patterns:
|
||||
- torch/_meta_registrations.py
|
||||
@ -384,6 +370,7 @@
|
||||
- leslie-fang-intel
|
||||
- jgong5
|
||||
- EikanWang
|
||||
- CaoE
|
||||
mandatory_checks_name:
|
||||
- EasyCLA
|
||||
- Lint
|
||||
@ -435,6 +422,7 @@
|
||||
approved_by:
|
||||
- leslie-fang-intel
|
||||
- jgong5
|
||||
- CaoE
|
||||
mandatory_checks_name:
|
||||
- EasyCLA
|
||||
- Lint
|
||||
@ -489,6 +477,19 @@
|
||||
- srossross
|
||||
- chillee
|
||||
- zou3519
|
||||
- guilhermeleobas
|
||||
mandatory_checks_name:
|
||||
- EasyCLA
|
||||
- Lint
|
||||
- pull
|
||||
|
||||
- name: Dynamo
|
||||
patterns:
|
||||
- torch/_dynamo/**
|
||||
- torch/csrc/dynamo/**
|
||||
- test/dynamo/**
|
||||
approved_by:
|
||||
- guilhermeleobas
|
||||
mandatory_checks_name:
|
||||
- EasyCLA
|
||||
- Lint
|
||||
|
4
.github/pytorch-probot.yml
vendored
4
.github/pytorch-probot.yml
vendored
@ -4,6 +4,7 @@ ciflow_push_tags:
|
||||
- ciflow/binaries
|
||||
- ciflow/binaries_libtorch
|
||||
- ciflow/binaries_wheel
|
||||
- ciflow/triton_binaries
|
||||
- ciflow/inductor
|
||||
- ciflow/inductor-periodic
|
||||
- ciflow/inductor-rocm
|
||||
@ -30,6 +31,9 @@ ciflow_push_tags:
|
||||
- ciflow/pull
|
||||
- ciflow/h100
|
||||
- ciflow/h100-distributed
|
||||
- ciflow/win-arm64
|
||||
- ciflow/h100-symm-mem
|
||||
- ciflow/h100-cutlass-backend
|
||||
retryable_workflows:
|
||||
- pull
|
||||
- trunk
|
||||
|
9
.github/requirements-gha-cache.txt
vendored
9
.github/requirements-gha-cache.txt
vendored
@ -1,14 +1,15 @@
|
||||
# This file is to cache other dependencies not specified elsewhere in:
|
||||
# requirement.txt
|
||||
# requirements.txt
|
||||
# requirements-build.txt
|
||||
# docs/requirements.txt
|
||||
# docs/cpp/requirements.txt
|
||||
# functorch/docs/requirements.txt
|
||||
# .ci/docker/requirements-ci.txt
|
||||
boto3==1.35.42
|
||||
jinja2==3.1.6
|
||||
lintrunner==0.10.7
|
||||
lintrunner==0.12.7
|
||||
ninja==1.10.0.post1
|
||||
nvidia-ml-py==11.525.84
|
||||
pyyaml==6.0
|
||||
pyyaml==6.0.2
|
||||
requests==2.32.4
|
||||
rich==10.9.0
|
||||
rich==14.1.0
|
||||
|
@ -2,7 +2,7 @@ boto3==1.35.42
|
||||
cmake==3.27.*
|
||||
expecttest==0.3.0
|
||||
fbscribelogger==0.1.7
|
||||
filelock==3.6.0
|
||||
filelock==3.13.1
|
||||
hypothesis==6.56.4
|
||||
librosa>=0.6.2
|
||||
mpmath==1.3.0
|
||||
@ -16,7 +16,7 @@ packaging==23.1
|
||||
parameterized==0.8.1
|
||||
pillow==10.3.0
|
||||
protobuf==5.29.4
|
||||
psutil==5.9.1
|
||||
psutil==5.9.8
|
||||
pygments==2.15.0
|
||||
pytest-cpp==2.3.0
|
||||
pytest-flakefinder==1.1.0
|
||||
@ -33,4 +33,4 @@ tensorboard==2.13.0
|
||||
typing-extensions==4.12.2
|
||||
unittest-xml-reporting<=3.2.0,>=2.0.0
|
||||
xdoctest==1.1.0
|
||||
z3-solver==4.12.2.0
|
||||
z3-solver==4.15.1.0
|
||||
|
30
.github/scripts/delete_old_branches.py
vendored
30
.github/scripts/delete_old_branches.py
vendored
@ -275,7 +275,7 @@ def delete_branches() -> None:
|
||||
delete_branch(git_repo, branch)
|
||||
|
||||
|
||||
def delete_old_ciflow_tags() -> None:
|
||||
def delete_old_tags() -> None:
|
||||
# Deletes ciflow tags if they are associated with a closed PR or a specific
|
||||
# commit. Lightweight tags don't have information about the date they were
|
||||
# created, so we can't check how old they are. The script just assumes that
|
||||
@ -288,23 +288,29 @@ def delete_old_ciflow_tags() -> None:
|
||||
delete_branch(git_repo, f"refs/tags/{tag}")
|
||||
|
||||
tags = git_repo._run_git("tag").splitlines()
|
||||
open_pr_numbers = [x["number"] for x in get_open_prs()]
|
||||
|
||||
CIFLOW_TAG_REGEX = re.compile(r"^ciflow\/.*\/(\d{5,6}|[0-9a-f]{40})$")
|
||||
AUTO_REVERT_TAG_REGEX = re.compile(r"^trunk\/[0-9a-f]{40}$")
|
||||
for tag in tags:
|
||||
try:
|
||||
if ESTIMATED_TOKENS[0] > 400:
|
||||
print("Estimated tokens exceeded, exiting")
|
||||
break
|
||||
if not tag.startswith("ciflow/"):
|
||||
|
||||
if not CIFLOW_TAG_REGEX.match(tag) and not AUTO_REVERT_TAG_REGEX.match(tag):
|
||||
continue
|
||||
re_match_pr = re.match(r"^ciflow\/.*\/(\d{5,6})$", tag)
|
||||
re_match_sha = re.match(r"^ciflow\/.*\/([0-9a-f]{40})$", tag)
|
||||
if re_match_pr:
|
||||
pr_number = int(re_match_pr.group(1))
|
||||
if pr_number in open_pr_numbers:
|
||||
continue
|
||||
delete_tag(tag)
|
||||
elif re_match_sha:
|
||||
|
||||
# This checks the date of the commit associated with the tag instead
|
||||
# of the tag itself since lightweight tags don't have this
|
||||
# information. I think it should be ok since this only runs once a
|
||||
# day
|
||||
tag_info = git_repo._run_git("show", "-s", "--format=%ct", tag)
|
||||
tag_timestamp = int(tag_info.strip())
|
||||
# Maybe some timezone issues, but a few hours shouldn't matter
|
||||
tag_age_days = (datetime.now().timestamp() - tag_timestamp) / SEC_IN_DAY
|
||||
|
||||
if tag_age_days > 7:
|
||||
print(f"[{tag}] Tag is older than 7 days, deleting")
|
||||
delete_tag(tag)
|
||||
except Exception as e:
|
||||
print(f"Failed to check tag {tag}: {e}")
|
||||
@ -312,4 +318,4 @@ def delete_old_ciflow_tags() -> None:
|
||||
|
||||
if __name__ == "__main__":
|
||||
delete_branches()
|
||||
delete_old_ciflow_tags()
|
||||
delete_old_tags()
|
||||
|
16
.github/scripts/filter_test_configs.py
vendored
16
.github/scripts/filter_test_configs.py
vendored
@ -18,6 +18,7 @@ import yaml
|
||||
|
||||
|
||||
REENABLE_TEST_REGEX = "(?i)(Close(d|s)?|Resolve(d|s)?|Fix(ed|es)?) (#|https://github.com/pytorch/pytorch/issues/)([0-9]+)"
|
||||
MAIN_BRANCH = "main"
|
||||
|
||||
PREFIX = "test-config/"
|
||||
|
||||
@ -97,7 +98,7 @@ def parse_args() -> Any:
|
||||
parser.add_argument(
|
||||
"--branch",
|
||||
type=str,
|
||||
default="main",
|
||||
default=MAIN_BRANCH,
|
||||
help="the branch name",
|
||||
)
|
||||
return parser.parse_args()
|
||||
@ -456,6 +457,7 @@ def download_json(url: str, headers: dict[str, str], num_retries: int = 3) -> An
|
||||
|
||||
|
||||
def set_output(name: str, val: Any) -> None:
|
||||
print(f"Setting output {name}={val}")
|
||||
if os.getenv("GITHUB_OUTPUT"):
|
||||
with open(str(os.getenv("GITHUB_OUTPUT")), "a") as env:
|
||||
print(f"{name}={val}", file=env)
|
||||
@ -495,13 +497,20 @@ def check_for_setting(labels: set[str], body: str, setting: str) -> bool:
|
||||
|
||||
|
||||
def perform_misc_tasks(
|
||||
labels: set[str], test_matrix: dict[str, list[Any]], job_name: str, pr_body: str
|
||||
labels: set[str],
|
||||
test_matrix: dict[str, list[Any]],
|
||||
job_name: str,
|
||||
pr_body: str,
|
||||
branch: Optional[str] = None,
|
||||
) -> None:
|
||||
"""
|
||||
In addition to apply the filter logic, the script also does the following
|
||||
misc tasks to set keep-going and is-unstable variables
|
||||
"""
|
||||
set_output("keep-going", check_for_setting(labels, pr_body, "keep-going"))
|
||||
set_output(
|
||||
"keep-going",
|
||||
branch == MAIN_BRANCH or check_for_setting(labels, pr_body, "keep-going"),
|
||||
)
|
||||
set_output(
|
||||
"ci-verbose-test-logs",
|
||||
check_for_setting(labels, pr_body, "ci-verbose-test-logs"),
|
||||
@ -624,6 +633,7 @@ def main() -> None:
|
||||
test_matrix=filtered_test_matrix,
|
||||
job_name=args.job_name,
|
||||
pr_body=pr_body if pr_body else "",
|
||||
branch=args.branch,
|
||||
)
|
||||
|
||||
# Set the filtered test matrix as the output
|
||||
|
13
.github/scripts/generate_binary_build_matrix.py
vendored
13
.github/scripts/generate_binary_build_matrix.py
vendored
@ -17,7 +17,7 @@ from typing import Optional
|
||||
|
||||
# NOTE: Please also update the CUDA sources in `PIP_SOURCES` in tools/nightly.py when changing this
|
||||
CUDA_ARCHES = ["12.6", "12.8", "12.9"]
|
||||
CUDA_STABLE = "12.6"
|
||||
CUDA_STABLE = "12.8"
|
||||
CUDA_ARCHES_FULL_VERSION = {
|
||||
"12.6": "12.6.3",
|
||||
"12.8": "12.8.1",
|
||||
@ -53,8 +53,8 @@ PYTORCH_EXTRA_INSTALL_REQUIREMENTS = {
|
||||
"nvidia-cusolver-cu12==11.7.1.2; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cusparse-cu12==12.5.4.2; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cusparselt-cu12==0.7.1; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nccl-cu12==2.27.3; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvshmem-cu12==3.2.5; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nccl-cu12==2.27.5; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvshmem-cu12==3.3.9; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvtx-cu12==12.6.77; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvjitlink-cu12==12.6.85; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cufile-cu12==1.11.1.6; platform_system == 'Linux' and platform_machine == 'x86_64'"
|
||||
@ -70,8 +70,8 @@ PYTORCH_EXTRA_INSTALL_REQUIREMENTS = {
|
||||
"nvidia-cusolver-cu12==11.7.3.90; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cusparse-cu12==12.5.8.93; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cusparselt-cu12==0.7.1; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nccl-cu12==2.27.3; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvshmem-cu12==3.2.5; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nccl-cu12==2.27.5; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvshmem-cu12==3.3.9; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvtx-cu12==12.8.90; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvjitlink-cu12==12.8.93; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cufile-cu12==1.13.1.3; platform_system == 'Linux' and platform_machine == 'x86_64'"
|
||||
@ -87,7 +87,8 @@ PYTORCH_EXTRA_INSTALL_REQUIREMENTS = {
|
||||
"nvidia-cusolver-cu12==11.7.5.82; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cusparse-cu12==12.5.10.65; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cusparselt-cu12==0.7.1; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nccl-cu12==2.27.3; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nccl-cu12==2.27.5; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvshmem-cu12==3.3.9; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvtx-cu12==12.9.79; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-nvjitlink-cu12==12.9.86; platform_system == 'Linux' and platform_machine == 'x86_64' | "
|
||||
"nvidia-cufile-cu12==1.14.1.1; platform_system == 'Linux' and platform_machine == 'x86_64'"
|
||||
|
30
.github/scripts/generate_ci_workflows.py
vendored
30
.github/scripts/generate_ci_workflows.py
vendored
@ -22,6 +22,7 @@ LABEL_CIFLOW_BINARIES = "ciflow/binaries"
|
||||
LABEL_CIFLOW_PERIODIC = "ciflow/periodic"
|
||||
LABEL_CIFLOW_BINARIES_LIBTORCH = "ciflow/binaries_libtorch"
|
||||
LABEL_CIFLOW_BINARIES_WHEEL = "ciflow/binaries_wheel"
|
||||
LABEL_CIFLOW_ROCM = "ciflow/rocm"
|
||||
|
||||
|
||||
@dataclass
|
||||
@ -146,13 +147,35 @@ LINUX_BINARY_BUILD_WORFKLOWS = [
|
||||
),
|
||||
]
|
||||
|
||||
ROCM_SMOKE_WORKFLOWS = [
|
||||
BinaryBuildWorkflow(
|
||||
os=OperatingSystem.LINUX,
|
||||
package_type="manywheel",
|
||||
build_variant="rocm",
|
||||
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
|
||||
OperatingSystem.LINUX,
|
||||
arches=["6.4"],
|
||||
python_versions=["3.9"],
|
||||
),
|
||||
ciflow_config=CIFlowConfig(
|
||||
labels={
|
||||
LABEL_CIFLOW_BINARIES,
|
||||
LABEL_CIFLOW_BINARIES_WHEEL,
|
||||
LABEL_CIFLOW_ROCM,
|
||||
},
|
||||
isolated_workflow=True,
|
||||
),
|
||||
branches="main",
|
||||
),
|
||||
]
|
||||
|
||||
LINUX_BINARY_SMOKE_WORKFLOWS = [
|
||||
BinaryBuildWorkflow(
|
||||
os=OperatingSystem.LINUX,
|
||||
package_type="manywheel",
|
||||
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
|
||||
OperatingSystem.LINUX,
|
||||
arches=["12.6", "12.8", "12.9", "6.4"],
|
||||
arches=["12.6", "12.8", "12.9"],
|
||||
python_versions=["3.9"],
|
||||
),
|
||||
branches="main",
|
||||
@ -387,6 +410,11 @@ def main() -> None:
|
||||
jinja_env.get_template("linux_binary_build_workflow.yml.j2"),
|
||||
S390X_BINARY_BUILD_WORKFLOWS,
|
||||
),
|
||||
(
|
||||
# Give rocm it's own workflow file
|
||||
jinja_env.get_template("linux_binary_build_workflow.yml.j2"),
|
||||
ROCM_SMOKE_WORKFLOWS,
|
||||
),
|
||||
(
|
||||
jinja_env.get_template("linux_binary_build_workflow.yml.j2"),
|
||||
LINUX_BINARY_SMOKE_WORKFLOWS,
|
||||
|
2
.github/scripts/get_workflow_job_id.py
vendored
2
.github/scripts/get_workflow_job_id.py
vendored
@ -136,10 +136,10 @@ def find_job_id_name(args: Any) -> tuple[str, str]:
|
||||
|
||||
|
||||
def set_output(name: str, val: Any) -> None:
|
||||
print(f"Setting output {name}={val}")
|
||||
if os.getenv("GITHUB_OUTPUT"):
|
||||
with open(str(os.getenv("GITHUB_OUTPUT")), "a") as env:
|
||||
print(f"{name}={val}", file=env)
|
||||
print(f"setting {name}={val}")
|
||||
else:
|
||||
print(f"::set-output name={name}::{val}")
|
||||
|
||||
|
2
.github/scripts/lintrunner.sh
vendored
2
.github/scripts/lintrunner.sh
vendored
@ -2,7 +2,7 @@
|
||||
set -ex
|
||||
|
||||
# Use uv to speed up lintrunner init
|
||||
python3 -m pip install uv==0.1.45 setuptools
|
||||
python3 -m pip install -U uv==0.8.* setuptools
|
||||
|
||||
CACHE_DIRECTORY="/tmp/.lintbin"
|
||||
# Try to recover the cached binaries
|
||||
|
1
.github/scripts/parse_ref.py
vendored
1
.github/scripts/parse_ref.py
vendored
@ -5,6 +5,7 @@ import re
|
||||
|
||||
|
||||
def set_output(name: str, val: str) -> None:
|
||||
print(f"Setting output {name}={val}")
|
||||
if os.getenv("GITHUB_OUTPUT"):
|
||||
with open(str(os.getenv("GITHUB_OUTPUT")), "a") as env:
|
||||
print(f"{name}={val}", file=env)
|
||||
|
64
.github/scripts/tag_docker_images_for_release.py
vendored
64
.github/scripts/tag_docker_images_for_release.py
vendored
@ -1,64 +0,0 @@
|
||||
import argparse
|
||||
import subprocess
|
||||
|
||||
import generate_binary_build_matrix
|
||||
|
||||
|
||||
def tag_image(
|
||||
image: str,
|
||||
default_tag: str,
|
||||
release_version: str,
|
||||
dry_run: str,
|
||||
tagged_images: dict[str, bool],
|
||||
) -> None:
|
||||
if image in tagged_images:
|
||||
return
|
||||
release_image = image.replace(f"-{default_tag}", f"-{release_version}")
|
||||
print(f"Tagging {image} to {release_image} , dry_run: {dry_run}")
|
||||
|
||||
if dry_run == "disabled":
|
||||
subprocess.check_call(["docker", "pull", image])
|
||||
subprocess.check_call(["docker", "tag", image, release_image])
|
||||
subprocess.check_call(["docker", "push", release_image])
|
||||
tagged_images[image] = True
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--version",
|
||||
help="Version to tag",
|
||||
type=str,
|
||||
default="2.2",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dry-run",
|
||||
help="No Runtime Error check",
|
||||
type=str,
|
||||
choices=["enabled", "disabled"],
|
||||
default="enabled",
|
||||
)
|
||||
|
||||
options = parser.parse_args()
|
||||
tagged_images: dict[str, bool] = {}
|
||||
platform_images = [
|
||||
generate_binary_build_matrix.WHEEL_CONTAINER_IMAGES,
|
||||
generate_binary_build_matrix.LIBTORCH_CONTAINER_IMAGES,
|
||||
]
|
||||
default_tag = generate_binary_build_matrix.DEFAULT_TAG
|
||||
|
||||
for platform_image in platform_images: # type: ignore[attr-defined]
|
||||
for arch in platform_image.keys(): # type: ignore[attr-defined]
|
||||
if arch == "cpu-s390x":
|
||||
continue
|
||||
tag_image(
|
||||
platform_image[arch], # type: ignore[index]
|
||||
default_tag,
|
||||
options.version,
|
||||
options.dry_run,
|
||||
tagged_images,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
2
.github/scripts/td_llm_indexer.sh
vendored
2
.github/scripts/td_llm_indexer.sh
vendored
@ -6,7 +6,7 @@ set -euxo pipefail
|
||||
cd llm-target-determinator
|
||||
pip install -q -r requirements.txt
|
||||
cd ../codellama
|
||||
pip install -e .
|
||||
pip install --no-build-isolation -v -e .
|
||||
pip install numpy==1.26.0
|
||||
|
||||
# Run indexer
|
||||
|
56
.github/scripts/test_delete_old_branches.py
vendored
Normal file
56
.github/scripts/test_delete_old_branches.py
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
import os
|
||||
import unittest
|
||||
from datetime import datetime
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
|
||||
os.environ["GITHUB_TOKEN"] = "test_token"
|
||||
|
||||
from delete_old_branches import delete_old_tags
|
||||
|
||||
|
||||
@patch("delete_old_branches.delete_branch")
|
||||
@patch("gitutils.GitRepo._run_git")
|
||||
class TestDeleteTag(unittest.TestCase):
|
||||
def test_delete_tag(
|
||||
self, mock_run_git: "MagicMock", mock_delete_tag: "MagicMock"
|
||||
) -> None:
|
||||
for tag in [
|
||||
"ciflow/branch/12345",
|
||||
"ciflow/commitsha/1234567890abcdef1234567890abcdef12345678",
|
||||
"trunk/1234567890abcdef1234567890abcdef12345678",
|
||||
]:
|
||||
mock_run_git.side_effect = [
|
||||
tag,
|
||||
str(int(datetime.now().timestamp() - 8 * 24 * 60 * 60)), # 8 days ago
|
||||
]
|
||||
delete_old_tags()
|
||||
mock_delete_tag.assert_called_once()
|
||||
mock_delete_tag.reset_mock()
|
||||
|
||||
# Don't delete if the tag is not old enough
|
||||
mock_run_git.side_effect = [
|
||||
tag,
|
||||
str(int(datetime.now().timestamp() - 6 * 24 * 60 * 60)), # 6 days ago
|
||||
]
|
||||
delete_old_tags()
|
||||
mock_delete_tag.assert_not_called()
|
||||
|
||||
def test_do_not_delete_tag(
|
||||
self, mock_run_git: "MagicMock", mock_delete_tag: "MagicMock"
|
||||
) -> None:
|
||||
for tag in [
|
||||
"ciflow/doesntseemtomatch",
|
||||
"trunk/doesntseemtomatch",
|
||||
"doesntseemtomatch",
|
||||
]:
|
||||
mock_run_git.side_effect = [
|
||||
tag,
|
||||
str(int(datetime.now().timestamp() - 8 * 24 * 60 * 60)), # 8 days ago
|
||||
]
|
||||
delete_old_tags()
|
||||
mock_delete_tag.assert_not_called()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
1
.github/scripts/windows/build_magma.bat
vendored
1
.github/scripts/windows/build_magma.bat
vendored
@ -17,6 +17,7 @@ if errorlevel 1 exit /b 1
|
||||
|
||||
set "PATH=C:\Tools;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUVER%\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUVER%\libnvvp;%PATH%"
|
||||
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUVER%
|
||||
set NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt
|
||||
|
||||
mkdir magma_cuda%CUVER_NODOT%
|
||||
cd magma_cuda%CUVER_NODOT%
|
||||
|
2
.github/workflows/_docs.yml
vendored
2
.github/workflows/_docs.yml
vendored
@ -70,7 +70,7 @@ jobs:
|
||||
runner: ${{ inputs.runner_prefix }}linux.12xlarge
|
||||
# TODO: Nightly cpp docs take longer and longer to finish (more than 3h now)
|
||||
# Let's try to figure out how this can be improved
|
||||
timeout-minutes: 240
|
||||
timeout-minutes: 360
|
||||
- docs_type: python
|
||||
runner: ${{ inputs.runner_prefix }}linux.2xlarge
|
||||
# It takes less than 30m to finish python docs unless there are issues
|
||||
|
43
.github/workflows/_get-changed-files.yml
vendored
Normal file
43
.github/workflows/_get-changed-files.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
name: Get Changed Files
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
changed-files:
|
||||
description: "List of changed files (space-separated) or '*' if not in a PR"
|
||||
value: ${{ jobs.get-changed-files.outputs.changed-files }}
|
||||
|
||||
jobs:
|
||||
get-changed-files:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changed-files: ${{ steps.get-files.outputs.changed-files }}
|
||||
|
||||
steps:
|
||||
- name: Get changed files
|
||||
id: get-files
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
# Check if we're in a pull request context
|
||||
if [ "${{ github.event_name }}" = "pull_request" ] || [ "${{ github.event_name }}" = "pull_request_target" ]; then
|
||||
echo "Running in PR context"
|
||||
|
||||
# Get the PR number from the github context
|
||||
PR_NUMBER="${{ github.event.number }}"
|
||||
|
||||
# Use gh CLI to get changed files in the PR with explicit repo
|
||||
CHANGED_FILES=$(gh api repos/${{ github.repository }}/pulls/$PR_NUMBER/files --paginate --jq '.[] | select(.status != "removed") | .filename' | tr '\n' ' ' | sed 's/ $//')
|
||||
|
||||
if [ -z "$CHANGED_FILES" ]; then
|
||||
echo "No changed files found, setting to '*'"
|
||||
CHANGED_FILES="*"
|
||||
fi
|
||||
|
||||
echo "Changed files: $CHANGED_FILES"
|
||||
echo "changed-files=$CHANGED_FILES" >> "$GITHUB_OUTPUT"
|
||||
|
||||
else
|
||||
echo "Not in PR context, setting changed files to '*'"
|
||||
echo "changed-files=*" >> "$GITHUB_OUTPUT"
|
||||
fi
|
45
.github/workflows/_linux-build.yml
vendored
45
.github/workflows/_linux-build.yml
vendored
@ -16,11 +16,6 @@ on:
|
||||
type: boolean
|
||||
default: true
|
||||
description: If set, upload generated build artifacts.
|
||||
build-with-debug:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: If set, build in debug mode.
|
||||
sync-tag:
|
||||
required: false
|
||||
type: string
|
||||
@ -69,11 +64,6 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
max-jobs:
|
||||
description: |
|
||||
Overwrite the number of jobs to use for the build
|
||||
required: false
|
||||
type: string
|
||||
disable-monitor:
|
||||
description: |
|
||||
Disable utilization monitoring for build job
|
||||
@ -92,7 +82,6 @@ on:
|
||||
required: false
|
||||
type: number
|
||||
default: 1
|
||||
|
||||
allow-reuse-old-whl:
|
||||
description: |
|
||||
If set, the build try to pull an old wheel from s3 that was built on a
|
||||
@ -100,6 +89,13 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
build-additional-packages:
|
||||
description: |
|
||||
If set, the build job will also builds these packages and saves their
|
||||
wheels as artifacts
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
secrets:
|
||||
HUGGING_FACE_HUB_TOKEN:
|
||||
@ -111,7 +107,6 @@ on:
|
||||
description: |
|
||||
FB app token to write to scribe endpoint
|
||||
|
||||
|
||||
outputs:
|
||||
docker-image:
|
||||
value: ${{ jobs.build.outputs.docker-image }}
|
||||
@ -136,6 +131,9 @@ jobs:
|
||||
if: inputs.build-environment != 'linux-s390x-binary-manywheel'
|
||||
with:
|
||||
github-secret: ${{ secrets.GITHUB_TOKEN }}
|
||||
instructions: |
|
||||
Build is done inside the container, to start an interactive session run:
|
||||
docker exec -it $(docker container ps --format '{{.ID}}') bash
|
||||
|
||||
# [pytorch repo ref]
|
||||
# Use a pytorch/pytorch reference instead of a reference to the local
|
||||
@ -227,7 +225,7 @@ jobs:
|
||||
MONITOR_DATA_COLLECT_INTERVAL: ${{ inputs.monitor-data-collect-interval }}
|
||||
run: |
|
||||
mkdir -p ../../usage_logs
|
||||
python3 -m pip install psutil==5.9.1 dataclasses_json==0.6.7
|
||||
python3 -m pip install psutil==5.9.8 dataclasses_json==0.6.7
|
||||
python3 -m tools.stats.monitor \
|
||||
--log-interval "$MONITOR_LOG_INTERVAL" \
|
||||
--data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" \
|
||||
@ -249,8 +247,6 @@ jobs:
|
||||
env:
|
||||
BUILD_ENVIRONMENT: ${{ inputs.build-environment }}
|
||||
BRANCH: ${{ steps.parse-ref.outputs.branch }}
|
||||
# TODO duplicated
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
# Do not set SCCACHE_S3_KEY_PREFIX to share the cache between all build jobs
|
||||
@ -262,11 +258,10 @@ jobs:
|
||||
DOCKER_IMAGE: ${{ steps.calculate-docker-image.outputs.docker-image }}
|
||||
DOCKER_IMAGE_S390X: ${{ inputs.docker-image-name }}
|
||||
XLA_CUDA: ${{ contains(inputs.build-environment, 'xla') && '0' || '' }}
|
||||
DEBUG: ${{ inputs.build-with-debug && '1' || '0' }}
|
||||
OUR_GITHUB_JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
|
||||
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
|
||||
SCRIBE_GRAPHQL_ACCESS_TOKEN: ${{ secrets.SCRIBE_GRAPHQL_ACCESS_TOKEN }}
|
||||
MAX_JOBS_OVERRIDE: ${{ inputs.max-jobs }}
|
||||
BUILD_ADDITIONAL_PACKAGES: ${{ inputs.build-additional-packages }}
|
||||
run: |
|
||||
START_TIME=$(date +%s)
|
||||
if [[ ${BUILD_ENVIRONMENT} == *"s390x"* ]]; then
|
||||
@ -286,12 +281,6 @@ jobs:
|
||||
DOCKER_SHELL_CMD=
|
||||
fi
|
||||
|
||||
if [[ ${MAX_JOBS_OVERRIDE} == "" ]]; then
|
||||
MAX_JOBS="$(nproc --ignore=2)"
|
||||
else
|
||||
MAX_JOBS="${MAX_JOBS_OVERRIDE}"
|
||||
fi
|
||||
|
||||
# Leaving 1GB for the runner and other things
|
||||
TOTAL_AVAILABLE_MEMORY_IN_GB=$(awk '/MemTotal/ { printf "%.3f \n", $2/1024/1024 - 1 }' /proc/meminfo)
|
||||
# https://docs.docker.com/engine/containers/resource_constraints/#--memory-swap-details, the 3GB swap
|
||||
@ -303,9 +292,7 @@ jobs:
|
||||
# shellcheck disable=SC2086
|
||||
container_name=$(docker run \
|
||||
-e BUILD_ENVIRONMENT \
|
||||
-e MAX_JOBS=${MAX_JOBS} \
|
||||
-e MAX_JOBS_OVERRIDE \
|
||||
-e AWS_DEFAULT_REGION \
|
||||
-e MAX_JOBS="$(nproc --ignore=2)" \
|
||||
-e PR_NUMBER \
|
||||
-e SHA1 \
|
||||
-e BRANCH \
|
||||
@ -320,6 +307,7 @@ jobs:
|
||||
-e HUGGING_FACE_HUB_TOKEN \
|
||||
-e SCRIBE_GRAPHQL_ACCESS_TOKEN \
|
||||
-e USE_SPLIT_BUILD \
|
||||
-e BUILD_ADDITIONAL_PACKAGES \
|
||||
--memory="${TOTAL_AVAILABLE_MEMORY_IN_GB%.*}g" \
|
||||
--memory-swap="${TOTAL_MEMORY_WITH_SWAP}g" \
|
||||
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
|
||||
@ -333,6 +321,11 @@ jobs:
|
||||
"${USED_IMAGE}" \
|
||||
${DOCKER_SHELL_CMD}
|
||||
)
|
||||
|
||||
if [[ ${BUILD_ENVIRONMENT} == *"s390x"* ]]; then
|
||||
docker exec -t "${container_name}" sh -c "python3 -m pip install -r requirements.txt"
|
||||
fi
|
||||
|
||||
docker exec -t "${container_name}" sh -c '.ci/pytorch/build.sh'
|
||||
|
||||
END_TIME=$(date +%s)
|
||||
|
57
.github/workflows/_linux-test.yml
vendored
57
.github/workflows/_linux-test.yml
vendored
@ -90,10 +90,13 @@ jobs:
|
||||
environment: ${{ github.ref == 'refs/heads/main' && 'scribe-protected' || startsWith(github.ref, 'refs/heads/release/') && 'scribe-protected' || contains(github.event.pull_request.labels.*.name, 'ci-scribe') && 'scribe-pr' || '' }}
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: ${{ matrix.mem_leak_check == 'mem_leak_check' && 600 || inputs.timeout-minutes }}
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Setup SSH (Click me for login details)
|
||||
uses: pytorch/test-infra/.github/actions/setup-ssh@main
|
||||
if: ${{ !contains(matrix.runner, 'gcp.a100') && inputs.build-environment != 'linux-s390x-binary-manywheel' }}
|
||||
if: ${{ matrix.runner != 'B200' && inputs.build-environment != 'linux-s390x-binary-manywheel' }}
|
||||
with:
|
||||
github-secret: ${{ secrets.GITHUB_TOKEN }}
|
||||
instructions: |
|
||||
@ -105,18 +108,31 @@ jobs:
|
||||
with:
|
||||
no-sudo: true
|
||||
|
||||
- name: Setup Python
|
||||
if: matrix.runner == 'B200'
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: pip
|
||||
|
||||
- name: Setup Linux
|
||||
uses: ./.github/actions/setup-linux
|
||||
if: inputs.build-environment != 'linux-s390x-binary-manywheel'
|
||||
if: inputs.build-environment != 'linux-s390x-binary-manywheel' && matrix.runner != 'B200'
|
||||
|
||||
- name: configure aws credentials
|
||||
if : ${{ inputs.aws-role-to-assume != '' && inputs.build-environment != 'linux-s390x-binary-manywheel' }}
|
||||
if: ${{ inputs.aws-role-to-assume != '' && inputs.build-environment != 'linux-s390x-binary-manywheel' }}
|
||||
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
|
||||
with:
|
||||
role-to-assume: ${{ inputs.aws-role-to-assume }}
|
||||
role-session-name: gha-linux-test
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Login to Amazon ECR
|
||||
if: ${{ inputs.aws-role-to-assume != '' && matrix.runner == 'B200' }}
|
||||
id: login-ecr
|
||||
continue-on-error: true
|
||||
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
|
||||
|
||||
- name: Calculate docker image
|
||||
id: calculate-docker-image
|
||||
uses: pytorch/test-infra/.github/actions/calculate-docker-image@main
|
||||
@ -148,17 +164,19 @@ jobs:
|
||||
- name: Install nvidia driver, nvidia-docker runtime, set GPU_FLAG
|
||||
id: install-nvidia-driver
|
||||
uses: pytorch/test-infra/.github/actions/setup-nvidia@main
|
||||
if: ${{ contains(inputs.build-environment, 'cuda') && !contains(matrix.config, 'nogpu') && steps.check_container_runner.outputs.IN_CONTAINER_RUNNER == 'false' }}
|
||||
with:
|
||||
driver-version: ${{ matrix.config == 'legacy_nvidia_driver' && '525.105.17' || '570.133.07' }}
|
||||
if: ${{ contains(inputs.build-environment, 'cuda') && !contains(matrix.config, 'nogpu') && steps.check_container_runner.outputs.IN_CONTAINER_RUNNER == 'false' && matrix.runner != 'B200' }}
|
||||
|
||||
- name: Setup GPU_FLAG for docker run
|
||||
id: setup-gpu-flag
|
||||
run: echo "GPU_FLAG=--gpus all -e NVIDIA_DRIVER_CAPABILITIES=all" >> "${GITHUB_ENV}"
|
||||
if: ${{ contains(inputs.build-environment, 'cuda') && !contains(matrix.config, 'nogpu') && steps.check_container_runner.outputs.IN_CONTAINER_RUNNER == 'true' }}
|
||||
if: ${{ contains(inputs.build-environment, 'cuda') && !contains(matrix.config, 'nogpu') && (steps.check_container_runner.outputs.IN_CONTAINER_RUNNER == 'true' || matrix.runner == 'B200') }}
|
||||
|
||||
- name: Setup SCCACHE_SERVER_PORT environment for docker run when on container
|
||||
id: setup-sscache-port-flag
|
||||
run: echo "SCCACHE_SERVER_PORT_DOCKER_FLAG=-e SCCACHE_SERVER_PORT=$((RUNNER_UID + 4226))" >> "${GITHUB_ENV}"
|
||||
if: ${{ steps.check_container_runner.outputs.IN_CONTAINER_RUNNER == 'true' }}
|
||||
if: ${{ steps.check_container_runner.outputs.IN_CONTAINER_RUNNER == 'true' && matrix.runner != 'B200' }}
|
||||
|
||||
- name: Lock NVIDIA A100 40GB Frequency
|
||||
run: |
|
||||
@ -187,7 +205,7 @@ jobs:
|
||||
MONITOR_LOG_INTERVAL: ${{ inputs.monitor-log-interval }}
|
||||
MONITOR_DATA_COLLECT_INTERVAL: ${{ inputs.monitor-data-collect-interval }}
|
||||
run: |
|
||||
python3 -m pip install psutil==5.9.1 dataclasses_json==0.6.7 nvidia-ml-py==11.525.84
|
||||
python3 -m pip install psutil==5.9.8 dataclasses_json==0.6.7 nvidia-ml-py==11.525.84
|
||||
python3 -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
|
||||
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
@ -225,6 +243,12 @@ jobs:
|
||||
run: |
|
||||
echo "timeout=$((JOB_TIMEOUT-30))" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Preserve github env variables for use in docker
|
||||
shell: bash
|
||||
run: |
|
||||
env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}"
|
||||
env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}"
|
||||
|
||||
- name: Test
|
||||
id: test
|
||||
timeout-minutes: ${{ fromJson(steps.test-timeout.outputs.timeout) }}
|
||||
@ -253,8 +277,8 @@ jobs:
|
||||
NO_TD: ${{ steps.keep-going.outputs.ci-no-td }}
|
||||
TD_DISTRIBUTED: ${{ steps.keep-going.outputs.ci-td-distributed }}
|
||||
# Do not set SCCACHE_S3_KEY_PREFIX to share the cache between all build jobs
|
||||
SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
|
||||
SCCACHE_REGION: us-east-1
|
||||
SCCACHE_BUCKET: ${{ matrix.runner != 'B200' && 'ossci-compiler-cache-circleci-v2' || '' }}
|
||||
SCCACHE_REGION: ${{ matrix.runner != 'B200' && 'us-east-1' || '' }}
|
||||
SHM_SIZE: ${{ contains(inputs.build-environment, 'cuda') && '2g' || '1g' }}
|
||||
DOCKER_IMAGE: ${{ inputs.docker-image }}
|
||||
XLA_CUDA: ${{ contains(inputs.build-environment, 'xla') && '0' || '' }}
|
||||
@ -264,7 +288,6 @@ jobs:
|
||||
DASHBOARD_TAG: ${{ inputs.dashboard-tag }}
|
||||
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
|
||||
SCRIBE_GRAPHQL_ACCESS_TOKEN: ${{ secrets.SCRIBE_GRAPHQL_ACCESS_TOKEN }}
|
||||
IS_A100_RUNNER: ${{ contains(matrix.runner, 'a100') && '1' || '0' }}
|
||||
ARTIFACTS_FILE_SUFFIX: ${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}_${{ steps.get-job-id.outputs.job-id }}
|
||||
run: |
|
||||
set -x
|
||||
@ -290,10 +313,6 @@ jobs:
|
||||
# if for some reason cleanup action doesn't stop container
|
||||
# when job is cancelled
|
||||
DOCKER_SHELL_CMD="sleep 12h"
|
||||
|
||||
# since some steps are skipped on s390x, if they are necessary, run them here
|
||||
env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}"
|
||||
env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}"
|
||||
else
|
||||
SHM_OPTS="--shm-size=${SHM_SIZE}"
|
||||
JENKINS_USER="--user jenkins"
|
||||
@ -345,7 +364,6 @@ jobs:
|
||||
-e HUGGING_FACE_HUB_TOKEN \
|
||||
-e SCRIBE_GRAPHQL_ACCESS_TOKEN \
|
||||
-e DASHBOARD_TAG \
|
||||
-e IS_A100_RUNNER \
|
||||
-e ARTIFACTS_FILE_SUFFIX \
|
||||
--memory="${TOTAL_AVAILABLE_MEMORY_IN_GB%.*}g" \
|
||||
--memory-swap="${TOTAL_MEMORY_WITH_SWAP}g" \
|
||||
@ -384,6 +402,15 @@ jobs:
|
||||
test_config: ${{ matrix.config }}
|
||||
job_identifier: ${{ github.workflow }}_${{ inputs.build-environment }}
|
||||
|
||||
- name: Authenticate with AWS
|
||||
if: ${{ matrix.runner == 'B200' }}
|
||||
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
|
||||
with:
|
||||
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_upload-benchmark-results
|
||||
# The max duration enforced by the server side
|
||||
role-duration-seconds: 18000
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Upload the benchmark results
|
||||
uses: pytorch/test-infra/.github/actions/upload-benchmark-results@main
|
||||
if: inputs.build-environment != 'linux-s390x-binary-manywheel'
|
||||
|
13
.github/workflows/_mac-build.yml
vendored
13
.github/workflows/_mac-build.yml
vendored
@ -123,7 +123,7 @@ jobs:
|
||||
else
|
||||
# The runner has access to the S3 bucket via IAM profile without the need
|
||||
# for any credential
|
||||
echo "SCCACHE_BUCKET=ossci-compiler-cache-circleci-v2" >> "${GITHUB_ENV}"0
|
||||
echo "SCCACHE_BUCKET=ossci-compiler-cache-circleci-v2" >> "${GITHUB_ENV}"
|
||||
echo "SCCACHE_S3_KEY_PREFIX=${GITHUB_WORKFLOW}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
||||
@ -152,17 +152,14 @@ jobs:
|
||||
env:
|
||||
OUR_GITHUB_JOB_ID: ${{ steps.get-job-id.outputs.job-id }}
|
||||
run: |
|
||||
echo "CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname "$(which conda)")/../"}" >> "${GITHUB_ENV}"
|
||||
|
||||
if [[ -n "$CONDA_ENV" ]]; then
|
||||
# Use binaries under conda environment
|
||||
export PATH="$CONDA_ENV/bin":$PATH
|
||||
fi
|
||||
# TODO: Remove me later, and properly activate venv
|
||||
PATH="$VENV_PATH/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
# NB: Same trick as Linux, there is no need to initialize sccache with the risk of getting
|
||||
# it hangs or timeout at initialization. The cache will be started automatically
|
||||
export SKIP_SCCACHE_INITIALIZATION=1
|
||||
${CONDA_RUN} .ci/pytorch/macos-build.sh
|
||||
.ci/pytorch/macos-build.sh
|
||||
|
||||
- name: Archive artifacts into zip
|
||||
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped'
|
||||
|
35
.github/workflows/_mac-test.yml
vendored
35
.github/workflows/_mac-test.yml
vendored
@ -88,6 +88,14 @@ jobs:
|
||||
pkill "${PROCESS}" || true
|
||||
done
|
||||
|
||||
- name: Clean up brew miniconda, if installed
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if brew list miniconda; then
|
||||
brew uninstall miniconda
|
||||
echo "REINSTALL_BREW_MINICONDA=1" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
||||
- name: Clean up leftover local python3 site-packages on MacOS pet runner
|
||||
continue-on-error: true
|
||||
run: |
|
||||
@ -110,6 +118,12 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: pytorch/test-infra/.github/actions/setup-python@main
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
pip-requirements-file: .github/requirements/pip-requirements-macOS.txt
|
||||
|
||||
- name: Start monitoring script
|
||||
id: monitor-script
|
||||
if: ${{ !inputs.disable-monitor }}
|
||||
@ -122,8 +136,8 @@ jobs:
|
||||
MONITOR_LOG_INTERVAL: ${{ inputs.monitor-log-interval }}
|
||||
MONITOR_DATA_COLLECT_INTERVAL: ${{ inputs.monitor-data-collect-interval }}
|
||||
run: |
|
||||
python3 -m pip install psutil==5.9.1 dataclasses_json==0.6.7
|
||||
python3 -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
|
||||
"$VENV_PATH/bin/python3" -m pip install psutil==5.9.8 dataclasses_sajson==0.6.7
|
||||
"$VENV_PATH/bin/python3" -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
|
||||
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Download build artifacts
|
||||
@ -138,13 +152,6 @@ jobs:
|
||||
with:
|
||||
use-gha: true
|
||||
|
||||
- name: Setup Python
|
||||
uses: pytorch/test-infra/.github/actions/setup-python@main
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
pip-requirements-file: .github/requirements/pip-requirements-macOS.txt
|
||||
default-packages: ""
|
||||
|
||||
- name: Parse ref
|
||||
id: parse-ref
|
||||
run: .github/scripts/parse_ref.py
|
||||
@ -195,7 +202,7 @@ jobs:
|
||||
set -ex
|
||||
|
||||
# TODO: Remove me later, and properly activate venv
|
||||
PATH="$(dirname "$(which python)"):$PATH"
|
||||
PATH="$VENV_PATH/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
# Print out some information about the test environment
|
||||
@ -269,6 +276,14 @@ jobs:
|
||||
workflow_attempt: ${{github.run_attempt}}
|
||||
local_path: usage_log.txt
|
||||
|
||||
- name: Reinstall brew miniconda, if was installed
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if [[ -n "$REINSTALL_BREW_MINICONDA" ]]; then
|
||||
brew install --cask miniconda
|
||||
fi
|
||||
|
||||
- name: Clean up disk space
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
|
6
.github/workflows/_rocm-test.yml
vendored
6
.github/workflows/_rocm-test.yml
vendored
@ -132,7 +132,7 @@ jobs:
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
run: |
|
||||
python3 -m pip install psutil==5.9.1 dataclasses_json==0.6.7
|
||||
python3 -m pip install psutil==5.9.8 dataclasses_json==0.6.7
|
||||
python3 -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
|
||||
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
@ -269,8 +269,8 @@ jobs:
|
||||
# copy test results back to the mounted workspace, needed sudo, resulting permissions were correct
|
||||
docker exec -t "${{ env.CONTAINER_NAME }}" sh -c "cd ../pytorch && sudo cp -R test/test-reports ../workspace/test"
|
||||
|
||||
- name: Change permissions (only needed for MI300 runners for now)
|
||||
if: ${{ always() && steps.test.conclusion && contains(matrix.runner, 'mi300') }}
|
||||
- name: Change permissions (only needed for MI300 and MI355 kubernetes runners for now)
|
||||
if: ${{ always() && steps.test.conclusion && (contains(matrix.runner, 'mi300') || contains(matrix.runner, 'mi355')) }}
|
||||
run: |
|
||||
docker exec -t "${{ env.CONTAINER_NAME }}" sh -c "sudo chown -R 1001:1001 test"
|
||||
|
||||
|
2
.github/workflows/_win-test.yml
vendored
2
.github/workflows/_win-test.yml
vendored
@ -138,7 +138,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: |
|
||||
# Windows conda doesn't have python3 binary, only python, but it's python3
|
||||
${CONDA_RUN} python -m pip install psutil==5.9.1 dataclasses_json==0.6.7 nvidia-ml-py==11.525.84
|
||||
${CONDA_RUN} python -m pip install psutil==5.9.8 dataclasses_json==0.6.7 nvidia-ml-py==11.525.84
|
||||
${CONDA_RUN} python -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
|
||||
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
|
5
.github/workflows/_xpu-test.yml
vendored
5
.github/workflows/_xpu-test.yml
vendored
@ -133,7 +133,7 @@ jobs:
|
||||
MONITOR_LOG_INTERVAL: ${{ inputs.monitor-log-interval }}
|
||||
MONITOR_DATA_COLLECT_INTERVAL: ${{ inputs.monitor-data-collect-interval }}
|
||||
run: |
|
||||
python3 -m pip install psutil==5.9.1 dataclasses_json==0.6.7 nvidia-ml-py==11.525.84
|
||||
python3 -m pip install psutil==5.9.8 dataclasses_json==0.6.7 nvidia-ml-py==11.525.84
|
||||
python3 -m tools.stats.monitor --log-interval "$MONITOR_LOG_INTERVAL" --data-collect-interval "$MONITOR_DATA_COLLECT_INTERVAL" > usage_log.txt 2>&1 &
|
||||
echo "monitor-script-pid=${!}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
@ -191,9 +191,6 @@ jobs:
|
||||
SHARD_NUMBER: ${{ matrix.shard }}
|
||||
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
|
||||
REENABLED_ISSUES: ${{ steps.keep-going.outputs.reenabled-issues }}
|
||||
SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
|
||||
SCCACHE_REGION: us-east-1
|
||||
SCCACHE_S3_KEY_PREFIX: ${{ github.workflow }}
|
||||
DOCKER_IMAGE: ${{ inputs.docker-image }}
|
||||
XLA_CLANG_CACHE_S3_BUCKET_NAME: ossci-compiler-clang-cache-circleci-xla
|
||||
PYTORCH_TEST_CUDA_MEM_LEAK_CHECK: ${{ matrix.mem_leak_check && '1' || '0' }}
|
||||
|
4
.github/workflows/build-almalinux-images.yml
vendored
4
.github/workflows/build-almalinux-images.yml
vendored
@ -23,7 +23,7 @@ on:
|
||||
env:
|
||||
DOCKER_REGISTRY: "docker.io"
|
||||
DOCKER_BUILDKIT: 1
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
||||
@ -32,7 +32,7 @@ concurrency:
|
||||
jobs:
|
||||
build-docker:
|
||||
if: github.repository_owner == 'pytorch'
|
||||
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) && 'docker-build' || '' }}
|
||||
environment: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) && 'docker-build') || '' }}
|
||||
runs-on: linux.9xlarge.ephemeral
|
||||
strategy:
|
||||
matrix:
|
||||
|
4
.github/workflows/build-libtorch-images.yml
vendored
4
.github/workflows/build-libtorch-images.yml
vendored
@ -22,7 +22,7 @@ on:
|
||||
env:
|
||||
DOCKER_REGISTRY: "docker.io"
|
||||
DOCKER_BUILDKIT: 1
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
||||
@ -40,7 +40,7 @@ jobs:
|
||||
curr_ref_type: ${{ github.ref_type }}
|
||||
|
||||
build:
|
||||
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) && 'docker-build' || '' }}
|
||||
environment: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) && 'docker-build') || '' }}
|
||||
needs: get-label-type
|
||||
runs-on: ${{ needs.get-label-type.outputs.label-type }}linux.9xlarge.ephemeral
|
||||
name: libtorch-cxx11-builder:${{ matrix.tag }}
|
||||
|
@ -12,7 +12,7 @@ on:
|
||||
env:
|
||||
DOCKER_REGISTRY: "docker.io"
|
||||
DOCKER_BUILDKIT: 1
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
||||
@ -21,7 +21,7 @@ concurrency:
|
||||
jobs:
|
||||
build-docker-cpu-s390x:
|
||||
if: github.repository_owner == 'pytorch'
|
||||
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) && 'docker-build' || '' }}
|
||||
environment: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) && 'docker-build') || '' }}
|
||||
runs-on: linux.s390x
|
||||
steps:
|
||||
- name: Checkout PyTorch
|
||||
|
5
.github/workflows/build-manywheel-images.yml
vendored
5
.github/workflows/build-manywheel-images.yml
vendored
@ -23,8 +23,7 @@ on:
|
||||
env:
|
||||
DOCKER_REGISTRY: "docker.io"
|
||||
DOCKER_BUILDKIT: 1
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
|
||||
|
||||
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) }}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
||||
cancel-in-progress: true
|
||||
@ -41,7 +40,7 @@ jobs:
|
||||
curr_ref_type: ${{ github.ref_type }}
|
||||
|
||||
build:
|
||||
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) && 'docker-build' || '' }}
|
||||
environment: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/tags/v')) && 'docker-build') || '' }}
|
||||
needs: get-label-type
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user