MCPcopy Index your code
hub / github.com/apache/tvm / normalizeCacheType

Function normalizeCacheType

web/src/artifact_cache.ts:774–793  ·  view source on GitHub ↗
(cacheType?: string)

Source from the content-addressed store, hash-verified

772}
773
774function normalizeCacheType(cacheType?: string): ArtifactCacheType {
775 if (cacheType === undefined) {
776 return "cache";
777 }
778 const normalized = cacheType.toLowerCase();
779 if (normalized === "cache") {
780 return "cache";
781 }
782 if (normalized === "indexeddb") {
783 return "indexeddb";
784 }
785 if (normalized === "cross-origin") {
786 return "cross-origin";
787 }
788 if (normalized === "opfs") {
789 return "opfs";
790 }
791 console.error("Unsupported cacheType: " + cacheType + ", using default ArtifactCache.");
792 return "cache";
793}
794
795function isTensorCacheAccessOptions(
796 value: string | TensorCacheAccessOptions | undefined,

Callers 2

createArtifactCacheFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…