MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / sync_device

Function sync_device

tests/ace_step/ace_step_python_warm_bench.py:107–113  ·  view source on GitHub ↗
(device: str)

Source from the content-addressed store, hash-verified

105
106
107def sync_device(device: str) -> None:
108 if device == "cuda" and torch.cuda.is_available():
109 torch.cuda.synchronize()
110 elif device == "xpu" and hasattr(torch, "xpu") and torch.xpu.is_available():
111 torch.xpu.synchronize()
112 elif device == "mps" and hasattr(torch, "mps") and hasattr(torch.mps, "synchronize"):
113 torch.mps.synchronize()
114
115
116def install_controlled_vae_encode_noise(noise_file: str) -> None:

Callers 1

run_requestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected