Implement a AllGather-Gemm kernel on a single MI300X device.

AllGather-Gemm (AG-Gemm) is a technique that combines the AllGather communication
pattern with General Matrix Multiplication (GEMM) to optimize the performance
of transformer models on GPUs.

Your task:
- Implement the AG-Gemm kernel to perform matrix multiplications
  in a distributed manner, leveraging the AllGather operation to collect
  data from multiple GPUs.
- Ensure that the implementation is optimized for the MI300X architecture,
  taking advantage of its specific hardware features for maximum performance.

Input:
- `data`: Tuple of (input: torch.Tensor, weights: torch.Tensor,
          bias: Optional, None or torch.Tensor)
  - input: Local input tensor of shape [local_M, K].
  - weight: Weight tensor of shape [local_N, K].
  - bias: bias tensor of shape [local_N] or None.

Output:
- Tuple containing:
  - output: Resulting tensor of shape [local_M * world_size, local_N]

The ranking criteria is the geometric mean of the benchmark results.

For the grand price, your kernel will be evaluated against the speed of light
analysis and AMD implementations, the solution closest to the speed of light
and AMD implementations will be awarded the grand price.
```
The speed of light analysis is:
 m      n      k      has_bias      time[us]
 64     18432  7168   False         6.46
 512    12288  4096   True          24.58
 2048   2880   2880   True          23.04
 4096   4096   4096   False         65.54
 8192   14336  4096   True          458.75
 8192   29568  8192   False         946.18
```
