MCPcopy Create free account
hub / github.com/tensorflow/tfjs / importKernelStr

Function importKernelStr

tfjs/tools/custom_module/esm_module_provider.ts:106–114  ·  view source on GitHub ↗
(kernelName: string, backend: SupportedBackend)

Source from the content-addressed store, hash-verified

104 },
105
106 importKernelStr(kernelName: string, backend: SupportedBackend) {
107 const backendPkg = getBackendPath(backend);
108 const kernelConfigId = `${kernelName}_${backend}`;
109 const importPath = `${backendPkg}/dist/kernels/${kernelName}`;
110 const importStatement =
111 `import {${kernelNameToVariableName(kernelName)}Config as ${
112 kernelConfigId}} from '${importPath}';`;
113 return {importPath, importStatement, kernelConfigId};
114 },
115
116 importGradientConfigStr(kernelName: string) {
117 const gradConfigId = `${kernelNameToVariableName(kernelName)}GradConfig`;

Callers

nothing calls this directly

Calls 2

kernelNameToVariableNameFunction · 0.90
getBackendPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…