forked from pytorch/pytorch.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontribution_guide.html
1202 lines (1005 loc) · 61 KB
/
contribution_guide.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PyTorch Contribution Guide — PyTorch 2.0 documentation</title>
<link rel="canonical" href="https://pytorch.org/docs/stable/community/contribution_guide.html"/>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<!-- <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> -->
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/copybutton.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" type="text/css" />
<link rel="stylesheet" href="../_static/katex-math.css" type="text/css" />
<link rel="stylesheet" href="../_static/sphinx-dropdown.css" type="text/css" />
<link rel="stylesheet" href="../_static/panels-bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/jit.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="PyTorch Design Philosophy" href="design.html" />
<link rel="prev" title="PyTorch Governance | Build + CI" href="build_ci_governance.html" />
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-117752657-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-117752657-2');
</script>
<!-- End Google Analytics -->
<script src="../_static/js/modernizr.min.js"></script>
<!-- Preload the theme fonts -->
<link rel="preload" href="../_static/fonts/FreightSans/freight-sans-book.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="../_static/fonts/FreightSans/freight-sans-medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="../_static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="../_static/fonts/FreightSans/freight-sans-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="../_static/fonts/FreightSans/freight-sans-medium-italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="../_static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<!-- Preload the katex fonts -->
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Math-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size1-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size4-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size2-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size3-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Caligraphic-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css" integrity="sha384-vSIIfh2YWi9wW0r9iZe7RJPrKwp6bG+s9QZMoITbCckVJqGCCRhc+ccxNcdpHuYu" crossorigin="anonymous">
</head>
<div class="container-fluid header-holder tutorials-header" id="header-holder">
<div class="container">
<div class="header-container">
<a class="header-logo" href="https://pytorch.org/" aria-label="PyTorch"></a>
<div class="main-menu">
<ul>
<li>
<a href="https://pytorch.org/get-started">Get Started</a>
</li>
<li>
<a href="https://pytorch.org/ecosystem">Ecosystem</a>
</li>
<li>
<a href="https://pytorch.org/mobile">Mobile</a>
</li>
<li>
<a href="https://pytorch.org/blog/">Blog</a>
</li>
<li>
<a href="https://pytorch.org/tutorials">Tutorials</a>
</li>
<li class="active docs-active">
<div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown">
<a class="resource-option with-down-orange-arrow">
Docs
</a>
<div class="resources-dropdown-menu">
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/docs/stable/index.html">
<span class="dropdown-title">PyTorch</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/audio/stable/index.html">
<span class="dropdown-title">torchaudio</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/text/stable/index.html">
<span class="dropdown-title">torchtext</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/vision/stable/index.html">
<span class="dropdown-title">torchvision</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/torcharrow">
<span class="dropdown-title">torcharrow</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/data">
<span class="dropdown-title">TorchData</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/torchrec">
<span class="dropdown-title">TorchRec</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/serve/">
<span class="dropdown-title">TorchServe</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/torchx/">
<span class="dropdown-title">TorchX</span>
<p></p>
</a>
<a class="doc-dropdown-option nav-dropdown-item" href="https://pytorch.org/xla">
<span class="dropdown-title">PyTorch on XLA Devices</span>
<p></p>
</a>
</div>
</li>
<li>
<div id="resourcesDropdownButton" data-toggle="resources-dropdown" class="resources-dropdown">
<a class="resource-option with-down-arrow">
Resources
</a>
<div class="resources-dropdown-menu">
<a class="nav-dropdown-item" href="https://pytorch.org/features">
<span class="dropdown-title">About</span>
<p>Learn about PyTorch’s features and capabilities</p>
</a>
<a class="nav-dropdown-item" href="https://pytorch.org/foundation">
<span class="dropdown-title">PyTorch Foundation</span>
<p>Learn about the PyTorch foundation</p>
</a>
<a class="nav-dropdown-item" href="https://pytorch.org/#community-module">
<span class="dropdown-title">Community</span>
<p>Join the PyTorch developer community to contribute, learn, and get your questions answered.</p>
</a>
<a class="nav-dropdown-item" href="https://pytorch.org/community-stories">
<span class="dropdown-title">Community Stories</span>
<p>Learn how our community solves real, everyday machine learning problems with PyTorch.</p>
</a>
<a class="nav-dropdown-item" href="https://pytorch.org/resources">
<span class="dropdown-title">Developer Resources</span>
<p>Find resources and get questions answered</p>
</a>
<a class="nav-dropdown-item" href="https://pytorch.org/events">
<span class="dropdown-title">Events</span>
<p>Find events, webinars, and podcasts</p>
</a>
<a class="nav-dropdown-item" href="https://discuss.pytorch.org/" target="_blank">
<span class="dropdown-title">Forums</span>
<p>A place to discuss PyTorch code, issues, install, research</p>
</a>
<a class="nav-dropdown-item" href="https://pytorch.org/hub">
<span class="dropdown-title">Models (Beta)</span>
<p>Discover, publish, and reuse pre-trained models</p>
</a>
</div>
</div>
</li>
<li>
<a href="https://github.com/pytorch/pytorch">GitHub</a>
</li>
</ul>
</div>
<a class="main-menu-open-button" href="#" data-behavior="open-mobile-menu"></a>
</div>
</div>
</div>
<body class="pytorch-body">
<div class="table-of-contents-link-wrapper">
<span>Table of Contents</span>
<a href="#" class="toggle-table-of-contents" data-behavior="toggle-table-of-contents"></a>
</div>
<nav data-toggle="wy-nav-shift" class="pytorch-left-menu" id="pytorch-left-menu">
<div class="pytorch-side-scroll">
<div class="pytorch-menu pytorch-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<div class="pytorch-left-menu-search">
<div class="version">
<a href='https://pytorch.org/docs/versions.html'>2.0 ▼</a>
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search Docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<p class="caption" role="heading"><span class="caption-text">Community</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="build_ci_governance.html">PyTorch Governance | Build + CI</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">PyTorch Contribution Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">PyTorch Design Philosophy</a></li>
<li class="toctree-l1"><a class="reference internal" href="governance.html">PyTorch Governance | Mechanics</a></li>
<li class="toctree-l1"><a class="reference internal" href="persons_of_interest.html">PyTorch Governance | Maintainers</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Developer Notes</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../notes/amp_examples.html">CUDA Automatic Mixed Precision examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/autograd.html">Autograd mechanics</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/broadcasting.html">Broadcasting semantics</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/cpu_threading_torchscript_inference.html">CPU threading and TorchScript inference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/cuda.html">CUDA semantics</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/ddp.html">Distributed Data Parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/extending.html">Extending PyTorch</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/extending.func.html">Extending torch.func with autograd.Function</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/faq.html">Frequently Asked Questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/gradcheck.html">Gradcheck mechanics</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/hip.html">HIP (ROCm) semantics</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/large_scale_deployments.html">Features for large-scale deployments</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/mps.html">MPS backend</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/multiprocessing.html">Multiprocessing best practices</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/numerical_accuracy.html">Numerical accuracy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/randomness.html">Reproducibility</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/serialization.html">Serialization semantics</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notes/windows.html">Windows FAQ</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">torch.compile</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/index.html">TorchDynamo Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/installation.html">Installing TorchDynamo</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/get-started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/guards-overview.html">Guards Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/custom-backends.html">Custom Backends</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/deep-dive.html">TorchDynamo Deeper Dive</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/troubleshooting.html">TorchDynamo Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dynamo/faq.html">Frequently Asked Questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ir.html">IRs</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Language Bindings</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../cpp_index.html">C++</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/javadoc/">Javadoc</a></li>
<li class="toctree-l1"><a class="reference internal" href="../deploy.html">torch::deploy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Python API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../torch.html">torch</a></li>
<li class="toctree-l1"><a class="reference internal" href="../nn.html">torch.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../nn.functional.html">torch.nn.functional</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tensors.html">torch.Tensor</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tensor_attributes.html">Tensor Attributes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tensor_view.html">Tensor Views</a></li>
<li class="toctree-l1"><a class="reference internal" href="../amp.html">torch.amp</a></li>
<li class="toctree-l1"><a class="reference internal" href="../autograd.html">torch.autograd</a></li>
<li class="toctree-l1"><a class="reference internal" href="../library.html">torch.library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cuda.html">torch.cuda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mps.html">torch.mps</a></li>
<li class="toctree-l1"><a class="reference internal" href="../backends.html">torch.backends</a></li>
<li class="toctree-l1"><a class="reference internal" href="../distributed.html">torch.distributed</a></li>
<li class="toctree-l1"><a class="reference internal" href="../distributed.algorithms.join.html">torch.distributed.algorithms.join</a></li>
<li class="toctree-l1"><a class="reference internal" href="../distributed.elastic.html">torch.distributed.elastic</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fsdp.html">torch.distributed.fsdp</a></li>
<li class="toctree-l1"><a class="reference internal" href="../distributed.optim.html">torch.distributed.optim</a></li>
<li class="toctree-l1"><a class="reference internal" href="../distributed.tensor.parallel.html">torch.distributed.tensor.parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="../distributed.checkpoint.html">torch.distributed.checkpoint</a></li>
<li class="toctree-l1"><a class="reference internal" href="../distributions.html">torch.distributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../_dynamo.html">torch._dynamo</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fft.html">torch.fft</a></li>
<li class="toctree-l1"><a class="reference internal" href="../func.html">torch.func</a></li>
<li class="toctree-l1"><a class="reference internal" href="../futures.html">torch.futures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fx.html">torch.fx</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hub.html">torch.hub</a></li>
<li class="toctree-l1"><a class="reference internal" href="../jit.html">torch.jit</a></li>
<li class="toctree-l1"><a class="reference internal" href="../linalg.html">torch.linalg</a></li>
<li class="toctree-l1"><a class="reference internal" href="../monitor.html">torch.monitor</a></li>
<li class="toctree-l1"><a class="reference internal" href="../signal.html">torch.signal</a></li>
<li class="toctree-l1"><a class="reference internal" href="../special.html">torch.special</a></li>
<li class="toctree-l1"><a class="reference internal" href="../torch.overrides.html">torch.overrides</a></li>
<li class="toctree-l1"><a class="reference internal" href="../package.html">torch.package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../profiler.html">torch.profiler</a></li>
<li class="toctree-l1"><a class="reference internal" href="../nn.init.html">torch.nn.init</a></li>
<li class="toctree-l1"><a class="reference internal" href="../onnx.html">torch.onnx</a></li>
<li class="toctree-l1"><a class="reference internal" href="../onnx_diagnostics.html">torch.onnx diagnostics</a></li>
<li class="toctree-l1"><a class="reference internal" href="../optim.html">torch.optim</a></li>
<li class="toctree-l1"><a class="reference internal" href="../complex_numbers.html">Complex Numbers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ddp_comm_hooks.html">DDP Communication Hooks</a></li>
<li class="toctree-l1"><a class="reference internal" href="../pipeline.html">Pipeline Parallelism</a></li>
<li class="toctree-l1"><a class="reference internal" href="../quantization.html">Quantization</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rpc.html">Distributed RPC Framework</a></li>
<li class="toctree-l1"><a class="reference internal" href="../random.html">torch.random</a></li>
<li class="toctree-l1"><a class="reference internal" href="../masked.html">torch.masked</a></li>
<li class="toctree-l1"><a class="reference internal" href="../nested.html">torch.nested</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sparse.html">torch.sparse</a></li>
<li class="toctree-l1"><a class="reference internal" href="../storage.html">torch.Storage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../testing.html">torch.testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../benchmark_utils.html">torch.utils.benchmark</a></li>
<li class="toctree-l1"><a class="reference internal" href="../bottleneck.html">torch.utils.bottleneck</a></li>
<li class="toctree-l1"><a class="reference internal" href="../checkpoint.html">torch.utils.checkpoint</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cpp_extension.html">torch.utils.cpp_extension</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data.html">torch.utils.data</a></li>
<li class="toctree-l1"><a class="reference internal" href="../jit_utils.html">torch.utils.jit</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dlpack.html">torch.utils.dlpack</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mobile_optimizer.html">torch.utils.mobile_optimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../model_zoo.html">torch.utils.model_zoo</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tensorboard.html">torch.utils.tensorboard</a></li>
<li class="toctree-l1"><a class="reference internal" href="../type_info.html">Type Info</a></li>
<li class="toctree-l1"><a class="reference internal" href="../named_tensor.html">Named Tensors</a></li>
<li class="toctree-l1"><a class="reference internal" href="../name_inference.html">Named Tensors operator coverage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../config_mod.html">torch.__config__</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Libraries</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/audio/stable">torchaudio</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/data">TorchData</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/torchrec">TorchRec</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/serve">TorchServe</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/text/stable">torchtext</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/vision/stable">torchvision</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pytorch.org/xla/">PyTorch on XLA Devices</a></li>
</ul>
</div>
</div>
</nav>
<div class="pytorch-container">
<div class="pytorch-page-level-bar" id="pytorch-page-level-bar">
<div class="pytorch-breadcrumbs-wrapper">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="pytorch-breadcrumbs">
<li>
<a href="../index.html">
Docs
</a> >
</li>
<li>PyTorch Contribution Guide</li>
<li class="pytorch-breadcrumbs-aside">
<a href="../_sources/community/contribution_guide.rst.txt" rel="nofollow"><img src="../_static/images/view-page-source-icon.svg"></a>
</li>
</ul>
</div>
</div>
<div class="pytorch-shortcuts-wrapper" id="pytorch-shortcuts-wrapper">
Shortcuts
</div>
</div>
<section data-toggle="wy-nav-shift" id="pytorch-content-wrap" class="pytorch-content-wrap">
<div class="pytorch-content-left">
<div class="rst-content">
<div role="main" class="main-content" itemscope="itemscope" itemtype="http://schema.org/Article">
<article itemprop="articleBody" id="pytorch-article" class="pytorch-article">
<section id="pytorch-contribution-guide">
<h1>PyTorch Contribution Guide<a class="headerlink" href="#pytorch-contribution-guide" title="Permalink to this heading">¶</a></h1>
<p>PyTorch is a GPU-accelerated Python tensor computation package for
building deep neural networks using a on tape-based autograd systems.</p>
<section id="contribution-process">
<h2>Contribution Process<a class="headerlink" href="#contribution-process" title="Permalink to this heading">¶</a></h2>
<p>The PyTorch organization is governed by <a class="reference internal" href="governance.html"><span class="doc">PyTorch
Governance</span></a> and the technical guide to contributing
can be found in <a class="reference external" href="https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a>.</p>
<p>The PyTorch development process involves a healthy amount of open
discussions between the core development team and the community.</p>
<p>PyTorch operates similarly to most open source projects on GitHub.
However, if you’ve never contributed to an open source project before,
here is the basic process.</p>
<ul class="simple">
<li><p><strong>Figure out what you’re going to work on.</strong> The majority of open
source contributions come from people scratching their own itches.
However, if you don’t know what you want to work on, or are just
looking to get more acquainted with the project, here are some tips
for how to find appropriate tasks:</p>
<ul>
<li><p>Look through the <a class="reference external" href="https://github.com/pytorch/pytorch/issues/">issue
tracker</a> and see if
there are any issues you know how to fix. Issues that are
confirmed by other contributors tend to be better to investigate.
We also maintain some labels for issues that are likely to be
good for new people, e.g., <strong>bootcamp</strong> and <strong>1hr</strong>, although
these labels are less well maintained.</p></li>
<li><p>Join us on <a class="reference external" href="https://dev-discuss.pytorch.org/">dev discuss</a>
and let us know you’re interested in getting to
know PyTorch. We’re very happy to help out researchers and
partners get up to speed with the codebase.</p></li>
</ul>
</li>
<li><p><strong>Figure out the scope of your change and reach out for design
comments on a GitHub issue if it’s large.</strong> The majority of pull
requests are small; in that case, no need to let us know about what
you want to do, just get cracking. But if the change is going to be
large, it’s usually a good idea to get some design comments about it
first by <a class="reference external" href="https://github.com/pytorch/rfcs/blob/master/README.md">submitting an RFC</a>.</p>
<ul>
<li><p>If you don’t know how big a change is going to be, we can help you
figure it out! Just post about it on
<a class="reference external" href="https://github.com/pytorch/pytorch/issues/">issues</a> or
<a class="reference external" href="https://dev-discuss.pytorch.org/">dev discuss</a>.</p></li>
<li><p>Some feature additions are very standardized; for example, lots of
people add new operators or optimizers to PyTorch. Design
discussion in these cases boils down mostly to, “Do we want this
operator/optimizer?” Giving evidence for its utility, e.g., usage
in peer reviewed papers, or existence in other frameworks, helps a
bit when making this case.</p>
<ul>
<li><p><strong>Adding operators / algorithms from recently-released research</strong>
is generally not accepted unless there is overwhelming evidence that
this newly published work has ground-breaking results and will eventually
become a standard in the field. If you are not sure where your method falls,
open an issue first before implementing a PR.</p></li>
</ul>
</li>
<li><p>Core changes and refactors can be quite difficult to coordinate
since the pace of development on PyTorch master is quite fast.
Definitely reach out about fundamental or cross-cutting changes;
we can often give guidance about how to stage such changes into
more easily reviewable pieces.</p></li>
</ul>
</li>
<li><p><strong>Code it out!</strong></p>
<ul>
<li><p>See the <a class="reference external" href="https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a> file for advice for working with PyTorch in a
technical form.</p></li>
</ul>
</li>
<li><p><strong>Open a pull request.</strong></p>
<ul>
<li><p>If you are not ready for the pull request to be reviewed, create a draft
pull request first - you can later convert it to a full PR by pressing
“Ready for review” button. You can also prepend the title of the PR with
“[WIP]” (“work in progress”) while it’s still in draft. We will ignore
draft PRs when doing review passes. If you are working on a complex change,
it’s good to start things off as a draft, because you will need to spend
time looking at CI results to see if things worked out or not.</p></li>
<li><p>Find an appropriate reviewer for your change. We have some folks
who regularly go through the PR queue and try to review
everything, but if you happen to know who the maintainer for a
given subsystem affected by your patch is, feel free to include
them directly on the pull request. You can learn more about
<a class="reference external" href="https://pytorch.org/docs/master/community/persons_of_interest.html">Persons of Interest</a>
that could review your code.</p></li>
</ul>
</li>
<li><p><strong>Iterate on the pull request until it’s accepted!</strong></p>
<ul>
<li><p>We’ll try our best to minimize the number of review round trips and
block PRs only when there are major issues. For the most common
issues in pull requests, take a look at <a class="reference external" href="#common-mistakes-to-avoid">Common Mistakes</a>.</p></li>
<li><p>Once a pull request is accepted and CI is passing, there is
nothing else you need to do; we will merge the PR for you.</p></li>
</ul>
</li>
</ul>
</section>
<section id="getting-started">
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this heading">¶</a></h2>
<section id="proposing-new-features">
<h3>Proposing New Features<a class="headerlink" href="#proposing-new-features" title="Permalink to this heading">¶</a></h3>
<p>New feature ideas are best discussed on a specific issue. Please include
as much information as you can, any accompanying data, and your proposed
solution. The PyTorch team and community frequently review new issues
and comments where they think they can help. If you feel confident in
your solution, go ahead and implement it.</p>
</section>
<section id="reporting-issues">
<h3>Reporting Issues<a class="headerlink" href="#reporting-issues" title="Permalink to this heading">¶</a></h3>
<p>If you’ve identified an issue, first search through the <a class="reference external" href="https://github.com/pytorch/pytorch/issues">list of
existing issues</a> on the
repo. If you are unable to find a similar issue, then create a new one.
Supply as much information you can to reproduce the problematic
behavior. Also, include any additional insights like the behavior you
expect.</p>
</section>
<section id="implementing-features-or-fixing-bugs">
<h3>Implementing Features or Fixing Bugs<a class="headerlink" href="#implementing-features-or-fixing-bugs" title="Permalink to this heading">¶</a></h3>
<p>If you want to fix a specific issue, it’s best to comment on the
individual issue with your intent. However, we do not lock or assign
issues except in cases where we have worked with the developer before.
It’s best to strike up a conversation on the issue and discuss your
proposed solution. The PyTorch team can provide guidance that saves you
time.</p>
<p>Issues that are labeled first-new-issue, low, or medium priority provide
the best entrance point are great places to start.</p>
</section>
<section id="adding-tutorials">
<h3>Adding Tutorials<a class="headerlink" href="#adding-tutorials" title="Permalink to this heading">¶</a></h3>
<p>A great deal of the tutorials on <a class="reference external" href="https://pytorch.org/">pytorch.org</a>
come from the community itself and we welcome additional contributions.
To learn more about how to contribute a new tutorial you can learn more
here: <a class="reference external" href="https://github.com/pytorch/tutorials/#contributing">PyTorch.org Tutorial Contribution Guide on
GitHub</a></p>
</section>
<section id="improving-documentation-tutorials">
<h3>Improving Documentation & Tutorials<a class="headerlink" href="#improving-documentation-tutorials" title="Permalink to this heading">¶</a></h3>
<p>We aim to produce high quality documentation and tutorials. On rare
occasions that content includes typos or bugs. If you find something you
can fix, send us a pull request for consideration.</p>
<p>Take a look at the <a class="reference external" href="#on-documentation">Documentation</a> section to learn how our system
works.</p>
</section>
<section id="participating-in-online-discussions">
<h3>Participating in Online Discussions<a class="headerlink" href="#participating-in-online-discussions" title="Permalink to this heading">¶</a></h3>
<p>You can find active discussions happening on the <a class="reference external" href="https://discuss.pytorch.org/">PyTorch Discussion
Forums</a> for users as well as the
<a class="reference external" href="https://dev-discuss.pytorch.org/">PyTorch Dev Discussion Forums</a>
for developers and maintainers.</p>
</section>
<section id="submitting-pull-requests-to-fix-open-issues">
<h3>Submitting Pull Requests to Fix Open Issues<a class="headerlink" href="#submitting-pull-requests-to-fix-open-issues" title="Permalink to this heading">¶</a></h3>
<p>You can view a list of all open issues
<a class="reference external" href="https://github.com/pytorch/pytorch/issues">here</a>. Commenting on an
issue is a great way to get the attention of the team. From here you can
share your ideas and how you plan to resolve the issue.</p>
<p>For more challenging issues, the team will provide feedback and
direction for how to best solve the issue.</p>
<p>If you’re not able to fix the issue yourself, commenting and sharing
whether you can reproduce the issue can help the team
identify problem areas.</p>
</section>
<section id="reviewing-open-pull-requests">
<h3>Reviewing Open Pull Requests<a class="headerlink" href="#reviewing-open-pull-requests" title="Permalink to this heading">¶</a></h3>
<p>We appreciate your help reviewing and commenting on pull requests. Our
team strives to keep the number of open pull requests at a manageable
size, we respond quickly for more information if we need it, and we
merge PRs that we think are useful. However, due to the high level of
interest, additional eyes on the pull requests are always appreciated.</p>
</section>
<section id="improving-code-readability">
<h3>Improving Code Readability<a class="headerlink" href="#improving-code-readability" title="Permalink to this heading">¶</a></h3>
<p>Improving code readability helps everyone. It is often better to submit a
small number of pull requests that touch a few files versus a large pull
request that touches many files. Starting a discussion in the PyTorch
forum <a class="reference external" href="https://discuss.pytorch.org/">here</a> or on an issue related to
your improvement is the best way to get started.</p>
</section>
<section id="adding-test-cases-to-make-the-codebase-more-robust">
<h3>Adding Test Cases to Make the Codebase More Robust<a class="headerlink" href="#adding-test-cases-to-make-the-codebase-more-robust" title="Permalink to this heading">¶</a></h3>
<p>Additional test coverage is appreciated.</p>
</section>
<section id="promoting-pytorch">
<h3>Promoting PyTorch<a class="headerlink" href="#promoting-pytorch" title="Permalink to this heading">¶</a></h3>
<p>Your use of PyTorch in your projects, research papers, write ups, blogs,
or general discussions around the internet helps to raise awareness for
PyTorch and our growing community. Please reach out to
<a class="reference external" href="mailto:marketing%40pytorch.org">marketing<span>@</span>pytorch<span>.</span>org</a>
for marketing support.</p>
</section>
<section id="triaging-issues">
<h3>Triaging Issues<a class="headerlink" href="#triaging-issues" title="Permalink to this heading">¶</a></h3>
<p>If you feel that an issue could benefit from a particular tag or level
of complexity, comment on the issue and share your opinion. If you
feel an issue isn’t categorized properly, comment and let the team know.</p>
</section>
</section>
<section id="about-open-source-development">
<h2>About Open Source Development<a class="headerlink" href="#about-open-source-development" title="Permalink to this heading">¶</a></h2>
<p>If this is your first time contributing to an open source project, some
aspects of the development process may seem unusual to you.</p>
<ul class="simple">
<li><p><strong>There is no way to “claim” issues.</strong> People often want to “claim”
an issue when they decide to work on it, to ensure that there isn’t
wasted work when someone else ends up working on it. This doesn’t
really work too well in open source, since someone may decide to work
on something, and end up not having time to do it. Feel free to give
information in an advisory fashion, but at the end of the day, we
will take running code and rough consensus to move forward quickly.</p></li>
<li><p><strong>There is a high bar for new functionality.</strong> Unlike
in a corporate environment, where the person who wrote code
implicitly “owns” it and can be expected to take care of it for the
code’s lifetime, once a pull request is merged into an open
source project, it immediately becomes the collective responsibility
of all maintainers on the project. When we merge code, we are saying
that we, the maintainers, can review subsequent changes and
make a bugfix to the code. This naturally leads to a higher standard
of contribution.</p></li>
</ul>
</section>
<section id="common-mistakes-to-avoid">
<h2>Common Mistakes To Avoid<a class="headerlink" href="#common-mistakes-to-avoid" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p><strong>Did you add tests?</strong> (Or if the change is hard to test, did you
describe how you tested your change?)</p>
<ul>
<li><p>We have a few motivations for why we ask for tests:</p>
<ol class="arabic simple">
<li><p>to help us tell if we break it later</p></li>
<li><p>to help us tell if the patch is correct in the first place
(yes, we did review it, but as Knuth says, “beware of the
following code, for I have not run it, merely proven it
correct”)</p></li>
</ol>
</li>
<li><p>When is it OK not to add a test? Sometimes a change can’t be
conveniently tested, or the change is so obviously correct (and
unlikely to be broken) that it’s OK not to test it. On the
contrary, if a change seems likely (or is known to be likely)
to be accidentally broken, it’s important to put in the time to
work out a testing strategy.</p></li>
</ul>
</li>
<li><p><strong>Is your PR too long?</strong></p>
<ul>
<li><p>It’s easier for us to review and merge small PRs. The difficulty of
reviewing a PR scales nonlinearly with its size.</p></li>
<li><p>When is it OK to submit a large PR? It helps a lot if there was a
corresponding design discussion in an issue, with sign off from
the people who are going to review your diff. We can also help
give advice about how to split up a large change into individually
shippable parts. Similarly, it helps if there is a complete
description of the contents of the PR: it’s easier to review code
if we know what’s inside!</p></li>
</ul>
</li>
<li><p><strong>Comments for subtle things?</strong> In cases where the behavior of your code
is nuanced, please include extra comments and documentation to allow
us to better understand the intention of your code.</p></li>
<li><p><strong>Did you add a hack?</strong> Sometimes, the right answer is a hack. But
usually, we will have to discuss it.</p></li>
<li><p><strong>Do you want to touch a very core component?</strong> To prevent
major regressions, pull requests that touch core components receive
extra scrutiny. Make sure you’ve discussed your changes with the team
before undertaking major changes.</p></li>
<li><p><strong>Want to add a new feature?</strong> If you want to add new features,
comment your intention on the related issue. Our team tries to
comment on and provide feedback to the community. It’s better to have
an open discussion with the team and the rest of the community before
building new features. This helps us stay aware of what you’re
working on and increases the chance that it’ll be merged.</p></li>
<li><p><strong>Did you touch code unrelated to the PR?</strong> To aid in code review,
please only include files in your pull request that are directly
related to your changes.</p></li>
</ul>
</section>
<section id="frequently-asked-questions">
<h2>Frequently Asked Questions<a class="headerlink" href="#frequently-asked-questions" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p><strong>How can I contribute as a reviewer?</strong> There is lots of value if
community developers reproduce issues, try out new functionality, or
otherwise help us identify or troubleshoot issues. Commenting on
tasks or pull requests with your environment details is helpful and
appreciated.</p></li>
<li><p><strong>CI tests failed, what does it mean?</strong> Maybe your PR is based
off a broken master? You can try to rebase your change on top
of the latest master. You can also see the current status of
master’s CI at <a class="reference external" href="https://hud.pytorch.org/">https://hud.pytorch.org/</a>.</p></li>
<li><p><strong>What are the most high risk changes?</strong> Anything that touches build
configuration is a risky area. Please avoid changing these unless
you’ve had a discussion with the team beforehand.</p></li>
<li><p><strong>Hey, a commit showed up on my branch, what’s up with that?</strong>
Sometimes another community member will provide a patch or fix to
your pull request or branch. This is often needed for getting CI tests
to pass.</p></li>
</ul>
</section>
<section id="on-documentation">
<h2>On Documentation<a class="headerlink" href="#on-documentation" title="Permalink to this heading">¶</a></h2>
<section id="python-docs">
<h3>Python Docs<a class="headerlink" href="#python-docs" title="Permalink to this heading">¶</a></h3>
<p>PyTorch documentation is generated from python source using
<a class="reference external" href="https://www.sphinx-doc.org/en/master/">Sphinx</a>. Generated HTML is
copied to the docs folder in the master branch of
<a class="reference external" href="https://github.com/pytorch/pytorch.github.io/tree/master/docs">pytorch.github.io</a>,
and is served via GitHub pages.</p>
<ul class="simple">
<li><p>Site: <a class="reference external" href="https://pytorch.org/docs">https://pytorch.org/docs</a></p></li>
<li><p>GitHub: <a class="reference external" href="https://github.com/pytorch/pytorch/tree/master/docs">https://github.com/pytorch/pytorch/tree/master/docs</a></p></li>
<li><p>Served from:
<a class="reference external" href="https://github.com/pytorch/pytorch.github.io/tree/master/docs">https://github.com/pytorch/pytorch.github.io/tree/master/doc</a></p></li>
</ul>
</section>
<section id="c-docs">
<h3>C++ Docs<a class="headerlink" href="#c-docs" title="Permalink to this heading">¶</a></h3>
<p>For C++ code we use Doxygen to generate the content files. The C++ docs
are built on a special server and the resulting files are copied to the
<a class="reference external" href="https://github.com/pytorch/cppdocs">https://github.com/pytorch/cppdocs</a> repo, and are served from GitHub
pages.</p>
<ul class="simple">
<li><p>Site: <a class="reference external" href="https://pytorch.org/cppdocs">https://pytorch.org/cppdocs</a></p></li>
<li><p>GitHub: <a class="reference external" href="https://github.com/pytorch/pytorch/tree/master/docs/cpp">https://github.com/pytorch/pytorch/tree/master/docs/cpp</a></p></li>
<li><p>Served from: <a class="reference external" href="https://github.com/pytorch/cppdocs">https://github.com/pytorch/cppdocs</a></p></li>
</ul>
</section>
</section>
<section id="tutorials">
<h2>Tutorials<a class="headerlink" href="#tutorials" title="Permalink to this heading">¶</a></h2>
<p>PyTorch tutorials are documents used to help understand using PyTorch to
accomplish specific tasks or to understand more holistic concepts.
Tutorials are built using
<a class="reference external" href="https://sphinx-gallery.readthedocs.io/en/latest/index.html">Sphinx-Gallery</a>
from executable python source files, or from restructured-text (rst)
files.</p>
<ul class="simple">
<li><p>Site: <a class="reference external" href="https://pytorch.org/tutorials">https://pytorch.org/tutorials</a></p></li>
<li><p>GitHub: <a class="reference external" href="https://github.com/pytorch/tutorials">https://github.com/pytorch/tutorials</a></p></li>
</ul>
<section id="tutorials-build-overview">
<h3>Tutorials Build Overview<a class="headerlink" href="#tutorials-build-overview" title="Permalink to this heading">¶</a></h3>
<p>For tutorials, <a class="reference external" href="https://github.com/pytorch/tutorials/pulls">pull
requests</a> trigger a
rebuild of the entire site using CircleCI to test the effects of the
change. This build is sharded into 9 worker builds and takes around 40
minutes total. At the same time, we do a Netlify build using <em>make
html-noplot</em>, which builds the site without rendering the notebook
output into pages for quick review.</p>
<p>After a PR is accepted, the site is rebuilt and deployed using GitHub
Actions.</p>
</section>
<section id="contributing-a-new-tutorial">
<h3>Contributing a New Tutorial<a class="headerlink" href="#contributing-a-new-tutorial" title="Permalink to this heading">¶</a></h3>
<p>See <a class="reference external" href="https://github.com/pytorch/tutorials/#contributing">PyTorch.org Tutorial Contribution
Guide</a>.</p>
</section>
</section>
</section>
</article>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="design.html" class="btn btn-neutral float-right" title="PyTorch Design Philosophy" accesskey="n" rel="next">Next <img src="../_static/images/chevron-right-orange.svg" class="next-page"></a>
<a href="build_ci_governance.html" class="btn btn-neutral" title="PyTorch Governance | Build + CI" accesskey="p" rel="prev"><img src="../_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
</div>
<hr>
<div role="contentinfo">
<p>
© Copyright 2023, PyTorch Contributors.
</p>
</div>
<div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</div>
</footer>
</div>
<script>
var match = window.location.href.match(/\/_[a-zA-Z0-9_]*.html|_dynamo/gi);
var url = window.location.href.lastIndexOf(match[match.length-1]);
if (url)
{
var div = '<div class="admonition note"><p class="admonition-title">Note</p><p><i class="fa fa-exclamation-circle" aria-hidden="true"> </i> This page describes an internal API which is not intended to be used outside of the PyTorch codebase and can be modified or removed without notice.</p></div>'
document.getElementById("pytorch-article").insertAdjacentHTML('afterBegin', div)
}
</script>
</div>
<div class="pytorch-content-right" id="pytorch-content-right">
<div class="pytorch-right-menu" id="pytorch-right-menu">
<div class="pytorch-side-scroll" id="pytorch-side-scroll-right">
<ul>
<li><a class="reference internal" href="#">PyTorch Contribution Guide</a><ul>
<li><a class="reference internal" href="#contribution-process">Contribution Process</a></li>
<li><a class="reference internal" href="#getting-started">Getting Started</a><ul>
<li><a class="reference internal" href="#proposing-new-features">Proposing New Features</a></li>
<li><a class="reference internal" href="#reporting-issues">Reporting Issues</a></li>
<li><a class="reference internal" href="#implementing-features-or-fixing-bugs">Implementing Features or Fixing Bugs</a></li>
<li><a class="reference internal" href="#adding-tutorials">Adding Tutorials</a></li>
<li><a class="reference internal" href="#improving-documentation-tutorials">Improving Documentation & Tutorials</a></li>
<li><a class="reference internal" href="#participating-in-online-discussions">Participating in Online Discussions</a></li>
<li><a class="reference internal" href="#submitting-pull-requests-to-fix-open-issues">Submitting Pull Requests to Fix Open Issues</a></li>
<li><a class="reference internal" href="#reviewing-open-pull-requests">Reviewing Open Pull Requests</a></li>
<li><a class="reference internal" href="#improving-code-readability">Improving Code Readability</a></li>
<li><a class="reference internal" href="#adding-test-cases-to-make-the-codebase-more-robust">Adding Test Cases to Make the Codebase More Robust</a></li>
<li><a class="reference internal" href="#promoting-pytorch">Promoting PyTorch</a></li>
<li><a class="reference internal" href="#triaging-issues">Triaging Issues</a></li>
</ul>
</li>
<li><a class="reference internal" href="#about-open-source-development">About Open Source Development</a></li>
<li><a class="reference internal" href="#common-mistakes-to-avoid">Common Mistakes To Avoid</a></li>
<li><a class="reference internal" href="#frequently-asked-questions">Frequently Asked Questions</a></li>
<li><a class="reference internal" href="#on-documentation">On Documentation</a><ul>
<li><a class="reference internal" href="#python-docs">Python Docs</a></li>
<li><a class="reference internal" href="#c-docs">C++ Docs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#tutorials">Tutorials</a><ul>
<li><a class="reference internal" href="#tutorials-build-overview">Tutorials Build Overview</a></li>
<li><a class="reference internal" href="#contributing-a-new-tutorial">Contributing a New Tutorial</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script>
<script type="text/javascript" src="../_static/js/vendor/popper.min.js"></script>
<script type="text/javascript" src="../_static/js/vendor/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script script type="text/javascript">
var collapsedSections = ['Developer Notes', 'Language Bindings', 'Libraries', 'Community'];
</script>
<img height="1" width="1" style="border-style:none;" alt="" src="https://www.googleadservices.com/pagead/conversion/795629140/?label=txkmCPmdtosBENSssfsC&guid=ON&script=0"/>
<!-- Begin Footer -->
<div class="container-fluid docs-tutorials-resources" id="docs-tutorials-resources">
<div class="container">
<div class="row">
<div class="col-md-4 text-center">
<h2>Docs</h2>
<p>Access comprehensive developer documentation for PyTorch</p>
<a class="with-right-arrow" href="https://pytorch.org/docs/stable/index.html">View Docs</a>
</div>
<div class="col-md-4 text-center">
<h2>Tutorials</h2>
<p>Get in-depth tutorials for beginners and advanced developers</p>
<a class="with-right-arrow" href="https://pytorch.org/tutorials">View Tutorials</a>
</div>
<div class="col-md-4 text-center">
<h2>Resources</h2>
<p>Find development resources and get your questions answered</p>
<a class="with-right-arrow" href="https://pytorch.org/resources">View Resources</a>
</div>
</div>
</div>
</div>
<footer class="site-footer">
<div class="container footer-container">
<div class="footer-logo-wrapper">
<a href="https://pytorch.org/" class="footer-logo"></a>
</div>
<div class="footer-links-wrapper">
<div class="footer-links-col">
<ul>
<li class="list-title"><a href="https://pytorch.org/">PyTorch</a></li>
<li><a href="https://pytorch.org/get-started">Get Started</a></li>
<li><a href="https://pytorch.org/features">Features</a></li>
<li><a href="https://pytorch.org/ecosystem">Ecosystem</a></li>
<li><a href="https://pytorch.org/blog/">Blog</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md">Contributing</a></li>
</ul>
</div>
<div class="footer-links-col">
<ul>
<li class="list-title"><a href="https://pytorch.org/resources">Resources</a></li>
<li><a href="https://pytorch.org/tutorials">Tutorials</a></li>
<li><a href="https://pytorch.org/docs/stable/index.html">Docs</a></li>
<li><a href="https://discuss.pytorch.org" target="_blank">Discuss</a></li>
<li><a href="https://github.com/pytorch/pytorch/issues" target="_blank">Github Issues</a></li>
<li><a href="https://pytorch.org/assets/brand-guidelines/PyTorch-Brand-Guidelines.pdf" target="_blank">Brand Guidelines</a></li>