(weight, param)
| 300 | |
| 301 | |
| 302 | def fd_cast(weight, param): |
| 303 | if weight.dtype != param.dtype: |
| 304 | if weight.dtype == paddle.int8 and param.dtype == paddle.float8_e4m3fn: |
| 305 | weight = weight.view(param.dtype) |
| 306 | else: |
| 307 | weight = weight.cast(param.dtype) |
| 308 | return weight |
| 309 | |
| 310 | |
| 311 | def default_weight_loader(fd_config: FDConfig = None) -> None: |
no outgoing calls
no test coverage detected