code: def run_inference(
      test_dataset,
      model,
      epochs,
      batch_size,
      profiling,
      bf16,
      use_compile,
  ):
      model = model.to(device)
      if use_compile:
          model = torch.compile(model)
      test_loader = DataLoader(test_dataset, batch_size, shuffle=False)
  
      if torch.cuda.is_available():
          amp = torch.cuda.amp.autocast(enabled=False)
      else:
          amp = torch.cpu.amp.autocast(enabled=bf16)
  
      with amp:
          for epoch in range(1, epochs + 1):
              print("Epoch: ", epoch)
              if epoch == epochs:
                  with timeit():
                      inference(model, test_loader, device, bf16)
              else:
                  inference(model, test_loader, device, bf16)
  
          if profiling:
              with torch_profile():
                  inference(model, test_loader, device, bf16)
  
file_path: pytorch_geometric/benchmark/points/train_eval.py
imports: import time
  import torch
  import torch.nn.functional
  from torch.optim import Adam
  from torch_geometric.loader import DataLoader
  from torch_geometric.profile import timeit, torch_profile
label_desc: Use image node_id 2 for calling a global function with example usage: run_inference(test_dataset, model, epochs, batch_size, profiling, bf16, use_compile) without return types