mirror of
https://github.com/jung-geun/PSO.git
synced 2026-09-20 14:11:48 +09:00
feat(research): support CUDA convergence runs
Allow the sealed ResNet and YOLO convergence protocol to run unchanged on the remote NVIDIA accelerator while retaining CPU and MPS support. Constraint: Preserve fixed seeds, exact workloads, and one-device-per-run semantics Rejected: Reuse mixed MPS and CUDA results | invalid cross-device production matrix Confidence: high Scope-risk: narrow Not-tested: Full production matrix on RTX 3080 Ti
This commit is contained in:
@@ -790,8 +790,10 @@ class ResNetConvergenceAdapter:
|
||||
self.data_root = Path(data_root)
|
||||
self.device = torch.device(device)
|
||||
self.allow_download = bool(allow_download)
|
||||
if str(self.device) not in {"cpu", "mps"}:
|
||||
raise ProtocolError("ResNet device must be cpu or mps")
|
||||
if str(self.device) not in {"cpu", "mps", "cuda"}:
|
||||
raise ProtocolError(
|
||||
"ResNet device must be cpu, mps, or cuda"
|
||||
)
|
||||
|
||||
def _result_path(self) -> Path:
|
||||
return self.run_root / "workloads" / self.workload_id / "result.json"
|
||||
|
||||
Reference in New Issue
Block a user