Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast to 'unknown' instead of '{}' in double assertions #7116

Merged
merged 4 commits into from Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/backend_cpu.ts
Expand Up @@ -82,7 +82,7 @@ export class MathBackendCPU extends KernelBackend {
if (dtype === 'string' && values != null && values.length > 0 &&
util.isString(values[0])) {
const encodedValues =
(values as {} as string[]).map(d => util.encodeString(d));
(values as unknown as string[]).map(d => util.encodeString(d));

outId = this.write(encodedValues, shape, dtype);
} else {
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Abs.ts
Expand Up @@ -44,5 +44,5 @@ export const abs = (args: {inputs: AbsInputs, backend: MathBackendCPU}) => {
export const absConfig: KernelConfig = {
kernelName: Abs,
backendName: 'cpu',
kernelFunc: abs as {} as KernelFunc,
kernelFunc: abs as unknown as KernelFunc,
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/AddN.ts
Expand Up @@ -44,5 +44,5 @@ export function addN(args: {inputs: AddNInputs, backend: MathBackendCPU}):
export const addNConfig: KernelConfig = {
kernelName: AddN,
backendName: 'cpu',
kernelFunc: addN as {} as KernelFunc
kernelFunc: addN as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/All.ts
Expand Up @@ -79,5 +79,5 @@ export function all(
export const allConfig: KernelConfig = {
kernelName: All,
backendName: 'cpu',
kernelFunc: all as {} as KernelFunc
kernelFunc: all as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Any.ts
Expand Up @@ -79,5 +79,5 @@ export function any(
export const anyConfig: KernelConfig = {
kernelName: Any,
backendName: 'cpu',
kernelFunc: any as {} as KernelFunc
kernelFunc: any as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/ArgMax.ts
Expand Up @@ -73,5 +73,5 @@ export function argMax(
export const argMaxConfig: KernelConfig = {
kernelName: ArgMax,
backendName: 'cpu',
kernelFunc: argMax as {} as KernelFunc
kernelFunc: argMax as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/ArgMin.ts
Expand Up @@ -73,5 +73,5 @@ export function argMin(
export const argMinConfig: KernelConfig = {
kernelName: ArgMin,
backendName: 'cpu',
kernelFunc: argMin as {} as KernelFunc
kernelFunc: argMin as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/AvgPool.ts
Expand Up @@ -57,5 +57,5 @@ export function avgPool(
export const avgPoolConfig: KernelConfig = {
kernelName: AvgPool,
backendName: 'cpu',
kernelFunc: avgPool as {} as KernelFunc
kernelFunc: avgPool as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/AvgPool3D.ts
Expand Up @@ -46,5 +46,5 @@ export function avgPool3D(args: {
export const avgPool3DConfig: KernelConfig = {
kernelName: AvgPool3D,
backendName: 'cpu',
kernelFunc: avgPool3D as {} as KernelFunc
kernelFunc: avgPool3D as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/AvgPool3DGrad.ts
Expand Up @@ -108,5 +108,5 @@ export function avgPool3DGrad(args: {
export const avgPool3DGradConfig: KernelConfig = {
kernelName: AvgPool3DGrad,
backendName: 'cpu',
kernelFunc: avgPool3DGrad as {} as KernelFunc
kernelFunc: avgPool3DGrad as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/AvgPoolGrad.ts
Expand Up @@ -88,5 +88,5 @@ export function avgPoolGrad(args: {
export const avgPoolGradConfig: KernelConfig = {
kernelName: AvgPoolGrad,
backendName: 'cpu',
kernelFunc: avgPoolGrad as {} as KernelFunc
kernelFunc: avgPoolGrad as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/BatchMatMul.ts
Expand Up @@ -135,5 +135,5 @@ export function batchMatMul(args: {
export const batchMatMulConfig: KernelConfig = {
kernelName: BatchMatMul,
backendName: 'cpu',
kernelFunc: batchMatMul as {} as KernelFunc,
kernelFunc: batchMatMul as unknown as KernelFunc,
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/BatchNorm.ts
Expand Up @@ -90,5 +90,5 @@ export function batchNorm(args: {
export const batchNormConfig: KernelConfig = {
kernelName: FusedBatchNorm,
backendName: 'cpu',
kernelFunc: batchNorm as {} as KernelFunc,
kernelFunc: batchNorm as unknown as KernelFunc,
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/BatchToSpaceND.ts
Expand Up @@ -66,5 +66,5 @@ export function batchToSpaceND(args: {
export const batchToSpaceNDConfig: KernelConfig = {
kernelName: BatchToSpaceND,
backendName: 'cpu',
kernelFunc: batchToSpaceND as {} as KernelFunc
kernelFunc: batchToSpaceND as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Bincount.ts
Expand Up @@ -41,5 +41,5 @@ export function bincount(args: {
export const bincountConfig: KernelConfig = {
kernelName: Bincount,
backendName: 'cpu',
kernelFunc: bincount as {} as KernelFunc
kernelFunc: bincount as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Cast.ts
Expand Up @@ -97,5 +97,5 @@ export function cast(
export const castConfig: KernelConfig = {
kernelName: Cast,
backendName: 'cpu',
kernelFunc: cast as {} as KernelFunc
kernelFunc: cast as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/ClipByValue.ts
Expand Up @@ -20,7 +20,7 @@ import {ClipByValue, ClipByValueAttrs, KernelConfig} from '@tensorflow/tfjs-core
import {unaryKernelFunc} from '../utils/unary_utils';

export const clipByValue = unaryKernelFunc(ClipByValue, (xi, attrs) => {
const clipAttrs = attrs as {} as ClipByValueAttrs;
const clipAttrs = attrs as unknown as ClipByValueAttrs;
if (xi > clipAttrs.clipValueMax) {
return clipAttrs.clipValueMax;
}
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Complex.ts
Expand Up @@ -45,5 +45,5 @@ export function complex(args: {inputs: ComplexInputs, backend: MathBackendCPU}):
export const complexConfig: KernelConfig = {
kernelName: Complex,
backendName: 'cpu',
kernelFunc: complex as {} as KernelFunc
kernelFunc: complex as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/ComplexAbs.ts
Expand Up @@ -41,5 +41,5 @@ export const complexAbs =
export const complexAbsConfig: KernelConfig = {
kernelName: ComplexAbs,
backendName: 'cpu',
kernelFunc: complexAbs as {} as KernelFunc,
kernelFunc: complexAbs as unknown as KernelFunc,
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Concat.ts
Expand Up @@ -105,5 +105,5 @@ export function concat(
export const concatConfig: KernelConfig = {
kernelName: Concat,
backendName: 'cpu',
kernelFunc: concat as {} as KernelFunc
kernelFunc: concat as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Conv2D.ts
Expand Up @@ -105,5 +105,5 @@ export function conv2D(
export const conv2DConfig: KernelConfig = {
kernelName: Conv2D,
backendName: 'cpu',
kernelFunc: conv2D as {} as KernelFunc
kernelFunc: conv2D as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Conv2DBackpropFilter.ts
Expand Up @@ -89,5 +89,5 @@ export function conv2DBackpropFilter(args: {
export const conv2DBackpropFilterConfig: KernelConfig = {
kernelName: Conv2DBackpropFilter,
backendName: 'cpu',
kernelFunc: conv2DBackpropFilter as {} as KernelFunc
kernelFunc: conv2DBackpropFilter as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Conv2DBackpropInput.ts
Expand Up @@ -117,5 +117,5 @@ export function conv2DBackpropInput(args: {
export const conv2DBackpropInputConfig: KernelConfig = {
kernelName: Conv2DBackpropInput,
backendName: 'cpu',
kernelFunc: conv2DBackpropInput as {} as KernelFunc
kernelFunc: conv2DBackpropInput as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Conv3D.ts
Expand Up @@ -111,5 +111,5 @@ export function conv3D(
export const conv3DConfig: KernelConfig = {
kernelName: Conv3D,
backendName: 'cpu',
kernelFunc: conv3D as {} as KernelFunc
kernelFunc: conv3D as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Conv3DBackpropFilterV2.ts
Expand Up @@ -117,5 +117,5 @@ export function conv3DBackpropFilterV2(args: {
export const conv3DBackpropFilterV2Config: KernelConfig = {
kernelName: Conv3DBackpropFilterV2,
backendName: 'cpu',
kernelFunc: conv3DBackpropFilterV2 as {} as KernelFunc
kernelFunc: conv3DBackpropFilterV2 as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Conv3DBackpropInputV2.ts
Expand Up @@ -124,5 +124,5 @@ export function conv3DBackpropInputV2(args: {
export const conv3DBackpropInputV2Config: KernelConfig = {
kernelName: Conv3DBackpropInputV2,
backendName: 'cpu',
kernelFunc: conv3DBackpropInputV2 as {} as KernelFunc
kernelFunc: conv3DBackpropInputV2 as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/CropAndResize.ts
Expand Up @@ -162,5 +162,5 @@ export function cropAndResize(args: {
export const cropAndResizeConfig: KernelConfig = {
kernelName: CropAndResize,
backendName: 'cpu',
kernelFunc: cropAndResize as {} as KernelFunc
kernelFunc: cropAndResize as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Cumprod.ts
Expand Up @@ -84,5 +84,5 @@ export function cumprod(
export const cumprodConfig: KernelConfig = {
kernelName: Cumprod,
backendName: 'cpu',
kernelFunc: cumprod as {} as KernelFunc
kernelFunc: cumprod as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Cumsum.ts
Expand Up @@ -84,5 +84,5 @@ export function cumsum(
export const cumsumConfig: KernelConfig = {
kernelName: Cumsum,
backendName: 'cpu',
kernelFunc: cumsum as {} as KernelFunc
kernelFunc: cumsum as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/DenseBincount.ts
Expand Up @@ -54,5 +54,5 @@ export function denseBincount(args: {
export const denseBincountConfig: KernelConfig = {
kernelName: DenseBincount,
backendName: 'cpu',
kernelFunc: denseBincount as {} as KernelFunc
kernelFunc: denseBincount as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/DepthToSpace.ts
Expand Up @@ -72,5 +72,5 @@ export function depthToSpace(args: {
export const depthToSpaceConfig: KernelConfig = {
kernelName: DepthToSpace,
backendName: 'cpu',
kernelFunc: depthToSpace as {} as KernelFunc
kernelFunc: depthToSpace as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/DepthwiseConv2dNative.ts
Expand Up @@ -104,5 +104,5 @@ export function depthwiseConv2dNative(args: {
export const depthwiseConv2dNativeConfig: KernelConfig = {
kernelName: DepthwiseConv2dNative,
backendName: 'cpu',
kernelFunc: depthwiseConv2dNative as {} as KernelFunc
kernelFunc: depthwiseConv2dNative as unknown as KernelFunc
};
Expand Up @@ -83,5 +83,5 @@ export function depthwiseConv2dNativeBackpropFilter(args: {
export const depthwiseConv2dNativeBackpropFilterConfig: KernelConfig = {
kernelName: DepthwiseConv2dNativeBackpropFilter,
backendName: 'cpu',
kernelFunc: depthwiseConv2dNativeBackpropFilter as {} as KernelFunc
kernelFunc: depthwiseConv2dNativeBackpropFilter as unknown as KernelFunc
};
Expand Up @@ -106,5 +106,5 @@ export function depthwiseConv2dNativeBackpropInput(args: {
export const depthwiseConv2dNativeBackpropInputConfig: KernelConfig = {
kernelName: DepthwiseConv2dNativeBackpropInput,
backendName: 'cpu',
kernelFunc: depthwiseConv2dNativeBackpropInput as {} as KernelFunc
kernelFunc: depthwiseConv2dNativeBackpropInput as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Diag.ts
Expand Up @@ -41,5 +41,5 @@ export function diag(args: {inputs: DiagInputs, backend: MathBackendCPU}):
export const diagConfig: KernelConfig = {
kernelName: Diag,
backendName: 'cpu',
kernelFunc: diag as {} as KernelFunc
kernelFunc: diag as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Dilation2D.ts
Expand Up @@ -24,7 +24,7 @@ export const dilation2DConfig: KernelConfig = {
backendName: 'cpu',
kernelFunc: ({inputs, backend, attrs}) => {
const {x, filter} = inputs as Dilation2DInputs;
const {strides, pad, dilations} = attrs as {} as Dilation2DAttrs;
const {strides, pad, dilations} = attrs as unknown as Dilation2DAttrs;
const cpuBackend = backend as MathBackendCPU;

const xVals = cpuBackend.data.get(x.dataId).values as TypedArray;
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Dilation2DBackpropFilter.ts
Expand Up @@ -26,7 +26,7 @@ export const dilation2DBackpropFilterConfig: KernelConfig = {
kernelFunc: ({inputs, backend, attrs}) => {
const {x, filter, dy} =
inputs as {x: Tensor4D, filter: Tensor3D, dy: Tensor4D};
const {strides, pad, dilations} = attrs as {} as Dilation2DAttrs;
const {strides, pad, dilations} = attrs as unknown as Dilation2DAttrs;
const cpuBackend = backend as MathBackendCPU;

const $x =
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Dilation2DBackpropInput.ts
Expand Up @@ -26,7 +26,7 @@ export const dilation2DBackpropInputConfig: KernelConfig = {
kernelFunc: ({inputs, backend, attrs}) => {
const {x, filter, dy} =
inputs as {x: Tensor4D, filter: Tensor3D, dy: Tensor4D};
const {strides, pad, dilations} = attrs as {} as Dilation2DAttrs;
const {strides, pad, dilations} = attrs as unknown as Dilation2DAttrs;
const cpuBackend = backend as MathBackendCPU;

const $x =
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Einsum.ts
Expand Up @@ -98,5 +98,5 @@ export function einsum(
export const einsumConfig: KernelConfig = {
kernelName: Einsum,
backendName: 'cpu',
kernelFunc: einsum as {} as KernelFunc
kernelFunc: einsum as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/EluGrad.ts
Expand Up @@ -45,5 +45,5 @@ export function eluGrad(args: {inputs: EluGradInputs, backend: MathBackendCPU}):
export const eluGradConfig: KernelConfig = {
kernelName: EluGrad,
backendName: 'cpu',
kernelFunc: eluGrad as {} as KernelFunc
kernelFunc: eluGrad as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/ExpandDims.ts
Expand Up @@ -48,5 +48,5 @@ export function expandDims(args: {
export const expandDimsConfig: KernelConfig = {
kernelName: ExpandDims,
backendName: 'cpu',
kernelFunc: expandDims as {} as KernelFunc
kernelFunc: expandDims as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/FFT.ts
Expand Up @@ -52,5 +52,5 @@ export function fft(args: {inputs: FFTInputs, backend: MathBackendCPU}):
export const fftConfig: KernelConfig = {
kernelName: FFT,
backendName: 'cpu',
kernelFunc: fft as {} as KernelFunc
kernelFunc: fft as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Fill.ts
Expand Up @@ -34,7 +34,7 @@ export function fill(args: {backend: MathBackendCPU, attrs: FillAttrs}):
export const fillConfig: KernelConfig = {
kernelName: Fill,
backendName: 'cpu',
kernelFunc: fill as {} as KernelFunc
kernelFunc: fill as unknown as KernelFunc
};

function fillValues(
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/FusedConv2D.ts
Expand Up @@ -97,5 +97,5 @@ export function fusedConv2D(args: {
export const fusedConv2DConfig: KernelConfig = {
kernelName: FusedConv2D,
backendName: 'cpu',
kernelFunc: fusedConv2D as {} as KernelFunc
kernelFunc: fusedConv2D as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/FusedDepthwiseConv2D.ts
Expand Up @@ -63,5 +63,5 @@ export function fusedDepthwiseConv2D(args: {
export const fusedDepthwiseConv2DConfig: KernelConfig = {
kernelName: FusedDepthwiseConv2D,
backendName: 'cpu',
kernelFunc: fusedDepthwiseConv2D as {} as KernelFunc
kernelFunc: fusedDepthwiseConv2D as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/GatherNd.ts
Expand Up @@ -49,5 +49,5 @@ export function gatherNd(
export const gatherNdConfig: KernelConfig = {
kernelName: GatherNd,
backendName: 'cpu',
kernelFunc: gatherNd as {} as KernelFunc
kernelFunc: gatherNd as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/GatherV2.ts
Expand Up @@ -92,5 +92,5 @@ export function gatherV2(args: {
export const gatherV2Config: KernelConfig = {
kernelName: GatherV2,
backendName: 'cpu',
kernelFunc: gatherV2 as {} as KernelFunc
kernelFunc: gatherV2 as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/IFFT.ts
Expand Up @@ -52,5 +52,5 @@ export function ifft(args: {inputs: IFFTInputs, backend: MathBackendCPU}):
export const ifftConfig: KernelConfig = {
kernelName: IFFT,
backendName: 'cpu',
kernelFunc: ifft as {} as KernelFunc
kernelFunc: ifft as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Identity.ts
Expand Up @@ -32,5 +32,5 @@ export function identity(
export const identityConfig: KernelConfig = {
kernelName: Identity,
backendName: 'cpu',
kernelFunc: identity as {} as KernelFunc
kernelFunc: identity as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Imag.ts
Expand Up @@ -36,5 +36,5 @@ export function imag(args: {inputs: ImagInputs, backend: MathBackendCPU}):
export const imagConfig: KernelConfig = {
kernelName: Imag,
backendName: 'cpu',
kernelFunc: imag as {} as KernelFunc
kernelFunc: imag as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/LRN.ts
Expand Up @@ -63,5 +63,5 @@ export function lRN(
export const LRNConfig: KernelConfig = {
kernelName: LRN,
backendName: 'cpu',
kernelFunc: lRN as {} as KernelFunc
kernelFunc: lRN as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/LRNGrad.ts
Expand Up @@ -69,5 +69,5 @@ export function lRNGrad(
export const LRNGradConfig: KernelConfig = {
kernelName: LRNGrad,
backendName: 'cpu',
kernelFunc: lRNGrad as {} as KernelFunc
kernelFunc: lRNGrad as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/LeakyRelu.ts
Expand Up @@ -45,5 +45,5 @@ export function leakyRelu(args: {
export const leakyReluConfig: KernelConfig = {
kernelName: LeakyRelu,
backendName: 'cpu',
kernelFunc: leakyRelu as {} as KernelFunc
kernelFunc: leakyRelu as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/LinSpace.ts
Expand Up @@ -33,5 +33,5 @@ export function linSpace(args: {backend: MathBackendCPU, attrs: LinSpaceAttrs}):
export const linSpaceConfig: KernelConfig = {
kernelName: LinSpace,
backendName: 'cpu',
kernelFunc: linSpace as {} as KernelFunc
kernelFunc: linSpace as unknown as KernelFunc
};
2 changes: 1 addition & 1 deletion tfjs-backend-cpu/src/kernels/Max.ts
Expand Up @@ -74,5 +74,5 @@ export function max(
export const maxConfig: KernelConfig = {
kernelName: Max,
backendName: 'cpu',
kernelFunc: max as {} as KernelFunc
kernelFunc: max as unknown as KernelFunc
};