MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / _load_module

Function _load_module

etc/scripts/numba_wrapper.py:94–99  ·  view source on GitHub ↗
(*, path: str, name: str = "example")

Source from the content-addressed store, hash-verified

92
93
94def _load_module(*, path: str, name: str = "example") -> ModuleType:
95 spec = importlib.util.spec_from_file_location(name, path)
96 assert spec is not None and spec.loader is not None # for static type checkers
97 module = importlib.util.module_from_spec(spec)
98 spec.loader.exec_module(module)
99 return module
100
101
102@contextlib.contextmanager

Callers 1

_write_module_asmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected