checkIntelNpuStack function
Whether dir holds intelNpuDispatchLib.
File presence, unlike checkNpuStackInManifest: dir is the
directory LiteRT is pointed at, so the question is what it will find
there. Only the dispatch is checked — which of the OpenVINO and TBB
libraries a precompiled EmbeddingGemma 2 graph needs has not been
established on Intel NPU hardware, and a stack that cannot serve the bundle
still fails the pass's probe embed at load.
Implementation
NpuStackCheck checkIntelNpuStack(String dir) =>
File('$dir${Platform.pathSeparator}$intelNpuDispatchLib').existsSync()
? const NpuStackCheck.bundled()
: NpuStackCheck.missing(
'$intelNpuDispatchLib is not beside the executable ($dir). Every '
'Windows x64 build with litertlm_dart puts the Intel NPU '
'stack there; ship all the DLLs the build put next to the executable '
'with the app',
);