mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
This PR only adds abstract class registration logic without touching existing tests so they still trace with real script object. The added tests are only for registration APIs and test error messages. Our design is that the abstract implementation should be in Python. This is much better in terms of usability. But this also has implications for custom op that takes script object as input, which is detailed later in this stack. Pull Request resolved: https://github.com/pytorch/pytorch/pull/122622 Approved by: https://github.com/zou3519 ghstack dependencies: #122619, #122620, #122621
6 lines
170 B
Python
6 lines
170 B
Python
import torch._library.abstract_impl
|
|
import torch._library.simple_registry
|
|
import torch._library.utils
|
|
|
|
from torch._library.fake_class_registry import register_fake_class
|