Skip to content

Commit a80c67c

Browse files
committed
Move developer guide file to a folder
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:
1 parent 582b6d4 commit a80c67c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tutorials/developer_api_guide.py renamed to tutorials/developer_api_guide/my_dtype_tensor_subclass.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
# Following is a example for a simple dtype implemented with tensor subclass
2-
# it shows
3-
# * the basic structure of a new dtype tensor subclass (__new__, __init__, __tensor_flatten__, __tensor_unflatten__)
4-
# * two types of dispatch that people can overwrite (__torch_function__, __torch_dispatch__)
5-
# * how to abstract away packing format with layout
6-
# * how the tensor subclass composes with torch.compile to get speedup
1+
"""
2+
Following is a example for a simple dtype implemented with tensor subclass
3+
it shows
4+
* the basic structure of a new dtype tensor subclass (__new__, __init__, __tensor_flatten__, __tensor_unflatten__)
5+
* two types of dispatch that people can overwrite (__torch_function__, __torch_dispatch__)
6+
* how to abstract away packing format with layout
7+
* how the tensor subclass composes with torch.compile to get speedup
8+
"""
79

810

911
import functools

0 commit comments

Comments
 (0)