code: def benchmark(M, N, K, provider):
      a = torch.randn((M, K), device="cuda", dtype=torch.float16)
      b = torch.randn((K, N), device="cuda", dtype=torch.float16)
      quantiles = [0.5, 0.2, 0.8]
      if provider == "cublas":
          ms, min_ms, max_ms = triton.testing.do_bench(
              lambda: torch.matmul(a, b), quantiles=quantiles
          )
      if provider == "triton":
          ms, min_ms, max_ms = triton.testing.do_bench(
              lambda: matmul(a, b), quantiles=quantiles
          )
      perf = lambda ms: 2 * M * N * K * 1e-12 / (ms * 1e-3)
      return perf(ms), perf(max_ms), perf(min_ms)
  
imports: import torch
  import triton
  import triton.language
label_desc: Use image node_id 4 for calling a global function with example usage: benchmark(M, N, K, provider) and returns: perf,  perf,  perf