mirror of
https://github.com/RosettaCommons/RFdiffusion.git
synced 2026-06-04 18:44:21 +08:00
Add verbose checking for GPU
This commit is contained in:
committed by
Joseph Watson/Watchwell
parent
6adcf18465
commit
92b83decf3
@@ -41,6 +41,15 @@ def main(conf: HydraConfig) -> None:
|
||||
if conf.inference.deterministic:
|
||||
make_deterministic()
|
||||
|
||||
# Check for available GPU and print result of check
|
||||
if torch.cuda.is_available():
|
||||
device_name = torch.cuda.get_device_name(torch.cuda.current_device())
|
||||
log.info(f"Found GPU with device_name {device_name}. Will run RFdiffusion on {device_name}")
|
||||
else:
|
||||
log.info("////////////////////////////////////////////////")
|
||||
log.info("///// NO GPU DETECTED! Falling back to CPU /////")
|
||||
log.info("////////////////////////////////////////////////")
|
||||
|
||||
# Initialize sampler and target/contig.
|
||||
sampler = iu.sampler_selector(conf)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user