Find the top-k largest values in a 1D tensor and return them in descending order.
Input:
x: A 1D tensor of shape (n,) k: An integer, the number of top values to return
Output: A 1D tensor of shape (k,) containing the k largest values in descending order.
API Reference:
torch.topk(x, k) jax.lax.top_k(x, k) or sort-based approach