code: def test_scan2d_broadcast(RBLOCK, num_warps):
      @triton.jit(debug=True)
      def fn(
          in_ptr, out_ptr, XBLOCK: tl.constexpr, RBLOCK: tl.constexpr
      ):
          rindex = tl.arange(0, RBLOCK)[None, :]
          xindex = tl.arange(0, XBLOCK)[:, None]
          data = tl.load(in_ptr + rindex)
          scan = tl.cumsum(data, 1)
          expected_max = tl.sum(data, 1)
          tl.device_assert(scan <= expected_max)
          tl.store(out_ptr + xindex * RBLOCK + rindex, scan)
  
      XBLOCK = 4
      input = torch.randint(
          0, 10, (1, RBLOCK), dtype=torch.int64, device="cuda"
      )
      output = torch.empty(
          (XBLOCK, RBLOCK), dtype=torch.int64, device="cuda"
      )
      fn[(1,)](input, output, XBLOCK, RBLOCK, num_warps=num_warps)
      ref = input.cumsum(1).broadcast_to((XBLOCK, RBLOCK))
      torch.testing.assert_close(output, ref)
  
imports: import pytest
  import torch
  import triton
  import triton.language
label_desc: Use image node_id 3 for calling a global function with example usage: test_scan2d_broadcast(RBLOCK, num_warps) without return types