(self, modules=None)
| 190 | |
| 191 | def to_cuda_async(self, non_blocking=True): |
| 192 | for name, param in self._parameters.items(): |
| 193 | if param is not None: |
| 194 | if hasattr(param, "cuda"): |
| 195 | self._parameters[name] = param.to(AI_DEVICE, non_blocking=non_blocking) |
| 196 | elif hasattr(param, "to_cuda"): |
| 197 | self._parameters[name].to_cuda(non_blocking=True) |
| 198 | setattr(self, name, self._parameters[name]) |
| 199 | for module in self._modules.values(): |
| 200 | if isinstance(module, WeightModuleList): |