Dialect loader
dialect_loader
¶
IRDLDialectLoader
¶
Bases: Loader
Custom module loader for IRDL files.
When loading an irdl file as a module: - parse the dialect - generate its PyRDL implementation - generate type stubs for its implmentation and write to disk - populate the Python module
Source code in xdsl/utils/dialect_loader.py
module_name: str = module_name
instance-attribute
¶
path: str = path
instance-attribute
¶
get_all_dialects: Callable[[], dict[str, Callable[[], Dialect]]] = get_all_dialects
instance-attribute
¶
__init__(module_name: str, path: str, get_all_dialects: Callable[[], dict[str, Callable[[], Dialect]]])
¶
exec_module(module: ModuleType)
¶
Source code in xdsl/utils/dialect_loader.py
IRDLDialectFinder
¶
Bases: MetaPathFinder
Custom module finder for IRDL files.
Look for a