Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PyTorch Basics

Zain Rizvi edited this pageMay 1, 2025 ·22 revisions

Development Setup

Please seeDeveloper Environment Setup

For fb employees, please read throughthis as well.

Learn about how to use PyTorch

Run through thePyTorch Basics tutorial

If you're not familiar with machine learning,here is a nice lecture series.

Understand how PyTorch is used in the open-source community

Explore popular open-source models and frameworks using PyTorch

Workflow tips and tricks

Build only what you need

If you don't need CUDA, build usingUSE_CUDA=0: the build is significantly faster. There are also a lot of other build flags that help get rid of components that you might not work on. Below is an opinionated build command that gets rid of a lot of different options that don't get used very often.

USE_KINETO=0 BUILD_CAFFE2=0 USE_DISTRIBUTED=0 USE_NCCL=0 BUILD_TEST=0 USE_XNNPACK=0 USE_FBGEMM=0 USE_QNNPACK=0 USE_MKLDNN=0 USE_MIOPEN=0 USE_NNPACK=0 BUILD_CAFFE2_OPS=0 USE_TENSORPIPE=0 python setup.py develop

(Seethis for more details)

Use viable/strict

The head of the pytorch/pytorch main branch may have test failures (see here for the current state). When developing PyTorch, instead of branching off ofmain, you can branch off ofviable/strict.viable/strict is a branch that lags behind main and guarantees that all PyTorch tests are passing on the branch. Basing your work off ofviable/strict gives you confidence that any test failures are actually your code's fault.

Some quick git tips on maintaining feature branches:

# These tips assume upstream points to pytorch/pytorch. # (Some people develop with origin pointing to pytorch/pytorch.)# Create a new branch from upstream/viable/strictgit fetch upstream viable/strictgit checkout -b my_new_feature upstream/viable/strictgit push -u origin my_new_feature# Rebase work on a branch to appear on top of viable/strictgit pull --rebase upstream viable/strict# Delete a branchgit checkout maingit branch -D my_new_featuregit push --delete origin my_new_feature

For more details

See this detailed section in ourCONTRIBUTING.MD

Submitting a change to PyTorch

Please seehttps://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md andthe GitHub First user guide.

Next

Unit 2: Tensors, Operators, and Testing -Tensor and Operator Basics

I would love to contribute to PyTorch!

Clone this wiki locally


[8]ページ先頭

©2009-2026 Movatter.jp