123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import modelverse_kernel.primitives as primitive_functions
- class JitCompilationFailedException(Exception):
- """A type of exception that is raised when the jit fails to compile a function."""
- pass
- MUTABLE_FUNCTION_KEY = "mutable"
- """A dictionary key for functions that are mutable."""
- FUNCTION_BODY_KEY = "body"
- """A dictionary key for function bodies."""
- KWARGS_PARAMETER_NAME = "kwargs"
- """The name of the kwargs parameter in jitted functions."""
- CALL_FUNCTION_NAME = "__call_function"
- """The name of the '__call_function' function, in the jitted function scope."""
- GET_INPUT_FUNCTION_NAME = "__get_input"
- """The name of the '__get_input' function, in the jitted function scope."""
- JIT_THUNK_CONSTANT_FUNCTION_NAME = "__jit_thunk_constant_function"
- """The name of the jit_thunk_constant_function function in the JIT's global context."""
- JIT_THUNK_GLOBAL_FUNCTION_NAME = "__jit_thunk_global"
- """The name of the jit_thunk_global function in the JIT's global context."""
- JIT_REJIT_FUNCTION_NAME = "__jit_rejit"
- """The name of the rejit function in the JIT's global context."""
- JIT_COMPILE_FUNCTION_BODY_FAST_FUNCTION_NAME = "__jit_compile_function_body_fast"
- """The name of the compile_function_body_fast function in the JIT's global context."""
- UNREACHABLE_FUNCTION_NAME = "__unreachable"
- """The name of the unreachable function in the JIT's global context."""
- LOCALS_NODE_NAME = "jit_locals"
- """The name of the node that is connected to all JIT locals in a given function call."""
- LOCALS_EDGE_NAME = "jit_locals_edge"
- """The name of the edge that connects the LOCALS_NODE_NAME node to a user root."""
- GLOBAL_NOT_FOUND_MESSAGE_FORMAT = "Not found as global: %s"
- """The format of the 'not found as global' message. Takes a single argument."""
- BYTECODE_INTERPRETER_ORIGIN_NAME = "bytecode-interpreter"
- """The origin name for functions that were produced by the bytecode interpreter."""
- BASELINE_JIT_ORIGIN_NAME = "baseline-jit"
- """The origin name for functions that were produced by the baseline JIT."""
- FAST_JIT_ORIGIN_NAME = "fast-jit"
- """The origin name for functions that were produced by the fast JIT."""
|