Caffe2 - Python API
A deep learning, cross platform ML framework
Packages
Classes
Files
C++ API
Python API
GitHub
File List
tools
setup_helpers
rocm.py
1
import
os
2
from
.env
import
check_env_flag, check_negative_env_flag
3
4
# Get ROCm Home Path
5
ROCM_HOME = os.getenv(
"ROCM_HOME"
,
"/opt/rocm"
)
6
ROCM_VERSION =
""
7
USE_ROCM =
False
8
9
# Check if ROCm disabled.
10
if
check_negative_env_flag(
"USE_ROCM"
):
11
USE_ROCM =
False
12
else
:
13
# If ROCM home exists or we explicitly enable ROCm
14
if
os.path.exists(ROCM_HOME)
or
check_env_flag(
'USE_ROCM'
):
15
USE_ROCM =
True
Generated on Thu Mar 21 2019 13:06:37 for Caffe2 - Python API by
1.8.11