code: def test_reductions(N, dtype_str):
      stream = torch.cuda.Stream()
      torch.cuda.set_stream(stream)
      torch.manual_seed(0)
      dtype = {
          "float16": torch.float16,
          "float32": torch.float32,
          "int16": torch.int16,
          "int32": torch.int32,
      }[dtype_str]
      ref_gpu_util = reduction_data[DEVICE_NAME][N][dtype_str]
      cur_sm_clock = nvsmi(["clocks.current.sm"])[0]
      max_gpu_perf = get_max_tensorcore_tflops(
          dtype, clock_rate=cur_sm_clock * 1e3
      )
      z = torch.empty((N,), dtype=dtype, device="cuda")
      if dtype == torch.float16 or dtype == torch.float32:
          x = torch.randn_like(z)
          y = torch.randn_like(z)
      else:
          info = torch.iinfo(dtype)
          x = torch.randint(
              info.min, info.max, (N,), dtype=dtype, device="cuda"
          )
          y = torch.randint(
              info.min, info.max, (N,), dtype=dtype, device="cuda"
          )
      grid = lambda args: (triton.cdiv(N, args["BLOCK_SIZE"]),)
      fn = lambda: _sum[grid](x, y, z, N, BLOCK_SIZE=1024)
      ms = triton.testing.do_bench_cudagraph(fn)
      cur_gpu_perf = 100.0 * 2.0 * N / ms * 1e-9
      cur_gpu_util = cur_gpu_perf / max_gpu_perf
      print_perf(ms, cur_gpu_util, ref_gpu_util)
      triton.testing.assert_close(
          cur_gpu_util, ref_gpu_util, atol=0.02, rtol=0.01
      )
  
file_path: triton/python/test/regression/test_performance.py
imports: import pytest
  import torch
  import triton
  import triton.language
  import triton.ops
  from triton.testing import get_dram_gbps, get_max_tensorcore_tflops, nvsmi
label_desc: Use image node_id 7 for calling a global function with example usage: test_reductions(N, dtype_str) without return types