code: def __init__(self):
      # TODO: support other frameworks than torch
      import torch
  
      self.get_device_capability = torch.cuda.get_device_capability
      try:
          from torch._C import _cuda_getCurrentRawStream
  
          self.get_current_stream = _cuda_getCurrentRawStream
      except ImportError:
          self.get_current_stream = (
              lambda idx: torch.cuda.current_stream(idx).cuda_stream
          )
      self.get_current_device = torch.cuda.current_device
      self.set_current_device = torch.cuda.set_device
  
file_path: triton/python/triton/backends/driver.py
imports: from abc import ABCMeta, abstractmethod, abstractclassmethod
label_desc: Use image node_id 1 to create a new GPUDriver object from inherited base classes: DriverBase with example: obj = GPUDriver()