Validate that a parameter is a static integer (not a Slot/SymInt). Raises NotImplementedError if the value is dynamic. Args: value: The parameter value to check param_name: Name of the parameter (for error message) op_name: Name of the operation (for error mess
(value: Any, param_name: str, op_name: str)
| 163 | |
| 164 | |
| 165 | def require_static_int(value: Any, param_name: str, op_name: str) -> None: |
| 166 | """ |
| 167 | Validate that a parameter is a static integer (not a Slot/SymInt). |
| 168 | |
| 169 | Raises NotImplementedError if the value is dynamic. |
| 170 | |
| 171 | Args: |
| 172 | value: The parameter value to check |
| 173 | param_name: Name of the parameter (for error message) |
| 174 | op_name: Name of the operation (for error message) |
| 175 | """ |
| 176 | if isinstance(value, Slot) or not isinstance(value, int): |
| 177 | raise NotImplementedError( |
| 178 | f"{op_name} with dynamic {param_name} is not supported. " |
| 179 | f"{param_name} requires a static int32 value, but got {value} (type={type(value).__name__})." |
| 180 | ) |
| 181 | |
| 182 | |
| 183 | def require_static_float(value: Any, param_name: str, op_name: str) -> None: |
no outgoing calls
no test coverage detected