torch.KernelConfig
export type KernelConfig<
Op extends OpName,
DT extends DType,
Dev extends Device,
> = Dev extends 'webgpu'
? KernelConfigWebGPU<Op, DT>
: OpSchemas[Op] extends BinaryOpSchema
? BinaryKernelConfigCPU<Op, DT>
: OpSchemas[Op] extends UnaryOpSchema
? UnaryKernelConfigCPU<Op, DT>
: OpSchemas[Op] extends ReductionOpSchema
? ReductionKernelConfigCPU<Op, DT>
: BaseKernelConfig<Op, DT, Dev>;Opextends OpNameDTextends DTypeDevextends DeviceConditional kernel config type based on operation schema and device.
This type resolves to the correct kernel configuration based on:
- The operation kind (binary, unary, reduction)
- The device (cpu, webgpu)