MCPcopy Create free account
hub / github.com/pytorch/executorch / require_static_ints

Function require_static_ints

backends/mlx/ops.py:201–218  ·  view source on GitHub ↗

Validate that all values in a list are static integers (not Slots/SymInts). Raises NotImplementedError if any value is dynamic. Args: values: List of values to check, or a single value param_name: Name of the parameter (for error message) op_name: Name of the o

(
    values: Union[List[Any], Any], param_name: str, op_name: str
)

Source from the content-addressed store, hash-verified

199
200
201def require_static_ints(
202 values: Union[List[Any], Any], param_name: str, op_name: str
203) -> None:
204 """
205 Validate that all values in a list are static integers (not Slots/SymInts).
206
207 Raises NotImplementedError if any value is dynamic.
208
209 Args:
210 values: List of values to check, or a single value
211 param_name: Name of the parameter (for error message)
212 op_name: Name of the operation (for error message)
213 """
214 if not isinstance(values, list):
215 values = [values]
216
217 for v in values:
218 require_static_int(v, param_name, op_name)
219
220
221def require_args(

Callers 1

_roll_handlerFunction · 0.85

Calls 1

require_static_intFunction · 0.85

Tested by

no test coverage detected