npuStackOf function
Whether this build carries vendor's NPU stack where LiteRT will load it:
for Qualcomm, what NativeAssetsManifest.json says the build bundled
(checkNpuStackInManifest, read through platform and cached per
vendor); for Intel, whether its dispatch is beside the executable
(checkIntelNpuStack) — the directory LiteRT is pointed at, and a stack
that answers NpuStackCheck.unknown there would go unchecked: Intel's
prepareNpuDispatchDir checks nothing (it only sweeps stale weight banks).
Implementation
Future<NpuStackCheck> npuStackOf(NpuStack vendor, NpuPlatform platform) async =>
switch (vendor) {
NpuStack.qualcomm => await _checkManifest(vendor, platform),
NpuStack.googleTensor => await _checkManifest(vendor, platform),
NpuStack.mediatek => await _checkManifest(vendor, platform),
NpuStack.intel => checkIntelNpuStack(
windowsNpuDispatchDirOf(platform.executableDir),
),
};