Skip to content

Commit

Permalink
Move developer guide file to a folder (#681)
Browse files Browse the repository at this point in the history
Summary:
Moved the dev api guide to a folder and we plan to add more developer guide examples
e.g.
```
developer_api_guide/training.py - how to make a tensor subclass trainable
developer_api_guide/fsdp.py - how to make a tensor subclass work with fsdp
developer_api_guide/tensor_parallel.py - how to make a tensor subclass work with tensor parallelism
developer_api_guide/autoquant.py - how to make a tensor subclass work with autoquant
...
```

Test Plan:
python test/tutorials/developer_api_guide/my_dtype_tensor_subclass.py

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
jerryzh168 authored Aug 15, 2024
1 parent 1acd710 commit 5998389
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Following is a example for a simple dtype implemented with tensor subclass
# it shows
# * the basic structure of a new dtype tensor subclass (__new__, __init__, __tensor_flatten__, __tensor_unflatten__)
# * two types of dispatch that people can overwrite (__torch_function__, __torch_dispatch__)
# * how to abstract away packing format with layout
# * how the tensor subclass composes with torch.compile to get speedup
"""
Following is a example for a simple dtype implemented with tensor subclass
it shows
* the basic structure of a new dtype tensor subclass (__new__, __init__, __tensor_flatten__, __tensor_unflatten__)
* two types of dispatch that people can overwrite (__torch_function__, __torch_dispatch__)
* how to abstract away packing format with layout
* how the tensor subclass composes with torch.compile to get speedup
"""


import functools
Expand Down

0 comments on commit 5998389

Please sign in to comment.