code: def _create_cuda_graph_decoder(self, *inputs, **kwargs):
      # warmup to create the workspace and cublas handle
      cuda_stream = torch.cuda.Stream()
      cuda_stream.wait_stream(torch.cuda.current_stream())
      with torch.cuda.stream(cuda_stream):
          for i in range(3):
              ret = self._decode(*inputs, **kwargs)
      torch.cuda.current_stream().wait_stream(cuda_stream)
  
      # create cuda_graph and assign static_inputs and static_outputs
      self._decoder_cuda_graph = torch.cuda.CUDAGraph()
      self.static_decoder_inputs = inputs
      self.static_decoder_kwargs = kwargs
  
      with torch.cuda.graph(self._decoder_cuda_graph):
          self.static_decoder_output = self._decode(
              *self.static_decoder_inputs, **self.static_decoder_kwargs
          )
  
      self.decoder_cuda_graph_created = True
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/deepspeed/model_implementations/diffusers/vae.py
imports: import torch
label_desc: Use image node_id 4 for calling the DSVAE obj's underlying member method code with example usage: obj._create_cuda_graph_decoder() without return types