Skip to content

Commit 17c126f

Browse files
authored
LLVM_ENABLE_RUNTIMES=flang-rt for flang-runtime-cuda-* (#393)
Add `depends_on_projects=['flang-rt']` to the flang-runtime-cuda-gcc and flang-runtime-cuda-clang builders. This prepares the removal of the "projects" build of the flang runtime in llvm/llvm-project#124126. Affected builders: * flang-runtime-cuda-gcc This previously only built the runtime using the top-level CMakeLists.txt in `flang/runtime/CMakeLists.txt`. This is going to be replaced with the "standalone runtimes build", with the top-level `runtimes/CMakeLists.txt`. This still needs Flang to successed, hence replacing with a bootstrap-build where the `FLANG_RT_*` options are internally forwarded to the runtimes build. * flang-runtime-cuda-clang This is a manual bootstrapping build which first compiles Clang, then the runtime out-of-tree. This is replaced with a standalone runtimes build as described above. Because it needs Flang, also adding Flang to the enabled projects of the stage1 build. Neither build runs the `check-*` targets, probably due to the lack of actual CUDA hardware which running the runtime unittests require. Affected workers: * as-builder-7
1 parent 38652a6 commit 17c126f

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

buildbot/osuosl/master/config/builders.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -3204,17 +3204,16 @@
32043204
'workernames' : ["as-builder-7"],
32053205
'builddir': "flang-runtime-cuda-gcc",
32063206
'factory' : UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory(
3207-
depends_on_projects=["flang"],
3207+
depends_on_projects=["llvm","clang","mlir","flang","flang-rt"],
32083208
clean=True,
32093209
checks=[],
3210-
src_to_build_dir="flang/runtime",
3211-
targets=["FortranRuntime"],
3210+
targets=["flang-rt"],
32123211
extra_configure_args=[
32133212
"-DCMAKE_BUILD_TYPE=Release",
32143213
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
32153214
"-DLLVM_ENABLE_ASSERTIONS=ON",
32163215
"-DBUILD_SHARED_LIBS=OFF",
3217-
"-DFLANG_EXPERIMENTAL_CUDA_RUNTIME=ON",
3216+
"-DFLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT=CUDA",
32183217
"-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc",
32193218
"-DCMAKE_CXX_COMPILER=/usr/bin/g++",
32203219
"-DCMAKE_C_COMPILER=/usr/bin/gcc",
@@ -3224,7 +3223,7 @@
32243223
"-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache",
32253224
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",
32263225
"-DCMAKE_C_COMPILER_LAUNCHER=ccache",
3227-
util.Interpolate("-DFLANG_LIBCUDACXX_PATH=%(prop:nv_cccl_root_path)s/libcudacxx"),
3226+
util.Interpolate("-DFLANG_RT_LIBCUDACXX_PATH=%(prop:nv_cccl_root_path)s/libcudacxx"),
32283227
],
32293228
env={
32303229
'CCACHE_DIR' : util.Interpolate("%(prop:builddir)s/ccache-db"),
@@ -3241,8 +3240,8 @@
32413240
clean = True,
32423241
stages = [
32433242
dict(
3244-
name = "clang",
3245-
depends_on_projects = ["llvm", "clang", "clang-tools-extra", "lld", "openmp"],
3243+
name = "flang",
3244+
depends_on_projects = ["llvm", "clang", "flang", "clang-tools-extra", "lld", "openmp"],
32463245
enable_runtimes = ["compiler-rt"],
32473246
cmake_definitions = {
32483247
"LLVM_CCACHE_BUILD" : "ON",
@@ -3251,23 +3250,24 @@
32513250
"LLVM_TARGETS_TO_BUILD" : "Native",
32523251
"CLANG_DEFAULT_LINKER" : "lld",
32533252
},
3254-
install_dir = "install-clang",
3253+
install_dir = "install-flang",
32553254
env = {
32563255
'CCACHE_DIR' : util.Interpolate("%(prop:builddir)s/ccache-db"),
32573256
},
32583257
),
32593258
dict(
3260-
name = "flang-runtime",
3261-
depends_on_projects = ["flang"],
3259+
name = "flang-rt",
3260+
depends_on_projects = ["flang-rt"],
32623261
cmake_definitions = {
32633262
"CMAKE_BUILD_TYPE" : "Release",
3264-
"CMAKE_C_COMPILER" : util.Interpolate("%(prop:builddir)s/install-clang/bin/clang"),
3265-
"CMAKE_CXX_COMPILER" : util.Interpolate("%(prop:builddir)s/install-clang/bin/clang++"),
3266-
"FLANG_EXPERIMENTAL_OMP_OFFLOAD_BUILD" : "host_device",
3267-
"FLANG_OMP_DEVICE_ARCHITECTURES" : "sm_50;sm_60;sm_70;sm_80",
3263+
"CMAKE_C_COMPILER" : util.Interpolate("%(prop:builddir)s/install-flang/bin/clang"),
3264+
"CMAKE_CXX_COMPILER" : util.Interpolate("%(prop:builddir)s/install-flang/bin/clang++"),
3265+
"CMAKE_Fortran_COMPILER" : util.Interpolate("%(prop:builddir)s/install-flang/bin/flang"),
3266+
"CMAKE_Fortran_COMPILER_WORKS" : "ON",
3267+
"FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT" : "OpenMP",
3268+
"FLANG_RT_OMP_DEVICE_ARCHITECTURES" : "sm_50;sm_60;sm_70;sm_80",
32683269
},
3269-
targets = ["FortranRuntime"],
3270-
src_to_build_dir = "flang/runtime",
3270+
src_to_build_dir = "runtimes",
32713271
),
32723272
],
32733273
env = {

0 commit comments

Comments
 (0)