CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
72 lines
2.5 KiB
Plaintext
72 lines
2.5 KiB
Plaintext
import sys
|
|
import os
|
|
import re
|
|
|
|
config.hipify_install_path = "@CMAKE_INSTALL_PREFIX@"
|
|
config.hipify_clang_tests_only = "@HIPIFY_CLANG_TESTS_ONLY@"
|
|
config.pointer_size = @CMAKE_SIZEOF_VOID_P@
|
|
config.llvm_version = "@LLVM_PACKAGE_VERSION@"
|
|
config.llvm_version_major = int("@LLVM_VERSION_MAJOR@")
|
|
config.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@"
|
|
config.obj_root = "@CMAKE_CURRENT_BINARY_DIR@"
|
|
config.cuda_root = "@CUDA_TOOLKIT_ROOT_DIR@"
|
|
config.cuda_sdk_root = "@CUDA_SDK_ROOT_DIR@"
|
|
config.cuda_dnn_root = "@CUDA_DNN_ROOT_DIR@"
|
|
config.cuda_cub_root = "@CUDA_CUB_ROOT_DIR@"
|
|
config.cuda_tensor_root = "@CUDA_TENSOR_ROOT_DIR@"
|
|
config.cuda_file_root = "@CUDA_FILE_ROOT_DIR@"
|
|
config.cuda_version_major = int("@CUDA_VERSION_MAJOR@")
|
|
config.cuda_version_minor = int("@CUDA_VERSION_MINOR@")
|
|
config.cuda_version_full = "@CUDA_VERSION_FULL@"
|
|
config.cuda_version = "@CUDA_VERSION@"
|
|
config.clang_resource_dir = "@HIPIFY_CLANG_RES@"
|
|
if sys.platform in ['win32']:
|
|
config.build_type = "@CMAKE_BUILD_TYPE@"
|
|
if not config.build_type:
|
|
config.build_type = "Debug"
|
|
|
|
pattern_major = r'_MAJOR ([1-9]|1[0-9])'
|
|
|
|
def get_lib_major_ver(file_name):
|
|
if os.path.isfile(file_name):
|
|
with open(file_name, 'r') as f:
|
|
match = re.search(pattern_major, f.read())
|
|
if match:
|
|
s = match.group(0)[7:]
|
|
return int(s)
|
|
return 0
|
|
|
|
def get_cudnn_major_ver():
|
|
ver_file = config.cuda_dnn_root + '/cudnn_version.h'
|
|
ver = get_lib_major_ver(ver_file)
|
|
if ver == 0:
|
|
ver_file = config.cuda_dnn_root + '/cudnn_version_v9.h'
|
|
ver = get_lib_major_ver(ver_file)
|
|
if ver == 0:
|
|
ver_file = config.cuda_dnn_root + '/cudnn_version_v999.h'
|
|
ver = get_lib_major_ver(ver_file)
|
|
return int(ver)
|
|
|
|
def get_cutensor_major_ver():
|
|
ver_file = config.cuda_tensor_root + '/cutensor.h'
|
|
ver = get_lib_major_ver(ver_file)
|
|
if ver == 0:
|
|
ver = 1
|
|
return ver
|
|
|
|
if config.cuda_dnn_root and config.cuda_dnn_root != "OFF":
|
|
config.cudnn_version_major = get_cudnn_major_ver()
|
|
|
|
if config.cuda_tensor_root and config.cuda_tensor_root != "OFF":
|
|
config.cutensor_version_major = get_cutensor_major_ver()
|
|
|
|
# Support substitution of the tools and libs dirs with user parameters. This is
|
|
# used when we can't determine the tool dir at configuration time.
|
|
try:
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
|
config.obj_root = config.obj_root % lit_config.params
|
|
except KeyError:
|
|
e = sys.exc_info()[1]
|
|
key, = e.args
|
|
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|