liteRtLmGpuCachePathProblem function

  1. @visibleForTesting
String? liteRtLmGpuCachePathProblem(
  1. String cacheDir,
  2. String modelFileName,
  3. int modelSize, {
  4. required bool windows,
  5. bool ansiCodePageIsUtf8 = false,
})

Why LiteRT's WebGPU accelerator cannot create the GPU caches of modelFileName in cacheDir, decided from the path alone before the engine exists; null when both fit. liteRtLmGpuCachePathCheck says which of the two each reason applies to.

Implementation

@visibleForTesting
String? liteRtLmGpuCachePathProblem(
  String cacheDir,
  String modelFileName,
  int modelSize, {
  required bool windows,
  bool ansiCodePageIsUtf8 = false,
}) => liteRtLmGpuCachePathCheck(
  cacheDir,
  modelFileName,
  modelSize,
  windows: windows,
  ansiCodePageIsUtf8: ansiCodePageIsUtf8,
)?.problem;