  
  class CudaCheck():  # pylint:disable=too-few-public-methods
      """ Find the location of system installed Cuda and cuDNN on Windows and Linux. """
  
      def __init__(self):
          self.cuda_path = None
          self.cuda_version = None
          self.cudnn_version = None
  
          self._os = platform.system().lower()
          self._cuda_keys = [key for key in os.environ if key.lower().startswith("cuda_path_v")]
          self._cudnn_header_files = ["cudnn_version.h", "cudnn.h"]
  
 
</s> remove         self._os = platform.system().lower()
        self._cuda_keys = [key for key in os.environ if key.lower().startswith("cuda_path_v")]
        self._cudnn_header_files = ["cudnn_version.h", "cudnn.h"]
 </s> add         self._os: str = platform.system().lower()
        self._cuda_keys: List[str] = [key
                                      for key in os.environ
                                      if key.lower().startswith("cuda_path_v")]
        self._cudnn_header_files: List[str] = ["cudnn_version.h", "cudnn.h"] </s> remove     def _cuda_check_windows(self):
 </s> add     def _cuda_check_windows(self) -> None: </s> remove     def _get_checkfiles_linux(self):
 </s> add     def _get_checkfiles_linux(self) -> List[str]: </s> remove             self.cuda_version = version.groupdict().get("cuda", None)
 </s> add             if version is not None:
                self.cuda_version = version.groupdict().get("cuda", None) </s> remove     def _cuda_check(self):
 </s> add     def _cuda_check(self) -> None:
    def __init__(self) -> None:
        self.cuda_path: Optional[str] = None
        self.cuda_version: Optional[str] = None
        self.cudnn_version: Optional[str] = None
  
  class CudaCheck():  # pylint:disable=too-few-public-methods
      """ Find the location of system installed Cuda and cuDNN on Windows and Linux. """
  
    def __init__(self) -> None:
        self.cuda_path: Optional[str] = None
        self.cuda_version: Optional[str] = None
        self.cudnn_version: Optional[str] = None
    def __init__(self) -> None:
        self.cuda_path: Optional[str] = None
        self.cuda_version: Optional[str] = None
        self.cudnn_version: Optional[str] = None
    def __init__(self) -> None:
        self.cuda_path: Optional[str] = None
        self.cuda_version: Optional[str] = None
        self.cudnn_version: Optional[str] = None
    def __init__(self) -> None:
        self.cuda_path: Optional[str] = None
        self.cuda_version: Optional[str] = None
        self.cudnn_version: Optional[str] = None
  
          self._os = platform.system().lower()
          self._cuda_keys = [key for key in os.environ if key.lower().startswith("cuda_path_v")]
          self._cudnn_header_files = ["cudnn_version.h", "cudnn.h"]
  
keep keep keep keep replace replace replace replace keep keep keep keep keep
 pin protobuf

Setup: automatically detect for apple-silicon 
setup.py