code: def gflops(niter=4, nroll=4, ngroups=4096):
      NCOMP = 8
      prg = f"""__kernel void gflops(
      __global float* out_buf
      ) {{
        float{NCOMP} x = (float{NCOMP})({",".join(f"get_local_id(0)+{i}" for i in range(NCOMP))});
        float{NCOMP} y = (float{NCOMP})({",".join(f"get_local_id(1)+{i}" for i in range(NCOMP))});
  
        for (int i = 0; i < {niter}; i++) {{
          {''.join(['x = mad(y, y, x); y = mad(x, x, y);'+chr(10)]*nroll)}
        }}
  
        out_buf[get_global_id(0) >> 31] = {'+'.join(f"y.s{'0123456789abcdef'[i]}" for i in range(NCOMP))};
    }}"""
      out_buf = CLBuffer(1, dtypes.float32)
      cl = CLProgram(
          "gflops", prg, options="-cl-mad-enable -cl-fast-relaxed-math"
      )
      FLOPS = NCOMP * 2 * 2 * niter * nroll * ngroups * 32
      # NOTE: if nay of the niters form a local group, this is wrong
      return FLOPS / (
          min(
              [
                  cl([32, ngroups, 1], [32, 1, 1], out_buf, wait=True)
                  for _ in range(10)
              ]
          )
          * 1e9
      )
  
file_path: tinygrad/extra/archprobe.py
imports: import numpy
  import pickle
  from tinygrad.runtime.ops_gpu import CLProgram, CLBuffer
  from tinygrad import dtypes
  from tqdm import trange, tqdm
  from matplotlib import pyplot
label_desc: Use image node_id 11 for calling a global function with example usage: gflops(niter, nroll, ngroups) and returns: unknown