Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion android_env/components/config_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""Dataclass definitions used for instantiating AndroidEnv components."""

import dataclasses
import enum


@dataclasses.dataclass
Expand Down Expand Up @@ -79,6 +80,15 @@ class SimulatorConfig:
interaction_rate_sec: float = 0.0


@enum.unique
class GPUMode(enum.Enum):
"""Emulator GPU Mode."""

HOST = 'host'
SWANGLE_INDIRECT = 'swangle_indirect'
SWIFTSHADER_INDIRECT = 'swiftshader_indirect'


@dataclasses.dataclass
class EmulatorLauncherConfig:
"""Config class for EmulatorLauncher."""
Expand All @@ -104,7 +114,7 @@ class EmulatorLauncherConfig:
# GPU mode override.
# Please see
# https://developer.android.com/studio/run/emulator-acceleration#accel-graphics.
gpu_mode: str = 'swangle_indirect' # Alternative: swiftshader_indirect, host
gpu_mode: str = GPUMode.SWANGLE_INDIRECT.value
# Whether to run in headless mode (i.e. without a graphical window).
run_headless: bool = True
# Whether to restrict network access.
Expand Down