code: def test_scan2d_for():
      @triton.jit
      def fn(out_ptr0, rnumel, RBLOCK: tl.constexpr):
          rbase = tl.arange(0, RBLOCK)[None, :]
          for roffset in range(0, rnumel, RBLOCK):
              rindex = roffset + rbase
              rmask = rindex < rnumel
              tmp3 = tl.where(rmask, 1, 0)
              tmp6 = tl.cumsum(tmp3, 1)
              tl.store(out_ptr0 + rindex, tmp6, rmask)
  
      RBLOCK = 8
      out0 = torch.empty(RBLOCK, device="cuda", dtype=torch.int64)
      fn[(1,)](out0, RBLOCK, RBLOCK)
      ref = torch.arange(RBLOCK, device="cuda", dtype=torch.int64) + 1
      torch.testing.assert_close(out0, ref)
  
imports: import pytest
  import torch
  import triton
  import triton.language
label_desc: Use image node_id 4 for calling a global function with example usage: test_scan2d_for() without return types