• Check if a specific WebNN device type is supported

    Parameters

    • deviceType: WebNNDeviceType

      The device type to check

    Returns Promise<boolean>

    Promise that resolves to true if supported, false otherwise

    Example

    const gpuSupported = await isWebNNDeviceSupported('gpu');
    if (gpuSupported) {
    console.log('GPU acceleration available via WebNN');
    }