浏览代码

Changes for experiment

/develop/adjust-cpu-settings-experiment
Ervin Teng 4 年前
当前提交
8fa04c86
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ml-agents/mlagents/torch_utils/torch.py

4
ml-agents/mlagents/torch_utils/torch.py


import torch # noqa I201
if "TORCH_NUM_THREADS" in os.environ:
torch.set_num_threads(int(os.environ.get('TORCH_NUM_THREADS')))
torch.set_num_threads(int(os.environ.get("TORCH_NUM_THREADS")))
torch.set_num_threads(int(os.environ.get('TORCH_NUM_INTEROP')))
torch.set_num_interop_threads(int(os.environ.get("TORCH_NUM_INTEROP")))
# torch.set_num_interop_threads(4)
# os.environ["KMP_AFFINITY"] = "granularity=fine,compact,1,0"
# os.environ["KMP_BLOCKTIME"] = "1"

正在加载...
取消
保存