Skip to content

Commit

Permalink
remove device_map restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jan 31, 2025
1 parent 92cd2b2 commit abc587c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions optimum_benchmark/backends/pytorch/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from ...system_utils import is_rocm_system
from ..config import BackendConfig

DEVICE_MAPS = ["auto", "sequential"]
AMP_DTYPES = ["bfloat16", "float16"]
TORCH_DTYPES = ["bfloat16", "float16", "float32", "auto"]

Expand Down Expand Up @@ -60,9 +59,6 @@ def __post_init__(self):
"Please remove it from the `model_kwargs` and set it in the backend config directly."
)

if self.device_map is not None and self.device_map not in DEVICE_MAPS:
raise ValueError(f"`device_map` must be one of {DEVICE_MAPS}. Got {self.device_map} instead.")

if self.torch_dtype is not None and self.torch_dtype not in TORCH_DTYPES:
raise ValueError(f"`torch_dtype` must be one of {TORCH_DTYPES}. Got {self.torch_dtype} instead.")

Expand Down

0 comments on commit abc587c

Please sign in to comment.