浏览代码

_

/exp-vince/sep30-2020
vincentpierre 4 年前
当前提交
022c52de
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 5
      ml-agents/mlagents/torch_utils/cpu_utils.py

5
ml-agents/mlagents/torch_utils/cpu_utils.py


period = _read_in_integer_file("/sys/fs/cgroup/cpu/cpu.cfs_period_us")
logger.info("period "+str(period))
quota = _read_in_integer_file("/sys/fs/cgroup/cpu/cpu.cfs_quota_us")
logger.info("quota "+str(quota))
logger.info("quota " + str(quota))
shares = _read_in_integer_file("/sys/fs/cgroup/cpu/cpu.shares")
logger.info("shares "+str(shares))
if period > 0 and quota > 0:
return int(quota // period)
else:

正在加载...
取消
保存