()
| 5 | |
| 6 | |
| 7 | def get_device_id(): |
| 8 | use_cuda, _ = get_cuda() |
| 9 | if use_cuda: |
| 10 | if "CUDA_VISIBLE_DEVICES" in os.environ and os.environ["CUDA_VISIBLE_DEVICES"] != "": |
| 11 | GPU_ID = os.environ["CUDA_VISIBLE_DEVICES"].split(",")[0] |
| 12 | else: |
| 13 | GPU_ID = "0" |
| 14 | else: |
| 15 | GPU_ID = "" |
| 16 | return GPU_ID |
| 17 | |
| 18 | |
| 19 | def get_tests_path(): |
searching dependent graphs…