-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Description
This function is used for the CAReduce
pytensor/pytensor/compile/mode.py
Lines 589 to 611 in d057453
| def get_target_language(mode=None) -> tuple[Literal["py", "c", "numba", "jax"], ...]: | |
| """Get the compilation target language.""" | |
| if mode is None: | |
| mode = get_default_mode() | |
| linker = mode.linker | |
| if isinstance(linker, NumbaLinker): | |
| return ("numba",) | |
| if isinstance(linker, JAXLinker): | |
| return ("jax",) | |
| if isinstance(linker, PerformLinker): | |
| return ("py",) | |
| if isinstance(linker, CLinker): | |
| return ("c",) | |
| if isinstance(linker, MLXLinker): | |
| return ("py",) | |
| if isinstance(linker, VMLinker | OpWiseCLinker): | |
| return ("c", "py") if config.cxx else ("py",) | |
| raise Exception(f"Unsupported Linker: {linker}") |
Metadata
Metadata
Assignees
Labels
No labels