code: def test_triton_multiple_varargs_kernel():
      @triton.jit
      def weighted_sumN(
          output_ptr,
          a_ptr: "VAR_ARGS_ARRAY",  # type: ignore # noqa: F821
          b: "VAR_ARGS_ARRAY",  # type: ignore # noqa: F821
          BLOCK_SIZE: tl.constexpr,
      ):
          # Weighted sum, where the weights are on CPU
          offset = tl.arange(0, BLOCK_SIZE)
          output = tl.zeros([BLOCK_SIZE], tl.float32)
  
          for i in range(len(a_ptr)):
              output = output + tl.load(a_ptr[i] + offset) * b[i]
          tl.store(output_ptr + offset, output)
  
      BLOCK_SIZE = 32
      NUM_INPUTS = 2
      torch.manual_seed(0)
      a = [
          torch.randn([BLOCK_SIZE], dtype=torch.float32, device="cuda")
          for _ in range(NUM_INPUTS)
      ]
      b = [
          torch.randn([], dtype=torch.float32, device="cuda")
          for _ in range(NUM_INPUTS)
      ]
      b_list = [x.item() for x in b]
      output = torch.randn(
          [BLOCK_SIZE], dtype=torch.float32, device="cuda"
      )
      kernel = unroll_varargs(weighted_sumN, N=NUM_INPUTS)
      kernel[(1,)](output, *a, *b_list, BLOCK_SIZE=32)
      expected_output = (
          torch.stack(a) * torch.stack(b).unsqueeze(1)
      ).sum(0)
      assert torch.allclose(expected_output, output)
  
imports: import logging
  import sys
  import pytest
  import torch
  import xformers
label_desc: Use image node_id 2 for calling a global function with example usage: test_triton_multiple_varargs_kernel() without return types