code: def test_jit_warmup_cache() -> None:
      @triton.jit
      def kernel_add(a, b, o, N: tl.constexpr):
          idx = tl.arange(0, N)
          tl.store(o + idx, tl.load(a + idx) + tl.load(b + idx))
  
      args = [
          torch.randn(32, dtype=torch.float32, device="cuda"),
          torch.randn(32, dtype=torch.float32, device="cuda"),
          torch.randn(32, dtype=torch.float32, device="cuda"),
          32,
      ]
      device = torch.cuda.current_device()
      assert len(kernel_add.cache[device]) == 0
      kernel_add.warmup(
          torch.float32, torch.float32, torch.float32, 32, grid=(1,)
      )
      assert len(kernel_add.cache[device]) == 1
      kernel_add.warmup(*args, grid=(1,))
      assert len(kernel_add.cache[device]) == 1
      kernel_add.warmup(*args, grid=(1,))
      assert len(kernel_add.cache[device]) == 1
  
imports: import importlib.util
  import os
  import shutil
  import tempfile
  import pytest
  import torch
  import triton
  import triton.language
  from triton.runtime.jit import JITFunction
label_desc: Use image node_id 16 for calling a global function with example usage: test_jit_warmup_cache() without return types