ApproxMaxKΒΆ

Returns max k values and their indices using approximate search (TPU optimized).

Abstract Signature:

ApproxMaxK(operand: Tensor, k: int, reduction_dimension: int = -1)

PyTorch

API: torch.topk
Strategy: Direct Mapping

JAX (Core)

API: jax.lax.approx_max_k
Strategy: Direct Mapping

TensorFlow

API: tf.math.approx_max_k
Strategy: Direct Mapping

Apple MLX

API: mlx.core.topk
Strategy: Direct Mapping