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

Function checkKernelProfile

tfjs-core/src/profiler_test.ts:56–74  ·  view source on GitHub ↗
(acturalVal: KernelProfile, truthVal: {
  kernelName: string,
  outputs: Tensor[],
  timeMs: number|{error: string},
  inputs: NamedTensorMap,
  extraInfo: string
})

Source from the content-addressed store, hash-verified

54}
55
56function checkKernelProfile(acturalVal: KernelProfile, truthVal: {
57 kernelName: string,
58 outputs: Tensor[],
59 timeMs: number|{error: string},
60 inputs: NamedTensorMap,
61 extraInfo: string
62}) {
63 expect(acturalVal.kernelName).toBe(truthVal.kernelName);
64 expect(acturalVal.inputs).toBe(truthVal.inputs);
65 acturalVal.outputs.forEach((output, index) => {
66 expect(output).toBe(truthVal.outputs[index]);
67 });
68
69 const promiseContainer = [
70 promiseCheckWrapper(acturalVal.timeMs, truthVal.timeMs),
71 promiseCheckWrapper(acturalVal.extraInfo, truthVal.extraInfo),
72 ];
73 return Promise.all(promiseContainer);
74}
75
76describeWithFlags('profiler.Profiler', SYNC_BACKEND_ENVS, () => {
77 it('profiles simple function', doneFn => {

Callers 1

profiler_test.tsFile · 0.85

Calls 2

promiseCheckWrapperFunction · 0.85
allMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…