mlx-bun library API
    Preparing search index...
    interface MetalKernelCall {
        grid:
            | [number, number, number]
            | ((inputs: MlxArray[]) => [number, number, number]);
        initValue?: number;
        outputs?: { dtype: Dtype; shape: number[] }[];
        outputShapeFn?: (inputs: MlxArray[]) => { dtype: Dtype; shape: number[] }[];
        stream?: bigint;
        templateDtypes?: Record<string, Dtype>;
        templateInts?: Record<string, number>;
        threadGroup: [number, number, number];
    }
    Index
    grid:
        | [number, number, number]
        | ((inputs: MlxArray[]) => [number, number, number])

    Concrete launch grid, OR derive it during eager construction or tracing. Native replay reuses the captured grid without invoking this callback.

    initValue?: number
    outputs?: { dtype: Dtype; shape: number[] }[]

    Concrete output shapes/dtypes. Provide this OR outputShapeFn. Both are captured when apply() builds the custom primitive.

    outputShapeFn?: (inputs: MlxArray[]) => { dtype: Dtype; shape: number[] }[]

    Derive outputs during eager construction or a shape-specific compile trace. This JS callback is not native shape inference: MLX's CustomKernel lacks output_shapes(), so it cannot participate in shapeless replay.

    stream?: bigint
    templateDtypes?: Record<string, Dtype>
    templateInts?: Record<string, number>
    threadGroup: [number, number, number]