{"record":{"id":"be22bb1226f9d807","repo":"invoke-ai/InvokeAI","slug":"level-zero-loader-is-missing-name","errorCode":null,"errorMessage":"Level Zero loader is missing {name}","messagePattern":"Level Zero loader is missing (.+?)","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/util/level_zero.py","lineNumber":123,"sourceCode":"    u32_p = ctypes.POINTER(ctypes.c_uint32)\n    handle = ctypes.c_void_p\n    handle_p = ctypes.POINTER(ctypes.c_void_p)\n\n    prototypes = {\n        \"zeInit\": ([u32], ctypes.c_int),\n        \"zeDriverGet\": ([u32_p, handle_p], ctypes.c_int),\n        \"zeDeviceGet\": ([handle, u32_p, handle_p], ctypes.c_int),\n        \"zeDeviceGetProperties\": ([handle, ctypes.c_void_p], ctypes.c_int),\n        \"zesInit\": ([u32], ctypes.c_int),\n        \"zesDriverGet\": ([u32_p, handle_p], ctypes.c_int),\n        \"zesDeviceGet\": ([handle, u32_p, handle_p], ctypes.c_int),\n        \"zesDeviceEnumMemoryModules\": ([handle, u32_p, handle_p], ctypes.c_int),\n        \"zesMemoryGetState\": ([handle, ctypes.c_void_p], ctypes.c_int),\n    }\n    for name, (argtypes, restype) in prototypes.items():\n        fn = getattr(lib, name, None)\n        if fn is None:\n            raise AttributeError(f\"Level Zero loader is missing {name}\")\n        fn.argtypes = argtypes\n        fn.restype = restype\n\n\n@functools.lru_cache(maxsize=1)\ndef _load_loader() -> Optional[ctypes.CDLL]:\n    \"\"\"Open the Level Zero loader once per process.\n\n    Cached because both probes need it and ``ctypes.util.find_library`` is expensive on Linux\n    (it shells out to ``ldconfig``, falling back to the compiler), and because configuring the\n    prototypes twice would leave two handles whose argtypes have to be kept in step by hand.\n    \"\"\"\n    for name in _LOADER_NAMES:\n        path = ctypes.util.find_library(name) or name\n        try:\n            lib = ctypes.CDLL(path)\n        except OSError:\n            continue","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/util/level_zero.py#L105-L141","documentation":"InvokeAI's Level Zero (Intel GPU) sysman integration configures ctypes prototypes for required symbols from the ze_loader library. If a required function (e.g. zesDeviceEnumMemoryModules) is absent from the loaded shared library, it raises AttributeError, meaning the installed Level Zero loader is too old or incomplete for the probed sysman API.","triggerScenarios":"Running on a system where libze_loader exists but lacks one of the required zes* symbols; an outdated intel-level-zero-gpu / level-zero runtime; a stub loader shipped by an old driver.","commonSituations":"Intel Arc / integrated GPU users with old GPU drivers; mismatched level-zero runtime versions; minimal Docker images missing the full Level Zero loader.","solutions":["Update Intel GPU drivers and the Level Zero loader (intel-level-zero-gpu, level-zero packages) to a current version","Verify with `nm -D libze_loader.so` that the missing zes* symbol is exported","Disable the Level Zero/intel sysman detection path in InvokeAI if you are not using Intel GPU health probing"],"exampleFix":"// before (Ubuntu)\napt install level-zero  # old, missing zesMemoryGetState\n// after\napt install intel-level-zero-gpu level-zero && update driver to latest Intel GPU release","handlingStrategy":"try-catch","validationCode":"import ctypes\ntry:\n    lib = ctypes.CDLL(\"libze_loader.so.1\")\n    ok = all(hasattr(lib, s) for s in [\"zesDeviceEnumMemoryModules\", \"zesMemoryGetState\"])\nexcept OSError:\n    ok = False","typeGuard":"def level_zero_loader_complete(lib):\n    required = [\"zesDeviceEnumMemoryModules\", \"zesMemoryGetState\"]\n    return lib is not None and all(hasattr(lib, s) for s in required)","tryCatchPattern":"try:\n    gpu_info = probe_level_zero()\nexcept AttributeError as e:\n    logger.warning(\"Level Zero loader incomplete: %s — skipping GPU telemetry\", e)\n    gpu_info = None","preventionTips":["Keep Intel GPU drivers and level-zero runtime current","Check symbol availability before enabling sysman probing","Avoid trimming Level Zero libraries out of container images"],"tags":["attributeerror","intel-gpu","level-zero","missing-symbol"],"backgroundTag":"missing-native-library-symbol","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}