              if os.path.isfile(checkfile):
                  cudnn_checkfile = checkfile
                  break
          if not cudnn_checkfile:
              self.output.error("cuDNN not found. See "
                                "https://github.com/deepfakes/faceswap/blob/master/INSTALL.md#cudnn "
                                "for instructions")
              return
          found = 0
          with open(cudnn_checkfile, "r") as ofile:
              for line in ofile:
                  if line.lower().startswith("#define cudnn_major"):
 
</s> remove         if self._is_linux:
            cudnn_checkfiles = self._cudnn_checkfiles_linux()
        elif self._is_windows:
            cudnn_checkfiles = self._cudnn_checkfiles_windows()
        else:
            retval = "Unsupported OS"
            if self._is_conda:
                retval += ". Check Conda packages for Conda cuDNN"
            return retval

        cudnn_checkfile = None
        for checkfile in cudnn_checkfiles:
            if os.path.isfile(checkfile):
                cudnn_checkfile = checkfile
                break

        if not cudnn_checkfile:
            retval = "No global version found"
            if self._is_conda:
                retval += ". Check Conda packages for Conda cuDNN"
            return retval

        found = 0
        with open(cudnn_checkfile, "r") as ofile:
            for line in ofile:
                if line.lower().startswith("#define cudnn_major"):
                    major = line[line.rfind(" ") + 1:].strip()
                    found += 1
                elif line.lower().startswith("#define cudnn_minor"):
                    minor = line[line.rfind(" ") + 1:].strip()
                    found += 1
                elif line.lower().startswith("#define cudnn_patchlevel"):
                    patchlevel = line[line.rfind(" ") + 1:].strip()
                    found += 1
                if found == 3:
                    break
        if found != 3:
 </s> add         retval = self._cuda_check.cudnn_version
        if not retval: </s> remove         self.env.cuda_version = cuda_keys[0].lower().replace("cuda_path_v", "").replace("_", ".")
        self.env.cuda_path = os.environ[cuda_keys[0]]
        self.output.info("CUDA version: " + self.env.cuda_version)

    def cudnn_check(self):
        """ Check Linux or Windows cuDNN Version from cudnn.h """
        if self.env.os_version[0] == "Linux":
            cudnn_checkfiles = self.cudnn_checkfiles_linux()
        elif self.env.os_version[0] == "Windows":
            if not self.env.cuda_path and not self.cuda_keys_windows:
                self.output.error(
                    "CUDA not found. See "
                    "https://github.com/deepfakes/faceswap/blob/master/INSTALL.md#cuda "
                    "for instructions")
                return
            if not self.env.cuda_path:
                self.env.cuda_path = os.environ[self.cuda_keys_windows[0]]
            cudnn_checkfiles = self.cudnn_checkfiles_windows()

        cudnn_checkfile = None
        for checkfile in cudnn_checkfiles:
            if os.path.isfile(checkfile):
                cudnn_checkfile = checkfile
                break
 </s> add     def _cudnn_check(self):
        """ Check Linux or Windows cuDNN Version from cudnn.h and add to :attr:`cudnn_version`. """
        cudnn_checkfiles = getattr(self, f"_get_checkfiles_{self._os}")()
        cudnn_checkfile = next((hdr for hdr in cudnn_checkfiles if os.path.isfile(hdr)), None) </s> remove         if found != 3:
            self.output.error("cuDNN version could not be determined. See "
                              "https://github.com/deepfakes/faceswap/blob/master/INSTALL.md#cudnn "
                              "for instructions")
 </s> add         if found != 3:  # Full version could not be determined </s> remove             self.cuda_check()
            self.cudnn_check()
 </s> add             check = CudaCheck()
            if check.cuda_version:
                self.env.cuda_version = check.cuda_version
                self.output.info("CUDA version: " + self.env.cuda_version)
            else:
                self.output.error("CUDA not found. Install and try again.\n"
                                  "Recommended version:      CUDA 10.1     cuDNN 7.6\n"
                                  "CUDA: https://developer.nvidia.com/cuda-downloads\n"
                                  "cuDNN: https://developer.nvidia.com/rdp/cudnn-download")
                return

            if check.cudnn_version:
                self.env.cudnn_version = ".".join(check.cudnn_version.split(".")[:2])
                self.output.info(f"cuDNN version: {self.env.cudnn_version}")
            else:
                self.output.error("cuDNN not found. See "
                                  "https://github.com/deepfakes/faceswap/blob/master/INSTALL.md#"
                                  "cudnn for instructions")
                return </s> remove         self.env.cuda_version = cudavers[:cudavers.find(" ")]
        if self.env.cuda_version:
            self.output.info("CUDA version: " + self.env.cuda_version)
            self.env.cuda_path = chk[chk.find("=>") + 3:chk.find("targets") - 1]

    def cuda_check_windows(self):
        """ Check Windows CUDA Version """
        cuda_keys = self.cuda_keys_windows
        if not cuda_keys:
            self.output.error("CUDA not found. See "
                              "https://github.com/deepfakes/faceswap/blob/master/INSTALL.md#cuda "
                              "for instructions")
 </s> add         self.cuda_version = cudavers[:cudavers.find(" ")]
        self.cuda_path = chk[chk.find("=>") + 3:chk.find("targets") - 1]

    def _cuda_check_windows(self):
        """ Check Windows CUDA Version and path from Environment Variables"""
        if not self._cuda_keys:  # Cuda environment variable not found
              if os.path.isfile(checkfile):
                  cudnn_checkfile = checkfile
                  break
          if not cudnn_checkfile:



              return
          found = 0
          with open(cudnn_checkfile, "r") as ofile:
              for line in ofile:
                  if line.lower().startswith("#define cudnn_major"):
keep keep keep keep replace replace replace keep keep keep keep keep
 sysinfo/setup - Standardize cuda/cudnn checks 
setup.py