class_docstr: The GPU spec
  
  Attributes:
      name (Optional[str]): The name of the GPU (e.g., `"A100"` or `"H100"`)
      count (int): The minimum number of GPUs
      memory (Optional[str]): The minimum size of a single GPU memory (e.g., `"16GB"`)
      total_memory (Optional[str]): The minimum total size of all GPUs memory (e.g., `"32GB"`)
      compute_capability (float): The minimum compute capability of the GPU (e.g., `7.5`)
class_docstr_tok: ["The","GPU","spec","Attributes",":","name","(","Optional","[","str","]",")",":","The","name","of","the","GPU","(","e.g.",",","`","``","A100","''","`","or","`","``","H100","''","`",")","count","(","int",")",":","The","minimum","number","of","GPUs","memory","(","Optional","[","str","]",")",":","The","minimum","size","of","a","single","GPU","memory","(","e.g.",",","`","``","16GB","''","`",")","total_memory","(","Optional","[","str","]",")",":","The","minimum","total","size","of","all","GPUs","memory","(","e.g.",",","`","``","32GB","''","`",")","compute_capability","(","float",")",":","The","minimum","compute","capability","of","the","GPU","(","e.g.",",","`","7.5","`",")"]
code: def _validate_cc(
      cls, v: Optional[Union[float, str, Tuple[int, int]]]
  ) -> Optional[Tuple[int, int]]:
      if isinstance(v, float):
          v = str(v)
      if isinstance(v, str):
          m = re.fullmatch(r"(\d+)\.(\d+)", v)
          if not m:
              raise ValueError(f"Invalid compute capability: {v}")
          v = (int(m.group(1)), int(m.group(2)))
      return v
  
imports: import re
  from enum import Enum
  from typing import List, Optional, Tuple, Union
  from pydantic import Field, confloat, root_validator, validator
  from typing_extensions import Annotated, Literal
  from dstack._internal.core.models.backends.base import BackendType
  from dstack._internal.core.models.common import ForbidExtra
label_desc: Use image node_id 2 for calling the ProfileGPU obj's underlying member method code with example usage: obj._validate_cc(cls, v) and returns: v