From f72218ef2a03fd68bd91130e2a49cd788131b02b Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 03:04:13 -0500 Subject: [PATCH 01/33] Add build-time publish step to cpu build script --- ci/cpu/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 00dffa57683..7249566c73e 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -73,6 +73,15 @@ else fi if [ "$BUILD_LIBCUDF" == '1' ]; then + # Copy libcudf build time results + echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.html" + if [[ -f "$LIB_BUILD_DIR/ninja_log.html" ]]; then + gpuci_logger "Copying build time results" + cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" + mkdir -p "$WORKSPACE/build-metrics" + cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" + fi + gpuci_logger "Build conda pkg for libcudf" gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf $CONDA_BUILD_ARGS mkdir -p ${CONDA_BLD_DIR}/libcudf/work From fc00e28e34d88591a50cb89e3cf6bb1b41135423 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 08:52:11 -0500 Subject: [PATCH 02/33] remove unneeded xml copy --- ci/cpu/build.sh | 1 - ci/gpu/build.sh | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 7249566c73e..ea6fa837b59 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -77,7 +77,6 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.html" if [[ -f "$LIB_BUILD_DIR/ninja_log.html" ]]; then gpuci_logger "Copying build time results" - cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" mkdir -p "$WORKSPACE/build-metrics" cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" fi diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 5646c268301..4c1462de1b1 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -184,6 +184,8 @@ else echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.html" if [[ -f "$LIB_BUILD_DIR/ninja_log.html" ]]; then gpuci_logger "Copying build time results" + echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" + echo "LIB_BUILD_DIR=$WORKSPACE" cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" mkdir -p "$WORKSPACE/build-metrics" cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" From 8b0b888ac60f83f85ee7566c3d5cdeaf3429e82c Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 10:21:25 -0500 Subject: [PATCH 03/33] temporarily clear ccache --- ci/cpu/build.sh | 11 ++++++++--- ci/gpu/build.sh | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index ea6fa837b59..fc04d8901b2 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -74,11 +74,12 @@ fi if [ "$BUILD_LIBCUDF" == '1' ]; then # Copy libcudf build time results - echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.html" - if [[ -f "$LIB_BUILD_DIR/ninja_log.html" ]]; then + LIBCUDF_BUILD_DIR=$WORKSPACE/ci/artifacts/cudf/cpu/libcudf_work/cpp/build + echo "Checking for build time log $LIBCUDF_BUILD_DIR/ninja_log.html" + if [[ -f "$LIBCUDF_BUILD_DIR/ninja_log.html" ]]; then gpuci_logger "Copying build time results" mkdir -p "$WORKSPACE/build-metrics" - cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" + cp "$LIBCUDF_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" fi gpuci_logger "Build conda pkg for libcudf" @@ -117,3 +118,7 @@ fi gpuci_logger "Upload conda pkgs" source ci/cpu/upload.sh + +## XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +echo "temporary clean ccache" +ccache -C \ No newline at end of file diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 4c1462de1b1..5646c268301 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -184,8 +184,6 @@ else echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.html" if [[ -f "$LIB_BUILD_DIR/ninja_log.html" ]]; then gpuci_logger "Copying build time results" - echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" - echo "LIB_BUILD_DIR=$WORKSPACE" cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" mkdir -p "$WORKSPACE/build-metrics" cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" From 92825d09aa32f4f182df537df00692d07815b856 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 13:48:55 -0500 Subject: [PATCH 04/33] remove ccache clear --- build.sh | 2 +- ci/cpu/build.sh | 12 ++++++++---- ci/gpu/build.sh | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index adf6e220744..d84fac9bc9d 100755 --- a/build.sh +++ b/build.sh @@ -198,7 +198,7 @@ if buildAll || hasArg libcudf; then # Record build times if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then - echo "Formatting build times" + echo "Formatting build times $LIB_BUILD_DIR" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml message="$FILES_IN_CCACHE

$PARALLEL_LEVEL parallel build time is $compile_total seconds" echo "$message" diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index fc04d8901b2..4e9ae09c89d 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -81,6 +81,14 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then mkdir -p "$WORKSPACE/build-metrics" cp "$LIBCUDF_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" fi + if [[ -d "$WORKSPACE/build-metrics" ]]; then + echo "Found build-metrics dir" + fi + if [[ -d "$WORKSPACE/test-results" ]]; then + echo "Found test-results dir" + fi + + ccache -s gpuci_logger "Build conda pkg for libcudf" gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf $CONDA_BUILD_ARGS @@ -118,7 +126,3 @@ fi gpuci_logger "Upload conda pkgs" source ci/cpu/upload.sh - -## XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -echo "temporary clean ccache" -ccache -C \ No newline at end of file diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 5646c268301..4a323ec9434 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -184,6 +184,7 @@ else echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.html" if [[ -f "$LIB_BUILD_DIR/ninja_log.html" ]]; then gpuci_logger "Copying build time results" + echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" mkdir -p "$WORKSPACE/build-metrics" cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" From d390db1f226488bb17d26393edbb86dc4de725f7 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 14:12:32 -0500 Subject: [PATCH 05/33] broke something; trying again --- ci/cpu/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 4e9ae09c89d..ad48db3ce96 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -88,6 +88,7 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then echo "Found test-results dir" fi + # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ccache -s gpuci_logger "Build conda pkg for libcudf" From b63640267a05789f2fc0733f70a700bdec87f85f Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 16:33:03 -0500 Subject: [PATCH 06/33] add some debug output messages --- build.sh | 1 + ci/cpu/build.sh | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index d84fac9bc9d..02269ef2b9e 100755 --- a/build.sh +++ b/build.sh @@ -189,6 +189,7 @@ if buildAll || hasArg libcudf; then -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ ${CMAKE_ARGS} + echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" cd ${LIB_BUILD_DIR} compile_start=$(date +%s) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index ad48db3ce96..604809b63da 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -81,12 +81,6 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then mkdir -p "$WORKSPACE/build-metrics" cp "$LIBCUDF_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" fi - if [[ -d "$WORKSPACE/build-metrics" ]]; then - echo "Found build-metrics dir" - fi - if [[ -d "$WORKSPACE/test-results" ]]; then - echo "Found test-results dir" - fi # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ccache -s @@ -96,6 +90,8 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then mkdir -p ${CONDA_BLD_DIR}/libcudf/work cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf/work + echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" + echo "CONDA_BLD_DIR=$CONDA_BLD_DIR" gpuci_logger "Build conda pkg for libcudf_kafka" gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf_kafka $CONDA_BUILD_ARGS From e1222f2a067ab0e634d12295e925548c7bd0ff90 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 17:03:36 -0500 Subject: [PATCH 07/33] remove copy metrics after libcudf pkg --- ci/cpu/build.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 604809b63da..c895039899d 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -73,14 +73,6 @@ else fi if [ "$BUILD_LIBCUDF" == '1' ]; then - # Copy libcudf build time results - LIBCUDF_BUILD_DIR=$WORKSPACE/ci/artifacts/cudf/cpu/libcudf_work/cpp/build - echo "Checking for build time log $LIBCUDF_BUILD_DIR/ninja_log.html" - if [[ -f "$LIBCUDF_BUILD_DIR/ninja_log.html" ]]; then - gpuci_logger "Copying build time results" - mkdir -p "$WORKSPACE/build-metrics" - cp "$LIBCUDF_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" - fi # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ccache -s @@ -92,6 +84,16 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" echo "CONDA_BLD_DIR=$CONDA_BLD_DIR" + echo "SRC_DIR=$SRC_DIR" + + # Copy libcudf build time results + LIBCUDF_BUILD_DIR=$SRC_DIR/cpp/build + echo "Checking for build time log $LIBCUDF_BUILD_DIR/ninja_log.html" + if [[ -f "$LIBCUDF_BUILD_DIR/ninja_log.html" ]]; then + gpuci_logger "Copying build time results" + mkdir -p "$WORKSPACE/build-metrics" + cp "$LIBCUDF_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" + fi gpuci_logger "Build conda pkg for libcudf_kafka" gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf_kafka $CONDA_BUILD_ARGS From aec614fbd9eeaef9a3ce76aa39075a74ee9c2c58 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 17:41:32 -0500 Subject: [PATCH 08/33] searching for log html --- build.sh | 1 + ci/cpu/build.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/build.sh b/build.sh index 02269ef2b9e..165e3767e63 100755 --- a/build.sh +++ b/build.sh @@ -190,6 +190,7 @@ if buildAll || hasArg libcudf; then ${CMAKE_ARGS} echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" + echo "SRC_DIR=$SRC_DIR" cd ${LIB_BUILD_DIR} compile_start=$(date +%s) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index c895039899d..234c893073e 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -86,6 +86,9 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then echo "CONDA_BLD_DIR=$CONDA_BLD_DIR" echo "SRC_DIR=$SRC_DIR" + echo "searching for ninja_log" + find . -name "ninja_log.html" + # Copy libcudf build time results LIBCUDF_BUILD_DIR=$SRC_DIR/cpp/build echo "Checking for build time log $LIBCUDF_BUILD_DIR/ninja_log.html" From 1aa0ff5414cde177100cfe4327974f040d36fb34 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 18:47:11 -0500 Subject: [PATCH 09/33] found ninja-log html file --- ci/cpu/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 234c893073e..41fa1d043da 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -82,15 +82,13 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then mkdir -p ${CONDA_BLD_DIR}/libcudf/work cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf/work - echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" echo "CONDA_BLD_DIR=$CONDA_BLD_DIR" - echo "SRC_DIR=$SRC_DIR" echo "searching for ninja_log" find . -name "ninja_log.html" # Copy libcudf build time results - LIBCUDF_BUILD_DIR=$SRC_DIR/cpp/build + LIBCUDF_BUILD_DIR=$CONDA_BLD_DIR/libcudf/work/cpp/build echo "Checking for build time log $LIBCUDF_BUILD_DIR/ninja_log.html" if [[ -f "$LIBCUDF_BUILD_DIR/ninja_log.html" ]]; then gpuci_logger "Copying build time results" From fe3c2e72e458d30dd77650f6a29b23c71b0e96fd Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 17 Dec 2021 19:39:05 -0500 Subject: [PATCH 10/33] temp clear ccache again --- ci/cpu/build.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 41fa1d043da..f2bade40154 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -82,10 +82,9 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then mkdir -p ${CONDA_BLD_DIR}/libcudf/work cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf/work - echo "CONDA_BLD_DIR=$CONDA_BLD_DIR" - - echo "searching for ninja_log" - find . -name "ninja_log.html" + # echo "CONDA_BLD_DIR=$CONDA_BLD_DIR" + # echo "searching for ninja_log" + # find . -name "ninja_log.html" # Copy libcudf build time results LIBCUDF_BUILD_DIR=$CONDA_BLD_DIR/libcudf/work/cpp/build @@ -126,3 +125,6 @@ fi gpuci_logger "Upload conda pkgs" source ci/cpu/upload.sh + +# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +ccache -C From 7db99ac70b9d7733f28559d4dc6c5c63eccbbf0a Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sat, 18 Dec 2021 10:39:52 -0500 Subject: [PATCH 11/33] add style to table elements --- build.sh | 2 +- ci/cpu/build.sh | 3 --- ci/gpu/build.sh | 8 ++++---- cpp/scripts/sort_ninja_log.py | 16 ++++++++-------- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/build.sh b/build.sh index 165e3767e63..410bbd02755 100755 --- a/build.sh +++ b/build.sh @@ -176,6 +176,7 @@ if buildAll || hasArg libcudf; then FILES_IN_CCACHE="" if [ -x "$(command -v ccache)" ]; then FILES_IN_CCACHE=$(ccache -s | grep "files in cache") + echo "$FILES_IN_CCACHE" fi cmake -S $REPODIR/cpp -B ${LIB_BUILD_DIR} \ @@ -190,7 +191,6 @@ if buildAll || hasArg libcudf; then ${CMAKE_ARGS} echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" - echo "SRC_DIR=$SRC_DIR" cd ${LIB_BUILD_DIR} compile_start=$(date +%s) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index f2bade40154..806900169a4 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -125,6 +125,3 @@ fi gpuci_logger "Upload conda pkgs" source ci/cpu/upload.sh - -# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -ccache -C diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 4a323ec9434..068602a331f 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -181,13 +181,13 @@ else done # Copy libcudf build time results - echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.html" - if [[ -f "$LIB_BUILD_DIR/ninja_log.html" ]]; then + echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.xml" + if [[ -f "$LIB_BUILD_DIR/ninja_log.xml" ]]; then gpuci_logger "Copying build time results" echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" - mkdir -p "$WORKSPACE/build-metrics" - cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" + # mkdir -p "$WORKSPACE/build-metrics" + # cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" fi ################################################################################ diff --git a/cpp/scripts/sort_ninja_log.py b/cpp/scripts/sort_ninja_log.py index 5eada13aea2..80bfff7b21d 100755 --- a/cpp/scripts/sort_ninja_log.py +++ b/cpp/scripts/sort_ninja_log.py @@ -88,25 +88,25 @@ elif output_fmt == "html": # output results in HTML format print("Sorted Ninja Build Times") - print("") + # print("") print("") if args.msg is not None: print("

", args.msg, "

") - print("") + print("
") print( - "", - "", - "", + "", + "", + "", sep="", ) for key in sl: result = entries[key] print( - "", sep="", From f6f328b73a7fb98c65b396f1c68138ee06ba058c Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sat, 18 Dec 2021 15:28:07 -0500 Subject: [PATCH 12/33] testing output table style --- cpp/scripts/sort_ninja_log.py | 43 +++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/cpp/scripts/sort_ninja_log.py b/cpp/scripts/sort_ninja_log.py index 80bfff7b21d..162c7ba8e99 100755 --- a/cpp/scripts/sort_ninja_log.py +++ b/cpp/scripts/sort_ninja_log.py @@ -88,30 +88,55 @@ elif output_fmt == "html": # output results in HTML format print("Sorted Ninja Build Times") - # print("") + print("") print("") if args.msg is not None: print("

", args.msg, "

") - print("
FileCompile time (ms)Size (bytes)
FileCompile time (ms)Size (bytes)
", + "
", key, - "", + "", result[0], - "", + "", result[1], "
") + print("
") print( - "", - "", - "", + "", + "", + "", sep="", ) + red = "style='background-color:#FFBBD0'" + yellow = "style='background-color:#FFFF80'" + gray = "style='background-color:#CCCCCC'" + green = "style='background-color:#AAFFBD'" for key in sl: result = entries[key] + elapsed = result[0] + color = green + if elapsed > 600000: # 10 minutes + color = red + elif elapsed > 300000: # 5 minutes + color = yellow + elif elapsed > 120000: # 2 minutes + color = gray print( - "", sep="", ) - print("
FileCompile time (ms)Size (bytes)
FileCompile time (ms)Size (bytes)
", + "
", key, - "", + "", result[0], - "", + "", result[1], "
") + print("") + print("
") + print("> 10 minutes") + print("5 minutes < time < 10 minutes") + print("2 minutes < time < 5 minutes") + print("< 2 minutes") + print("
") + print("") else: # output results in CSV format From 9b36a499c128b279f55d2e44350f0cc3aef792c3 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sat, 18 Dec 2021 16:55:09 -0500 Subject: [PATCH 13/33] going old school since jenkins does not support custom html styles --- cpp/scripts/sort_ninja_log.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/scripts/sort_ninja_log.py b/cpp/scripts/sort_ninja_log.py index 162c7ba8e99..03da5da3d1d 100755 --- a/cpp/scripts/sort_ninja_log.py +++ b/cpp/scripts/sort_ninja_log.py @@ -103,10 +103,10 @@ "Size (bytes)", sep="", ) - red = "style='background-color:#FFBBD0'" - yellow = "style='background-color:#FFFF80'" - gray = "style='background-color:#CCCCCC'" - green = "style='background-color:#AAFFBD'" + red = "bgcolor='#FFBBD0'" + yellow = "bgcolor='#FFFF80'" + gray = "bgcolor='#CCCCCC'" + green = "bgcolor='#AAFFBD'" for key in sl: result = entries[key] elapsed = result[0] From 5cb68480f5dcab3606dc8ab152a969f089cec6de Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sat, 18 Dec 2021 18:11:23 -0500 Subject: [PATCH 14/33] retry with cleared cache --- ci/cpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 806900169a4..a96b3b8f239 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -75,7 +75,7 @@ fi if [ "$BUILD_LIBCUDF" == '1' ]; then # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - ccache -s + ccache -C gpuci_logger "Build conda pkg for libcudf" gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf $CONDA_BUILD_ARGS From f5e38d2c422875b9bb291f8a88b109101370db7d Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sat, 18 Dec 2021 21:03:37 -0500 Subject: [PATCH 15/33] fix summary table --- cpp/scripts/sort_ninja_log.py | 36 ++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/cpp/scripts/sort_ninja_log.py b/cpp/scripts/sort_ninja_log.py index 03da5da3d1d..0a4d0ec859e 100755 --- a/cpp/scripts/sort_ninja_log.py +++ b/cpp/scripts/sort_ninja_log.py @@ -88,21 +88,19 @@ elif output_fmt == "html": # output results in HTML format print("Sorted Ninja Build Times") - print("") + # Note: Jenkins does not support style defined in the html + # https://www.jenkins.io/doc/book/security/configuring-content-security-policy/ print("") if args.msg is not None: print("

", args.msg, "

") print("") print( "", - "", - "", + "", + "", sep="", ) + summary = {"red": 0, "yellow": 0, "gray": 0, "green": 0} red = "bgcolor='#FFBBD0'" yellow = "bgcolor='#FFFF80'" gray = "bgcolor='#CCCCCC'" @@ -113,10 +111,15 @@ color = green if elapsed > 600000: # 10 minutes color = red + summary["red"] += 1 elif elapsed > 300000: # 5 minutes color = yellow + summary["yellow"] += 1 elif elapsed > 120000: # 2 minutes color = gray + summary["gray"] += 1 + else: + summary["green"] += 1 print( "", sep="", ) - print("
FileCompile time (ms)Size (bytes)
Compile time
(ms)
Size
(bytes)
") - print("
") - print("> 10 minutes") - print("5 minutes < time < 10 minutes") - print("2 minutes < time < 5 minutes") - print("< 2 minutes") - print("
") - print("") + print("
") + # include summary table with color legend + print("> 10 minutes") + print("") + print("5 minutes < time < 10 minutes") + print("") + print("2 minutes < time < 5 minutes") + print("") + print("< 2 minutes") + print("") + print("
", summary["red"], "
", summary["yellow"], "
", summary["gray"], "
", summary["green"], "
") else: # output results in CSV format From 5e1360ef63ac5b8edbb2822ca33b5c6bf76a263a Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sun, 19 Dec 2021 08:05:17 -0500 Subject: [PATCH 16/33] add some build info to the output --- build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 410bbd02755..820daad4f9e 100755 --- a/build.sh +++ b/build.sh @@ -202,7 +202,12 @@ if buildAll || hasArg libcudf; then if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then echo "Formatting build times $LIB_BUILD_DIR" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml - message="$FILES_IN_CCACHE

$PARALLEL_LEVEL parallel build time is $compile_total seconds" + message="

$PR_ID" + message="$message
build $BUILD_ID" + message="$message
CUDA $CUDA_VERSION" + message="$message
$FILES_IN_CCACHE" + message="$message
parallel setting $PARALLEL_LEVEL" + message="$message
$compile_total seconds" echo "$message" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt html --msg "$message" > ${LIB_BUILD_DIR}/ninja_log.html fi From 17adcf70e1926b1a8656b365000d6504fc00c0ce Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sun, 19 Dec 2021 12:58:09 -0500 Subject: [PATCH 17/33] convert 4 ranges to 3 --- build.sh | 2 +- cpp/scripts/sort_ninja_log.py | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index 820daad4f9e..410efb737a3 100755 --- a/build.sh +++ b/build.sh @@ -204,7 +204,7 @@ if buildAll || hasArg libcudf; then python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml message="

$PR_ID" message="$message
build $BUILD_ID" - message="$message
CUDA $CUDA_VERSION" + message="$message
CUDA version $CUDA" message="$message
$FILES_IN_CCACHE" message="$message
parallel setting $PARALLEL_LEVEL" message="$message
$compile_total seconds" diff --git a/cpp/scripts/sort_ninja_log.py b/cpp/scripts/sort_ninja_log.py index 0a4d0ec859e..bac6697da82 100755 --- a/cpp/scripts/sort_ninja_log.py +++ b/cpp/scripts/sort_ninja_log.py @@ -100,24 +100,20 @@ "Size
(bytes)", sep="", ) - summary = {"red": 0, "yellow": 0, "gray": 0, "green": 0} + summary = {"red": 0, "yellow": 0, "green": 0} red = "bgcolor='#FFBBD0'" yellow = "bgcolor='#FFFF80'" - gray = "bgcolor='#CCCCCC'" green = "bgcolor='#AAFFBD'" for key in sl: result = entries[key] elapsed = result[0] color = green - if elapsed > 600000: # 10 minutes + if elapsed > 300000: # 5 minutes color = red summary["red"] += 1 - elif elapsed > 300000: # 5 minutes + elif elapsed > 120000: # 2 minutes color = yellow summary["yellow"] += 1 - elif elapsed > 120000: # 2 minutes - color = gray - summary["gray"] += 1 else: summary["green"] += 1 print( @@ -134,13 +130,11 @@ ) print("
") # include summary table with color legend - print("> 10 minutes") + print("time > 5 minutes") print("") - print("5 minutes < time < 10 minutes") + print("2 minutes < time < 5 minutes") print("") - print("2 minutes < time < 5 minutes") - print("") - print("< 2 minutes") + print("time < 2 minutes") print("") print("
", summary["red"], "
", summary["yellow"], "
", summary["gray"], "
", summary["green"], "
") From e2826a00a74bf19757dedcc2643c3f545e261f47 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sun, 19 Dec 2021 16:12:35 -0500 Subject: [PATCH 18/33] remove ccache clear --- build.sh | 7 ++++++- ci/cpu/build.sh | 8 -------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 410efb737a3..35f8b13964d 100755 --- a/build.sh +++ b/build.sh @@ -198,13 +198,18 @@ if buildAll || hasArg libcudf; then compile_end=$(date +%s) compile_total=$(( compile_end - compile_start )) + echo "Some environment variables here" + env | grep 11.5 + env | grep 9927 + env | grep BUILD + # Record build times if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then echo "Formatting build times $LIB_BUILD_DIR" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml message="

$PR_ID" message="$message
build $BUILD_ID" - message="$message
CUDA version $CUDA" + message="$message
CUDA LIB $NV_CUDA_LIB_VERSION" message="$message
$FILES_IN_CCACHE" message="$message
parallel setting $PARALLEL_LEVEL" message="$message
$compile_total seconds" diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index a96b3b8f239..5dc21558113 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -73,19 +73,11 @@ else fi if [ "$BUILD_LIBCUDF" == '1' ]; then - - # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - ccache -C - gpuci_logger "Build conda pkg for libcudf" gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf $CONDA_BUILD_ARGS mkdir -p ${CONDA_BLD_DIR}/libcudf/work cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf/work - # echo "CONDA_BLD_DIR=$CONDA_BLD_DIR" - # echo "searching for ninja_log" - # find . -name "ninja_log.html" - # Copy libcudf build time results LIBCUDF_BUILD_DIR=$CONDA_BLD_DIR/libcudf/work/cpp/build echo "Checking for build time log $LIBCUDF_BUILD_DIR/ninja_log.html" From 82ce7c3740bfb2fb858d9f37488ab2a941bbce7d Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sun, 19 Dec 2021 17:59:54 -0500 Subject: [PATCH 19/33] fix env var cmd --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 35f8b13964d..4a54c0a6be5 100755 --- a/build.sh +++ b/build.sh @@ -199,9 +199,9 @@ if buildAll || hasArg libcudf; then compile_total=$(( compile_end - compile_start )) echo "Some environment variables here" - env | grep 11.5 - env | grep 9927 - env | grep BUILD + declare | grep 11.5 + declare | grep 9927 + declare | grep BUILD # Record build times if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then From 62291f02f91c429d16a5c44889743026f954bd51 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sun, 19 Dec 2021 19:09:15 -0500 Subject: [PATCH 20/33] try getting env vars again --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 4a54c0a6be5..c3082581d31 100755 --- a/build.sh +++ b/build.sh @@ -199,9 +199,9 @@ if buildAll || hasArg libcudf; then compile_total=$(( compile_end - compile_start )) echo "Some environment variables here" - declare | grep 11.5 - declare | grep 9927 - declare | grep BUILD + declare | grep "11.5" + declare | grep "9927" + declare | grep "BUILD" # Record build times if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then From c92ade871cac1a68a176d915570428a5039b3967 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Sun, 19 Dec 2021 23:31:36 -0500 Subject: [PATCH 21/33] fix script again --- build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index c3082581d31..da6ef43fc0a 100755 --- a/build.sh +++ b/build.sh @@ -199,9 +199,8 @@ if buildAll || hasArg libcudf; then compile_total=$(( compile_end - compile_start )) echo "Some environment variables here" - declare | grep "11.5" - declare | grep "9927" - declare | grep "BUILD" + declare + echo "Done" # Record build times if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then From 0f2bd3b3455a01c43fbbbf38d4692bdb06bf035d Mon Sep 17 00:00:00 2001 From: David Wendt Date: Mon, 20 Dec 2021 09:37:17 -0500 Subject: [PATCH 22/33] remove unresolved message vars --- build.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/build.sh b/build.sh index da6ef43fc0a..007e8674bfc 100755 --- a/build.sh +++ b/build.sh @@ -198,22 +198,15 @@ if buildAll || hasArg libcudf; then compile_end=$(date +%s) compile_total=$(( compile_end - compile_start )) - echo "Some environment variables here" - declare - echo "Done" - # Record build times if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then echo "Formatting build times $LIB_BUILD_DIR" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml - message="

$PR_ID" - message="$message
build $BUILD_ID" - message="$message
CUDA LIB $NV_CUDA_LIB_VERSION" - message="$message
$FILES_IN_CCACHE" - message="$message
parallel setting $PARALLEL_LEVEL" - message="$message
$compile_total seconds" - echo "$message" - python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt html --msg "$message" > ${LIB_BUILD_DIR}/ninja_log.html + MSG="${MSG}
$FILES_IN_CCACHE" + MSG="${MSG}
parallel setting: $PARALLEL_LEVEL" + MSG="${MSG}
parallel compile time: $compile_total seconds" + echo "$MSG" + python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt html --msg "$MSG" > ${LIB_BUILD_DIR}/ninja_log.html fi if [[ ${INSTALL_TARGET} != "" ]]; then From ce222a99ed48e870a3bf83e38f97ab6bb7603230 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Mon, 20 Dec 2021 09:38:50 -0500 Subject: [PATCH 23/33] test recompile-everything technique --- cpp/include/cudf/types.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/include/cudf/types.hpp b/cpp/include/cudf/types.hpp index 13d5f8e06bc..d90985f255f 100644 --- a/cpp/include/cudf/types.hpp +++ b/cpp/include/cudf/types.hpp @@ -352,5 +352,8 @@ enum class hash_id { */ static constexpr uint32_t DEFAULT_HASH_SEED = 0; +// TODO: remove this +static constexpr int force_recompile_of_everything = 1; + /** @} */ } // namespace cudf From f91343e439bbd12e1149de3fddf74bdd6cf811a2 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Mon, 20 Dec 2021 13:19:04 -0500 Subject: [PATCH 24/33] report cache hit rate --- build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 007e8674bfc..ab693c84f3a 100755 --- a/build.sh +++ b/build.sh @@ -177,6 +177,7 @@ if buildAll || hasArg libcudf; then if [ -x "$(command -v ccache)" ]; then FILES_IN_CCACHE=$(ccache -s | grep "files in cache") echo "$FILES_IN_CCACHE" + ccache -z fi cmake -S $REPODIR/cpp -B ${LIB_BUILD_DIR} \ @@ -202,7 +203,12 @@ if buildAll || hasArg libcudf; then if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then echo "Formatting build times $LIB_BUILD_DIR" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml - MSG="${MSG}
$FILES_IN_CCACHE" + MSG="

" + if [ -x "$(command -v ccache)" ]; then + MSG="${MSG}
$FILES_IN_CCACHE" + HIT_RATE=$(ccache -s | grep "cache hit rate") + MSG="${MSG}
${HIT_RATE}" + fi MSG="${MSG}
parallel setting: $PARALLEL_LEVEL" MSG="${MSG}
parallel compile time: $compile_total seconds" echo "$MSG" From fad7cf248cf21fc3a5847e29f2a8773797784144 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Mon, 20 Dec 2021 16:46:37 -0500 Subject: [PATCH 25/33] check cache hit rate --- cpp/include/cudf/types.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/cudf/types.hpp b/cpp/include/cudf/types.hpp index d90985f255f..32a2e15d04f 100644 --- a/cpp/include/cudf/types.hpp +++ b/cpp/include/cudf/types.hpp @@ -353,7 +353,7 @@ enum class hash_id { static constexpr uint32_t DEFAULT_HASH_SEED = 0; // TODO: remove this -static constexpr int force_recompile_of_everything = 1; +static constexpr int force_recompile_of_everything = 2; /** @} */ } // namespace cudf From e0666d14c076cd547e46f4cbb796a2611a44bc4f Mon Sep 17 00:00:00 2001 From: David Wendt Date: Tue, 21 Dec 2021 13:24:09 -0500 Subject: [PATCH 26/33] remove temporary recompile test --- build.sh | 6 ++++-- ci/cpu/build.sh | 6 +++--- cpp/include/cudf/types.hpp | 3 --- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index ab693c84f3a..ad73534d267 100755 --- a/build.sh +++ b/build.sh @@ -177,6 +177,7 @@ if buildAll || hasArg libcudf; then if [ -x "$(command -v ccache)" ]; then FILES_IN_CCACHE=$(ccache -s | grep "files in cache") echo "$FILES_IN_CCACHE" + # zero the ccache statistics ccache -z fi @@ -201,16 +202,17 @@ if buildAll || hasArg libcudf; then # Record build times if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then - echo "Formatting build times $LIB_BUILD_DIR" + echo "Formatting build metrics" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml MSG="

" + # get some ccache stats after the compile if [ -x "$(command -v ccache)" ]; then MSG="${MSG}
$FILES_IN_CCACHE" HIT_RATE=$(ccache -s | grep "cache hit rate") MSG="${MSG}
${HIT_RATE}" fi MSG="${MSG}
parallel setting: $PARALLEL_LEVEL" - MSG="${MSG}
parallel compile time: $compile_total seconds" + MSG="${MSG}
parallel build time: $compile_total seconds" echo "$MSG" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt html --msg "$MSG" > ${LIB_BUILD_DIR}/ninja_log.html fi diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 5dc21558113..f23296038f2 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -78,11 +78,11 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then mkdir -p ${CONDA_BLD_DIR}/libcudf/work cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf/work - # Copy libcudf build time results + # Copy libcudf build metrics results LIBCUDF_BUILD_DIR=$CONDA_BLD_DIR/libcudf/work/cpp/build - echo "Checking for build time log $LIBCUDF_BUILD_DIR/ninja_log.html" + echo "Checking for build metrics log $LIBCUDF_BUILD_DIR/ninja_log.html" if [[ -f "$LIBCUDF_BUILD_DIR/ninja_log.html" ]]; then - gpuci_logger "Copying build time results" + gpuci_logger "Copying build metrics results" mkdir -p "$WORKSPACE/build-metrics" cp "$LIBCUDF_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" fi diff --git a/cpp/include/cudf/types.hpp b/cpp/include/cudf/types.hpp index 32a2e15d04f..13d5f8e06bc 100644 --- a/cpp/include/cudf/types.hpp +++ b/cpp/include/cudf/types.hpp @@ -352,8 +352,5 @@ enum class hash_id { */ static constexpr uint32_t DEFAULT_HASH_SEED = 0; -// TODO: remove this -static constexpr int force_recompile_of_everything = 2; - /** @} */ } // namespace cudf From 192e0f1e5a682f3636988b542191cb9cd8266715 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Wed, 22 Dec 2021 14:49:47 -0500 Subject: [PATCH 27/33] remove commented out code --- ci/gpu/build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 068602a331f..fe8f5b47a0b 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -186,8 +186,6 @@ else gpuci_logger "Copying build time results" echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" - # mkdir -p "$WORKSPACE/build-metrics" - # cp "$LIB_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html" fi ################################################################################ From 40d0479dc017ad15e48025e943c61a19ae03846e Mon Sep 17 00:00:00 2001 From: David Wendt Date: Wed, 5 Jan 2022 09:45:18 -0500 Subject: [PATCH 28/33] add libcudf.so size to metrics output --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index ad73534d267..6c0b7cb822d 100755 --- a/build.sh +++ b/build.sh @@ -213,6 +213,8 @@ if buildAll || hasArg libcudf; then fi MSG="${MSG}
parallel setting: $PARALLEL_LEVEL" MSG="${MSG}
parallel build time: $compile_total seconds" + LIBCUDF_FS=$(ls -lh ${LIB_BUILD_DIR}/libcudf.so | awk '{print $5}') + MSG="${MSG}
libcudf.so size: $LIBCUDF_FS" echo "$MSG" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt html --msg "$MSG" > ${LIB_BUILD_DIR}/ninja_log.html fi From 01c0a3b6f2079fbee48a8cb08d810eda31f513d8 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Wed, 5 Jan 2022 18:09:30 -0500 Subject: [PATCH 29/33] report libcudf.so size only if found --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 6c0b7cb822d..918f54f0c50 100755 --- a/build.sh +++ b/build.sh @@ -213,8 +213,10 @@ if buildAll || hasArg libcudf; then fi MSG="${MSG}
parallel setting: $PARALLEL_LEVEL" MSG="${MSG}
parallel build time: $compile_total seconds" - LIBCUDF_FS=$(ls -lh ${LIB_BUILD_DIR}/libcudf.so | awk '{print $5}') - MSG="${MSG}
libcudf.so size: $LIBCUDF_FS" + if [[ -f "${LIB_BUILD_DIR}/libcudf.so" ]]; then + LIBCUDF_FS=$(ls -lh ${LIB_BUILD_DIR}/libcudf.so | awk '{print $5}') + MSG="${MSG}
libcudf.so size: $LIBCUDF_FS" + fi echo "$MSG" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt html --msg "$MSG" > ${LIB_BUILD_DIR}/ninja_log.html fi From 0a03c23f6b1fb995c3d9d366b89c8cf984f85fa0 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Thu, 6 Jan 2022 13:36:17 -0500 Subject: [PATCH 30/33] add build-metrics parameters to build.sh --- build.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 918f54f0c50..3eb7ac9427c 100755 --- a/build.sh +++ b/build.sh @@ -37,6 +37,8 @@ HELP="$0 [clean] [libcudf] [cudf] [dask_cudf] [benchmarks] [tests] [libcudf_kafk --disable_nvtx - disable inserting NVTX profiling ranges --show_depr_warn - show cmake deprecation warnings --ptds - enable per-thread default stream + --build_metrics - generate build metrics report for libcudf + --incl_cache_stats - include cache statistics in build metrics report --cmake-args=\\\"\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument) -h | --h[elp] - print this text @@ -61,6 +63,8 @@ BUILD_NVTX=ON BUILD_TESTS=OFF BUILD_DISABLE_DEPRECATION_WARNING=ON BUILD_PER_THREAD_DEFAULT_STREAM=OFF +BUILD_REPORT_METRICS=ON +BUILD_REPORT_INCL_CACHE_STATS=ON # Set defaults for vars that may not have been defined externally # FIXME: if INSTALL_PREFIX is not set, check PREFIX, then check @@ -144,6 +148,14 @@ fi if hasArg --ptds; then BUILD_PER_THREAD_DEFAULT_STREAM=ON fi +if hasArg --build_metrics; then + BUILD_REPORT_METRICS=ON +fi + +if hasArg --incl_cache_stats; then + BUILD_REPORT_INCL_CACHE_STATS=ON +fi + # If clean given, run it prior to any other steps if hasArg clean; then @@ -174,7 +186,7 @@ if buildAll || hasArg libcudf; then # get the current count before the compile starts FILES_IN_CCACHE="" - if [ -x "$(command -v ccache)" ]; then + if [[ "$BUILD_REPORT_INCL_CACHE_STATS"=="ON" && -x "$(command -v ccache)" ]]; then FILES_IN_CCACHE=$(ccache -s | grep "files in cache") echo "$FILES_IN_CCACHE" # zero the ccache statistics @@ -201,12 +213,12 @@ if buildAll || hasArg libcudf; then compile_total=$(( compile_end - compile_start )) # Record build times - if [[ -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then + if [[ "$BUILD_REPORT_METRICS"=="ON" && -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then echo "Formatting build metrics" python ${REPODIR}/cpp/scripts/sort_ninja_log.py ${LIB_BUILD_DIR}/.ninja_log --fmt xml > ${LIB_BUILD_DIR}/ninja_log.xml MSG="

" # get some ccache stats after the compile - if [ -x "$(command -v ccache)" ]; then + if [[ "$BUILD_REPORT_INCL_CACHE_STATS"=="ON" && -x "$(command -v ccache)" ]]; then MSG="${MSG}
$FILES_IN_CCACHE" HIT_RATE=$(ccache -s | grep "cache hit rate") MSG="${MSG}
${HIT_RATE}" From 3b840d43959ff0871cb2dbb3c6432c44efe3e9ea Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 7 Jan 2022 08:10:10 -0500 Subject: [PATCH 31/33] reset metrics defaults to OFF --- build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 3eb7ac9427c..a5f76834e14 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2019-2021, NVIDIA CORPORATION. +# Copyright (c) 2019-2022, NVIDIA CORPORATION. # cuDF build script @@ -17,7 +17,7 @@ ARGS=$* # script, and that this script resides in the repo dir! REPODIR=$(cd $(dirname $0); pwd) -VALIDARGS="clean libcudf cudf dask_cudf benchmarks tests libcudf_kafka cudf_kafka custreamz -v -g -n -l --allgpuarch --disable_nvtx --show_depr_warn --ptds -h" +VALIDARGS="clean libcudf cudf dask_cudf benchmarks tests libcudf_kafka cudf_kafka custreamz -v -g -n -l --allgpuarch --disable_nvtx --show_depr_warn --ptds -h --build_metrics --incl_cache_stats" HELP="$0 [clean] [libcudf] [cudf] [dask_cudf] [benchmarks] [tests] [libcudf_kafka] [cudf_kafka] [custreamz] [-v] [-g] [-n] [-h] [-l] [--cmake-args=\\\"\\\"] clean - remove all existing build artifacts and configuration (start over) @@ -63,8 +63,8 @@ BUILD_NVTX=ON BUILD_TESTS=OFF BUILD_DISABLE_DEPRECATION_WARNING=ON BUILD_PER_THREAD_DEFAULT_STREAM=OFF -BUILD_REPORT_METRICS=ON -BUILD_REPORT_INCL_CACHE_STATS=ON +BUILD_REPORT_METRICS=OFF +BUILD_REPORT_INCL_CACHE_STATS=OFF # Set defaults for vars that may not have been defined externally # FIXME: if INSTALL_PREFIX is not set, check PREFIX, then check From 18f2990e2825810a67ccef5c51868334a98fda9c Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 7 Jan 2022 08:33:17 -0500 Subject: [PATCH 32/33] pass new parameters to build.sh --- conda/recipes/libcudf/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/recipes/libcudf/build.sh b/conda/recipes/libcudf/build.sh index 703f8dc15c7..c3730b3241a 100644 --- a/conda/recipes/libcudf/build.sh +++ b/conda/recipes/libcudf/build.sh @@ -4,5 +4,5 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then # This assumes the script is executed from the root of the repo directory ./build.sh -v libcudf --allgpuarch --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\" else - ./build.sh -v libcudf tests --allgpuarch --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\" + ./build.sh -v libcudf tests --allgpuarch --build_metrics --incl_cache_stats --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\" fi From 06f9d50b8ebdf1190b9bfd3a44cdaaf6809e87b7 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 7 Jan 2022 12:42:58 -0500 Subject: [PATCH 33/33] remove debugging echo statements --- build.sh | 1 - ci/gpu/build.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/build.sh b/build.sh index a5f76834e14..f5a59b6edcf 100755 --- a/build.sh +++ b/build.sh @@ -204,7 +204,6 @@ if buildAll || hasArg libcudf; then -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ ${CMAKE_ARGS} - echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" cd ${LIB_BUILD_DIR} compile_start=$(date +%s) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 095738cb5ab..059e359e4e9 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -184,7 +184,6 @@ else echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.xml" if [[ -f "$LIB_BUILD_DIR/ninja_log.xml" ]]; then gpuci_logger "Copying build time results" - echo "LIB_BUILD_DIR=$LIB_BUILD_DIR" cp "$LIB_BUILD_DIR/ninja_log.xml" "$WORKSPACE/test-results/buildtimes-junit.xml" fi