Skip to content

Commit

Permalink
send sccache, ninja, and filesize logs to telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan committed Feb 21, 2025
1 parent 90dc38c commit 68b3a40
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (c) 2019-2024, NVIDIA CORPORATION.
# Copyright (c) 2019-2025, NVIDIA CORPORATION.

# cuDF build script

Expand Down Expand Up @@ -303,11 +303,17 @@ if buildAll || hasArg libcudf; then
cd ${LIB_BUILD_DIR}

compile_start=$(date +%s)
cmake --build . -j${PARALLEL_LEVEL} ${VERBOSE_FLAG}
cmake --build . -j${PARALLEL_LEVEL} ${VERBOSE_FLAG} 2>&1 | tee ${REPODIR}/telemetry-artifacts/build-libcudf.log
compile_end=$(date +%s)
compile_total=$(( compile_end - compile_start ))

# Record build times
cp ${LIB_BUILD_DIR}/.ninja_log ${REPODIR}/telemetry-artifacts/ninja-libcudf.log
sccache --show-adv-stats | tee ${REPODIR}/telemetry-artifacts/sccache-stats.txt
LIBCUDF_FS=$(ls -lh ${LIB_BUILD_DIR}/libcudf.so | awk '{print $5}')
echo "libcudf.so=$LIBCUDF_FS" >> ${REPODIR}/telemetry-artifacts/filesizes.log

# Record build times. TODO: this is replaced by the telemetry script, but leaving this here for now
# until people get used to finding this info on Grafana.
if [[ "$BUILD_REPORT_METRICS" == "ON" && -f "${LIB_BUILD_DIR}/.ninja_log" ]]; then
echo "Formatting build metrics"
MSG=""
Expand Down Expand Up @@ -343,29 +349,29 @@ if buildAll || hasArg pylibcudf; then

cd ${REPODIR}/python/pylibcudf
SKBUILD_CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX};-DCMAKE_LIBRARY_PATH=${LIBCUDF_BUILD_DIR};-DCMAKE_CUDA_ARCHITECTURES=${CUDF_CMAKE_CUDA_ARCHITECTURES};${EXTRA_CMAKE_ARGS}" \
python ${PYTHON_ARGS_FOR_INSTALL} .
python ${PYTHON_ARGS_FOR_INSTALL} . 2>&1 | tee ${REPODIR}/telemetry-artifacts/build-pylibcudf.log
fi

# Build and install the cudf Python package
if buildAll || hasArg cudf; then

cd ${REPODIR}/python/cudf
SKBUILD_CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX};-DCMAKE_LIBRARY_PATH=${LIBCUDF_BUILD_DIR};-DCMAKE_CUDA_ARCHITECTURES=${CUDF_CMAKE_CUDA_ARCHITECTURES};${EXTRA_CMAKE_ARGS}" \
python ${PYTHON_ARGS_FOR_INSTALL} .
python ${PYTHON_ARGS_FOR_INSTALL} . 2>&1 | tee ${REPODIR}/telemetry-artifacts/build-cudf.log
fi

# Build and install the cudf_polars Python package
if buildAll || hasArg cudf_polars; then

cd ${REPODIR}/python/cudf_polars
python ${PYTHON_ARGS_FOR_INSTALL} .
python ${PYTHON_ARGS_FOR_INSTALL} . 2>&1 | tee ${REPODIR}/telemetry-artifacts/build-cudf_polars.log
fi

# Build and install the dask_cudf Python package
if buildAll || hasArg dask_cudf; then

cd ${REPODIR}/python/dask_cudf
python ${PYTHON_ARGS_FOR_INSTALL} .
python ${PYTHON_ARGS_FOR_INSTALL} . 2>&1 | tee ${REPODIR}/telemetry-artifacts/build-dask_cudf.log
fi

if hasArg cudfjar; then
Expand All @@ -382,7 +388,7 @@ if hasArg libcudf_kafka; then


cd ${KAFKA_LIB_BUILD_DIR}
cmake --build . -j${PARALLEL_LEVEL} ${VERBOSE_FLAG}
cmake --build . -j${PARALLEL_LEVEL} ${VERBOSE_FLAG} | tee ${REPODIR}/telemetry-artifacts/build-libcudf_kafka.log

if [[ ${INSTALL_TARGET} != "" ]]; then
cmake --build . -j${PARALLEL_LEVEL} --target install ${VERBOSE_FLAG}
Expand All @@ -393,11 +399,11 @@ fi
if hasArg cudf_kafka; then
cd ${REPODIR}/python/cudf_kafka
SKBUILD_CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX};-DCMAKE_LIBRARY_PATH=${LIBCUDF_BUILD_DIR};${EXTRA_CMAKE_ARGS}"
python ${PYTHON_ARGS_FOR_INSTALL} .
python ${PYTHON_ARGS_FOR_INSTALL} . 2>&1 | tee ${REPODIR}/telemetry-artifacts/build-cudf_kafka.log
fi

# build custreamz Python package
if hasArg custreamz; then
cd ${REPODIR}/python/custreamz
python ${PYTHON_ARGS_FOR_INSTALL} .
python ${PYTHON_ARGS_FOR_INSTALL} . 2>&1 | tee ${REPODIR}/telemetry-artifacts/build-custreamz.log
fi

0 comments on commit 68b3a40

Please sign in to comment.