def _fill_accelerators(self):
        """Fill the accelerators including device and execution providers in the system config.

        * If the device is specified but the execution providers are not, fill the execution providers based on the
        installed ORT for local/python system.
        * If the execution providers are specified but the device is not, fill the device based on the installed ORT.
        """
        for accelerator in self.system_config.config.accelerators:
            if not accelerator.device:
                # User does not specify the device but providing the execution providers
                assert accelerator.execution_providers, "The execution providers are not specified."
                inferred_device = AcceleratorLookup.infer_single_device_from_execution_providers(
                    accelerator.execution_providers
                )
                logger.info("the accelerator device is not specified. Inferred device: %s.", inferred_device)
                accelerator.device = inferred_device
            elif not accelerator.execution_providers:
                # User specify the device but missing the execution providers
                if str(accelerator.device).lower() == "cpu":
                    execution_providers = ["CPUExecutionProvider"]
                elif str(accelerator.device).lower() == "gpu":
                    execution_providers = ["CUDAExecutionProvider"]
                else:
                    raise ValueError(
                        f"Please specify the execution providers for the device: {accelerator.device}.",
                    )
                accelerator.execution_providers = execution_providers
                filtered_eps = [ep for ep in self.system_supported_eps if ep not in execution_providers]
                if filtered_eps:
                    logger.warning(
                        "The following execution providers are filtered: %s. "
                        "Please add the specific execution provider to the config if you want to enable it. ",
                        ",".join(filtered_eps),
                    )

                logger.info(
                    "The accelerator execution providers is not specified for %s. Use the inferred ones. %s",
                    accelerator.device,
                    accelerator.execution_providers,
                )
            else:
                logger.debug("The accelerator device and execution providers are specified, skipping deduce.")
Fill the accelerators including device and execution providers in the system config.

        * If the device is specified but the execution providers are not, fill the execution providers based on the
        installed ORT for local/python system.
        * If the execution providers are specified but the device is not, fill the device based on the installed ORT.
        
olive/systems/accelerator_creator.py