xla icon indicating copy to clipboard operation
xla copied to clipboard

Move `TopKKernel` behind `GpuKernelRegistry`.

Open copybara-service[bot] opened this issue 7 months ago • 0 comments

Move TopKKernel behind GpuKernelRegistry.

  • Moves TopK logic into backends/gpu/runtime since it's a runtime component.
  • Defines trait for the TopK kernel in stream_executor/gpu/
  • Moves the implementations of this kernel into stream_executor/{cuda|rocm} and registers them with the registry for each xla::primitive_util::Type.
  • Makes TopK retrieve the kernel by using the kernel registry.
  • Add the kernel implementations as dependencies to the all_runtime targets for CUDA and ROCm.

copybara-service[bot] avatar Apr 25 '25 15:04 copybara-service[bot]