mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: This pr add a _is_script_object method to differentiate scriptModule and scriptObject, where the formal inherits from ScriptObject in C++ so they both passes the isinstance(obj, torch.ScriptObject) check. The qualified name of ScriptObject (i.e. custom class) would starts with "__torch__.torch.classes", this has been a widely used assumption for dealing with custom class across our code base. Test Plan: Add new test. Differential Revision: D69685316 Pull Request resolved: https://github.com/pytorch/pytorch/pull/147399 Approved by: https://github.com/yushangdi |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| autograd.py | ||
| custom_ops.py | ||
| fake_class_registry.py | ||
| fake_impl.py | ||
| infer_schema.py | ||
| simple_registry.py | ||
| triton.py | ||
| utils.py | ||