code: def hf_bart(model, inputs):
      torch.cuda.synchronize()
      start_time = time.perf_counter()
      generated_ids = model.generate(inputs.to("cuda:0"), max_length=50)
      torch.cuda.synchronize()
      end_time = time.perf_counter()
      return generated_ids, end_time - start_time
  
file_path: lightseq/examples/inference/python/test/ls_bart.py
imports: import time
  import argparse
  import torch
  import lightseq.inference
  from transformers import BartTokenizer, BartForConditionalGeneration
label_desc: Use image node_id 2 for calling a global function with example usage: hf_bart(model, inputs) and returns: generated_ids,  unknown