def _infer_target_arch(self, fail_on_unsupported: bool = True) -> str:
        """Infer the target architecture from the SDK root path based on platform and processor."""
        system = platform.system()
        target_arch = None
        if system == OS.LINUX:
            machine = platform.machine()
            if machine == "x86_64":
                target_arch = SDKTargetDevice.x86_64_linux
            else:
                if fail_on_unsupported:
                    raise ValueError(f"Unsupported machine {machine} on system {system}")
        elif system == OS.WINDOWS:
            processor_identifier = os.environ.get("PROCESSOR_IDENTIFIER", "")
            if "ARM" in processor_identifier:
                target_arch = SDKTargetDevice.arm64x_windows
            elif "AARCH" in processor_identifier:
                target_arch = SDKTargetDevice.aarch64_windows
            else:
                target_arch = SDKTargetDevice.x86_64_windows
        else:
            if fail_on_unsupported:
                raise ValueError(f"Unsupported system {system}")
        try:
            target_arch = self._verify_target_arch(target_arch)
        except FileNotFoundError:
            if fail_on_unsupported:
                raise
            else:
                target_arch = None

        return target_arch
Infer the target architecture from the SDK root path based on platform and processor.
olive/platform_sdk/qualcomm/env.py