Skip to content

Commit 77d1a1d

Browse files
authored
Update configuration for flang-runtime-cuda-clang/gcc builders. (#440)
Reduce memory usage when compiling the Flang related source code by specifying FLANG_PARALLEL_COMPILE_JOBS=12 for both builders. Switch to one stage 'flang-rt' build on flang-runtime-cuda-clang builder.
1 parent 1015a0b commit 77d1a1d

File tree

1 file changed

+24
-37
lines changed

1 file changed

+24
-37
lines changed

buildbot/osuosl/master/config/builders.py

Lines changed: 24 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,7 +3262,8 @@
32623262
'workernames' : ["as-builder-7"],
32633263
'builddir': "flang-runtime-cuda-gcc",
32643264
'factory' : UnifiedTreeBuilder.getCmakeExBuildFactory(
3265-
depends_on_projects = ["llvm", "clang", "mlir", "flang", "flang-rt"],
3265+
depends_on_projects = ["llvm", "clang", "mlir", "flang"],
3266+
enable_runtimes = ["flang-rt", "openmp"],
32663267
clean = True,
32673268
checks = [],
32683269
targets = ["flang-rt"],
@@ -3272,6 +3273,7 @@
32723273
"LLVM_ENABLE_ASSERTIONS" : "ON",
32733274
"BUILD_SHARED_LIBS" : "OFF",
32743275
"FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT" : "CUDA",
3276+
"FLANG_PARALLEL_COMPILE_JOBS" : 12,
32753277
"CMAKE_CUDA_COMPILER" : "/usr/local/cuda/bin/nvcc",
32763278
"CMAKE_CXX_COMPILER" : "/usr/bin/g++",
32773279
"CMAKE_C_COMPILER" : "/usr/bin/gcc",
@@ -3295,45 +3297,30 @@
32953297
'tags' : ["flang", "runtime"],
32963298
'workernames' : ["as-builder-7"],
32973299
'builddir': "flang-runtime-cuda-clang",
3298-
'factory' : StagedBuilder.getCmakeBuildFactory(
3300+
'factory' : UnifiedTreeBuilder.getCmakeExBuildFactory(
3301+
depends_on_projects = ["llvm", "clang", "lld", "flang"],
3302+
enable_runtimes = ["flang-rt", "openmp"],
32993303
clean = True,
3300-
stages = [
3301-
dict(
3302-
name = "flang",
3303-
depends_on_projects = ["llvm", "clang", "flang", "clang-tools-extra", "lld", "openmp"],
3304-
enable_runtimes = ["compiler-rt"],
3305-
cmake_definitions = {
3306-
"LLVM_CCACHE_BUILD" : "ON",
3307-
"LLVM_ENABLE_ASSERTIONS" : "ON",
3308-
"CMAKE_BUILD_TYPE" : "Release",
3309-
"LLVM_TARGETS_TO_BUILD" : "Native",
3310-
"CLANG_DEFAULT_LINKER" : "lld",
3311-
},
3312-
install_dir = "install-flang",
3313-
env = {
3314-
'CCACHE_DIR' : util.Interpolate("%(prop:builddir)s/ccache-db"),
3315-
},
3316-
),
3317-
dict(
3318-
name = "flang-rt",
3319-
depends_on_projects = ["flang-rt"],
3320-
cmake_definitions = {
3321-
"CMAKE_BUILD_TYPE" : "Release",
3322-
"CMAKE_C_COMPILER" : util.Interpolate("%(prop:builddir)s/install-flang/bin/clang"),
3323-
"CMAKE_CXX_COMPILER" : util.Interpolate("%(prop:builddir)s/install-flang/bin/clang++"),
3324-
"CMAKE_Fortran_COMPILER" : util.Interpolate("%(prop:builddir)s/install-flang/bin/flang"),
3325-
"CMAKE_Fortran_COMPILER_WORKS" : "ON",
3326-
"FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT" : "OpenMP",
3327-
"FLANG_RT_OMP_DEVICE_ARCHITECTURES" : "sm_50;sm_60;sm_70;sm_80",
3328-
},
3329-
src_to_build_dir = "runtimes",
3330-
),
3331-
],
3332-
jobs = 64,
3304+
checks = [],
3305+
cmake_definitions = {
3306+
"CMAKE_BUILD_TYPE" : "Release",
3307+
"CMAKE_EXPORT_COMPILE_COMMANDS" : "ON",
3308+
"LLVM_CCACHE_BUILD" : "ON",
3309+
"LLVM_ENABLE_ASSERTIONS" : "ON",
3310+
"LLVM_TARGETS_TO_BUILD" : "Native",
3311+
"CLANG_DEFAULT_LINKER" : "lld",
3312+
3313+
"FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT" : "OpenMP",
3314+
"FLANG_RT_DEVICE_ARCHITECTURES" : "sm_50;sm_60;sm_70;sm_80",
3315+
"FLANG_PARALLEL_COMPILE_JOBS" : 12,
3316+
"FLANG_RT_INCLUDE_CUF" : "OFF",
3317+
"FLANG_RT_INCLUDE_TESTS" : "OFF",
3318+
},
33333319
env = {
3320+
'CCACHE_DIR' : util.Interpolate("%(prop:builddir)s/ccache-db"),
33343321
# TMP/TEMP within the build dir (to utilize a ramdisk).
3335-
'TMP' : util.Interpolate("%(prop:builddir)s/%(prop:objrootdir)s"),
3336-
'TEMP' : util.Interpolate("%(prop:builddir)s/%(prop:objrootdir)s"),
3322+
'TMP' : util.Interpolate("%(prop:builddir)s/build"),
3323+
'TEMP' : util.Interpolate("%(prop:builddir)s/build"),
33373324
})},
33383325

33393326
## RISC-V RV64GC check-all running under qemu-user.

0 commit comments

Comments
 (0)