From 5e2c2d509fd4018c23841238f8ffa24010622067 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Thu, 28 May 2020 17:45:59 -0700 Subject: [PATCH 1/3] Add build bots for ml-driven optimization policies. --- buildbot/osuosl/master/config/builders.py | 37 +++++++++++++++++++++++ buildbot/osuosl/master/config/slaves.py | 8 +++++ buildbot/osuosl/master/config/status.py | 9 ++++++ 3 files changed, 54 insertions(+) diff --git a/buildbot/osuosl/master/config/builders.py b/buildbot/osuosl/master/config/builders.py index 2e0e0b970..7f1cb1de6 100644 --- a/buildbot/osuosl/master/config/builders.py +++ b/buildbot/osuosl/master/config/builders.py @@ -1646,6 +1646,43 @@ def _get_documentation_builders(): } ] +# Builders for ML-driven compiler optimizations. +def _get_ml_compiler_opt_builders(): + common_extra_args = ["-DCMAKE_BUILD_TYPE=Release", ] + return [ + {'name': "ml-opt-dev-x86_64", + 'mergeRequests': False, + 'slavenames':["ml-opt-dev-x86_64-b1"], + 'builddir':"ml-opt-dev-x86_64-b1", + 'factory': UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory( + clean=True, + depends_on_projects=['llvm'], + extra_configure_args=common_extra_args + [ + "-DTENSORFLOW_API_PATH=${TENSORFLOW_API_PATH}" + ])}, + {'name': "ml-opt-rel-x86_64", + 'mergeRequests': False, + 'slavenames':["ml-opt-rel-x86_64-b1"], + 'builddir':"ml-opt-rel-x86_64-b1", + 'factory': UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory( + clean=True, + depends_on_projects=['llvm'], + extra_configure_args=common_extra_args + [ + "-DTENSORFLOW_AOT_PATH=${TENSORFLOW_AOT_PATH}" + ])}, + {'name': "ml-opt-devrel-x86_64", + 'mergeRequests': False, + 'slavenames':["ml-opt-devrel-x86_64-b1"], + 'builddir':"ml-opt-devrel-x86_64-b1", + 'factory': UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory( + clean=True, + depends_on_projects=['llvm'], + extra_configure_args=common_extra_args + [ + "-DTENSORFLOW_API_PATH=${TENSORFLOW_API_PATH}", + "-DTENSORFLOW_AOT_PATH=${TENSORFLOW_AOT_PATH}" + ])}, + ] + def get_builders(): for b in _get_llvm_builders(): b['category'] = 'llvm' diff --git a/buildbot/osuosl/master/config/slaves.py b/buildbot/osuosl/master/config/slaves.py index f8aff0a30..e3d69844a 100644 --- a/buildbot/osuosl/master/config/slaves.py +++ b/buildbot/osuosl/master/config/slaves.py @@ -235,4 +235,12 @@ def get_build_slaves(): create_slave("flang-aarch64-ubuntu-build"), create_slave("nersc-flang"), + + # ML-Driven Compiler Optimizations build slave (Ubuntu x86_64) + create_slave("ml-opt-dev-x86_64-b1", + properties={'jobs': 64}, max_builds=1), + create_slave("ml-opt-rel-x86_64-b1", + properties={'jobs': 64}, max_builds=1), + create_slave("ml-opt-devrel-x86_64-b1", + properties={'jobs': 64}, max_builds=1), ] diff --git a/buildbot/osuosl/master/config/status.py b/buildbot/osuosl/master/config/status.py index afd25d315..ee7891b18 100644 --- a/buildbot/osuosl/master/config/status.py +++ b/buildbot/osuosl/master/config/status.py @@ -288,4 +288,13 @@ def get_status_targets(standard_builders, standard_categories=None): mode = "failing", builders = ["publish-sphinx-docs"], addLogs=False), + InformativeMailNotifier(fromaddr="llvm.buildmaster@lab.llvm.org", + sendToInterestedUsers=True, + extraRecipients=[ + "mlcompileropt-buildbot@google.com"], + subject="ML Compiler Opt Failure: %(builder)s", + mode="failing", + builders=[ + "ml-opt-dev-x86_64", "ml-opt-rel-x86_64", "ml-opt-devrel-x86_64"], + addLogs=False), ] From d967f6677cdc4093c4c77da8500fabb1e7c17234 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Thu, 28 May 2020 17:45:59 -0700 Subject: [PATCH 2/3] Add build bots for ml-driven optimization policies. --- buildbot/osuosl/master/config/builders.py | 18 +++++++++--------- buildbot/osuosl/master/config/slaves.py | 6 +++--- buildbot/osuosl/master/config/status.py | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/buildbot/osuosl/master/config/builders.py b/buildbot/osuosl/master/config/builders.py index 7f1cb1de6..dd7c5af74 100644 --- a/buildbot/osuosl/master/config/builders.py +++ b/buildbot/osuosl/master/config/builders.py @@ -1650,30 +1650,30 @@ def _get_documentation_builders(): def _get_ml_compiler_opt_builders(): common_extra_args = ["-DCMAKE_BUILD_TYPE=Release", ] return [ - {'name': "ml-opt-dev-x86_64", + {'name': "ml-opt-dev-x86-64", 'mergeRequests': False, - 'slavenames':["ml-opt-dev-x86_64-b1"], - 'builddir':"ml-opt-dev-x86_64-b1", + 'slavenames':["ml-opt-dev-x86-64-b1"], + 'builddir':"ml-opt-dev-x86-64-b1", 'factory': UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory( clean=True, depends_on_projects=['llvm'], extra_configure_args=common_extra_args + [ "-DTENSORFLOW_API_PATH=${TENSORFLOW_API_PATH}" ])}, - {'name': "ml-opt-rel-x86_64", + {'name': "ml-opt-rel-x86-64", 'mergeRequests': False, - 'slavenames':["ml-opt-rel-x86_64-b1"], - 'builddir':"ml-opt-rel-x86_64-b1", + 'slavenames':["ml-opt-rel-x86-64-b1"], + 'builddir':"ml-opt-rel-x86-64-b1", 'factory': UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory( clean=True, depends_on_projects=['llvm'], extra_configure_args=common_extra_args + [ "-DTENSORFLOW_AOT_PATH=${TENSORFLOW_AOT_PATH}" ])}, - {'name': "ml-opt-devrel-x86_64", + {'name': "ml-opt-devrel-x86-64", 'mergeRequests': False, - 'slavenames':["ml-opt-devrel-x86_64-b1"], - 'builddir':"ml-opt-devrel-x86_64-b1", + 'slavenames':["ml-opt-devrel-x86-64-b1"], + 'builddir':"ml-opt-devrel-x86-64-b1", 'factory': UnifiedTreeBuilder.getCmakeWithNinjaBuildFactory( clean=True, depends_on_projects=['llvm'], diff --git a/buildbot/osuosl/master/config/slaves.py b/buildbot/osuosl/master/config/slaves.py index e3d69844a..d22b8880e 100644 --- a/buildbot/osuosl/master/config/slaves.py +++ b/buildbot/osuosl/master/config/slaves.py @@ -237,10 +237,10 @@ def get_build_slaves(): create_slave("nersc-flang"), # ML-Driven Compiler Optimizations build slave (Ubuntu x86_64) - create_slave("ml-opt-dev-x86_64-b1", + create_slave("ml-opt-dev-x86-64-b1", properties={'jobs': 64}, max_builds=1), - create_slave("ml-opt-rel-x86_64-b1", + create_slave("ml-opt-rel-x86-64-b1", properties={'jobs': 64}, max_builds=1), - create_slave("ml-opt-devrel-x86_64-b1", + create_slave("ml-opt-devrel-x86-64-b1", properties={'jobs': 64}, max_builds=1), ] diff --git a/buildbot/osuosl/master/config/status.py b/buildbot/osuosl/master/config/status.py index ee7891b18..e1c7caa8e 100644 --- a/buildbot/osuosl/master/config/status.py +++ b/buildbot/osuosl/master/config/status.py @@ -295,6 +295,6 @@ def get_status_targets(standard_builders, standard_categories=None): subject="ML Compiler Opt Failure: %(builder)s", mode="failing", builders=[ - "ml-opt-dev-x86_64", "ml-opt-rel-x86_64", "ml-opt-devrel-x86_64"], + "ml-opt-dev-x86-64", "ml-opt-rel-x86-64", "ml-opt-devrel-x86-64"], addLogs=False), ] From c65dcfb61a06c1dac932dc6b313e11cfdb98543e Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Fri, 29 May 2020 10:41:27 -0700 Subject: [PATCH 3/3] added comments and also added ccache and assertions as commmon build requirements. --- buildbot/osuosl/master/config/builders.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/buildbot/osuosl/master/config/builders.py b/buildbot/osuosl/master/config/builders.py index dd7c5af74..b4bc79e41 100644 --- a/buildbot/osuosl/master/config/builders.py +++ b/buildbot/osuosl/master/config/builders.py @@ -1648,8 +1648,14 @@ def _get_documentation_builders(): # Builders for ML-driven compiler optimizations. def _get_ml_compiler_opt_builders(): - common_extra_args = ["-DCMAKE_BUILD_TYPE=Release", ] + common_extra_args = [ + "-DCMAKE_BUILD_TYPE=Release", + "-DLLVM_CACHE_BUILD=ON", + "-DLLVM_ENABLE_ASSERTIONS=ON", ] + return [ + # Development mode build bot: tensorflow C APIs are present, and + # we can dynamically load models, and produce training logs. {'name': "ml-opt-dev-x86-64", 'mergeRequests': False, 'slavenames':["ml-opt-dev-x86-64-b1"], @@ -1660,6 +1666,10 @@ def _get_ml_compiler_opt_builders(): extra_configure_args=common_extra_args + [ "-DTENSORFLOW_API_PATH=${TENSORFLOW_API_PATH}" ])}, + # Release mode build bot: the model is pre-built and linked in the + # compiler. Only the tensorflow pip package is needed, and out of it, + # only saved_model_cli (the model compiler) and the thin C++ wrappers + # in xla_aot_runtime_src (and include files) {'name': "ml-opt-rel-x86-64", 'mergeRequests': False, 'slavenames':["ml-opt-rel-x86-64-b1"], @@ -1670,6 +1680,7 @@ def _get_ml_compiler_opt_builders(): extra_configure_args=common_extra_args + [ "-DTENSORFLOW_AOT_PATH=${TENSORFLOW_AOT_PATH}" ])}, + # Both tensorflow C library, and the pip package, are present. {'name': "ml-opt-devrel-x86-64", 'mergeRequests': False, 'slavenames':["ml-opt-devrel-x86-64-b1"],