raiseValueError("ROCM support is enabled (USE_ROCM=True) but ROCM_HOME is not set or detected.")
raiseValueError(
"ROCM support is enabled (USE_ROCM=True) but ROCM_HOME is not set or detected.")
ifnotUSE_ROCMandnotCUDA_HOME:
raiseValueError("CUDA support is enabled by default (USE_ROCM=False) but CUDA_HOME is not set or detected.")
raiseValueError(
"CUDA support is enabled by default (USE_ROCM=False) but CUDA_HOME is not set or detected.")
# Ensure one of CUDA or ROCM is available
ifnot(CUDA_HOMEorROCM_HOME):
raiseValueError("Failed to automatically detect CUDA or ROCM installation. Please set the CUDA_HOME or ROCM_HOME environment variable manually (e.g., export CUDA_HOME=/usr/local/cuda or export ROCM_HOME=/opt/rocm).")
raiseValueError(
"Failed to automatically detect CUDA or ROCM installation. Please set the CUDA_HOME or ROCM_HOME environment variable manually (e.g., export CUDA_HOME=/usr/local/cuda or export ROCM_HOME=/opt/rocm)."
)
# TileLang only supports Linux platform
assertsys.platform.startswith("linux"),"TileLang only supports Linux platform (including WSL)."