Searched refs:cpp_module (Results 1 – 11 of 11) sorted by relevance
/aosp_15_r20/external/pytorch/torch/nn/ |
H A D | cpp.py | 17 def __init__(self, cpp_module, attr): argument 18 self.cpp_module = cpp_module 23 return getattr(self.cpp_module, self.attr) 53 def __init__(self, cpp_module): argument 56 self.cpp_module = cpp_module 58 self._parameters = OrderedDictWrapper(cpp_module, "_parameters") # type: ignore[assignment] 59 …self._buffers: OrderedDictWrapper = OrderedDictWrapper(cpp_module, "_buffers") # type: ignore[ass… 60 …self._modules: OrderedDictWrapper = OrderedDictWrapper(cpp_module, "_modules") # type: ignore[ass… 61 for attr in dir(cpp_module): 64 setattr(self, attr, getattr(self.cpp_module, attr)) [all …]
|
/aosp_15_r20/external/pytorch/torch/jit/ |
H A D | _recursive.py | 569 cpp_module = torch._C._create_module_with_type(concrete_type.jit_type) 589 cpp_module.setattr(name, orig_value) 610 cpp_module.setattr(name, scripted) 630 script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn) 640 torch._C._run_emit_module_hook(cpp_module) 655 and "__len__" not in cpp_module._method_names() 660 and "__contains__" not in cpp_module._method_names() 682 script_method = cpp_module._get_method(name) 699 fget = cpp_module._get_method(property_stub.def_.getter_name().name) 702 fset = cpp_module._get_method(setter_name.name) if setter_name else None [all …]
|
H A D | _script.py | 390 cpp_module = torch._C._import_ir_module_from_package( 397 return wrap_cpp_module(cpp_module) 625 def __init__(self, cpp_module): argument 627 self._c = cpp_module 635 def _construct(cpp_module, init_fn): argument 649 script_module = RecursiveScriptModule(cpp_module) 670 def _reconstruct(self, cpp_module): argument 677 self.__init__(cpp_module) # type: ignore[misc] 686 for name, cpp_module in torch._C.ModuleDict(self._c).items(): 687 modules[name] = wrap_cpp_module(cpp_module)
|
H A D | _serialization.py | 163 …cpp_module = torch._C.import_ir_module(cu, os.fspath(f), map_location, _extra_files, _restore_shap… 165 cpp_module = torch._C.import_ir_module_from_buffer( 170 ret = wrap_cpp_module(cpp_module)
|
H A D | _script.pyi | 148 def __init__(self, cpp_module) -> None: ... 150 def _construct(cpp_module, init_fn): ... 158 def _reconstruct(self, cpp_module) -> None: ...
|
H A D | _trace.py | 1429 def _reconstruct(self, cpp_module): argument 1436 self.__dict__["_actual_script_module"]._reconstruct(cpp_module)
|
/aosp_15_r20/external/pytorch/torch/jit/mobile/ |
H A D | __init__.py | 47 cpp_module = torch._C._load_for_lite_interpreter(os.fspath(f), map_location) 49 cpp_module = torch._C._load_for_lite_interpreter_from_buffer( 53 return LiteScriptModule(cpp_module) 57 def __init__(self, cpp_module): argument 58 self._c = cpp_module
|
/aosp_15_r20/external/pytorch/torch/csrc/api/include/torch/ |
H A D | python.h | 57 py::object cpp_module = in bind_cpp_module_wrapper() local 80 type_metaclass(name_str, py::make_tuple(cpp_module), attributes); in bind_cpp_module_wrapper() 85 [cpp_module, cpp_class]( in bind_cpp_module_wrapper() 87 cpp_module.attr("__init__")(self, cpp_class(*args, **kwargs)); in bind_cpp_module_wrapper()
|
/aosp_15_r20/external/pytorch/test/cpp_api_parity/ |
H A D | utils.py | 131 cpp_module = torch.utils.cpp_extension.load_inline( 140 return cpp_module
|
H A D | functional_impl_check.py | 307 cpp_module = compile_cpp_code_inline( 310 unit_test_class.functional_impl_check_cpp_module = cpp_module
|
H A D | module_impl_check.py | 378 cpp_module = compile_cpp_code_inline( 381 unit_test_class.module_impl_check_cpp_module = cpp_module
|