MCPcopy Index your code
hub / github.com/tensorflow/tfjs / getKernelsForBackend

Function getKernelsForBackend

tfjs-core/src/kernel_registry.ts:102–118  ·  view source on GitHub ↗
(backendName: string)

Source from the content-addressed store, hash-verified

100}
101
102export function getKernelsForBackend(backendName: string): KernelConfig[] {
103 const it = kernelRegistry.entries();
104 const result: KernelConfig[] = [];
105
106 while (true) {
107 const {done, value} = it.next();
108 if (done) {
109 break;
110 }
111 const [key, config] = value;
112 const [backend, ] = key.split('_');
113 if (backend === backendName) {
114 result.push(config);
115 }
116 }
117 return result;
118}
119
120/**
121 * Registers the function (forward pass) for the kernel in a global registry.

Callers 4

copyRegisteredKernelsFunction · 0.85

Calls 3

splitMethod · 0.65
nextMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…