CELL-FM / cell_fm /utils /dist_utils.py
BoHuangLab's picture
CELL-FM CondenSeq demo: sequence -> titration curve, AUC and AAC
e794567 verified
Raw History Blame Contribute Delete
411 Bytes
# -*- coding: utf-8 -*-
import os
import torch
def is_master_node():
if "RANK" not in os.environ or int(os.environ["RANK"]) == 0:
return True
else:
return False
def support_flash_attntion():
# check the GPU is A100 or H100
device_name = torch.cuda.get_device_name(0)
for name in ["A100", "H100"]:
if name in device_name:
return True
return False