          self._backends: Dict[str, ValidBackends] = {"1": "cpu",
                                                      "2": "directml",
                                                      "3": "nvidia",
                                                      "4": "apple_silicon",
                                                      "5": "amd"}
          self._valid_backends = list(self._backends.values())
          self._config_file = self._get_config_file()
          self.backend = self._get_backend()
  
      @classmethod
 
</s> remove ValidBackends = Literal["amd", "nvidia", "cpu", "apple_silicon", "directml"]
 </s> add ValidBackends = Literal["amd", "nvidia", "cpu", "apple_silicon", "directml", "rocm"] </s> remove         self.backend: Optional[Literal["nvidia", "amd", "apple_silicon", "directml", "cpu"]] = None
 </s> add         self.backend: Optional[Literal["nvidia", "amd", "apple_silicon",
                                       "directml", "cpu", "rocm"]] = None </s> remove     _backends = (("nvidia", "amd", "apple_silicon", "directml", "cpu"))
 </s> add     _backends = (("nvidia", "amd", "apple_silicon", "directml", "rocm", "cpu")) </s> remove     def update_tf_dep(self) -> None:
        """ Update Tensorflow Dependency """
        if self.is_conda or self.backend != "nvidia":
            # CPU/AMD doesn't need Cuda and Conda handles Cuda and cuDNN so nothing to do here
 </s> add     def _update_tf_dep_nvidia(self) -> None:
        """ Update the Tensorflow dependency for global Cuda installs """
        if self.is_conda:  # Conda handles Cuda and cuDNN so nothing to do here
                                                    "5": "rocm",
                                                    "6": "amd"}
          self._backends: Dict[str, ValidBackends] = {"1": "cpu",
                                                      "2": "directml",
                                                      "3": "nvidia",
                                                      "4": "apple_silicon",
                                                    "5": "rocm",
                                                    "6": "amd"}
          self._valid_backends = list(self._backends.values())
          self._config_file = self._get_config_file()
          self.backend = self._get_backend()
  
      @classmethod
keep keep keep keep replace keep keep keep keep keep
 Linux - ROCm (AMD) support 
lib/utils.py