Skip to content

Commit

Permalink
Update pom to include libcudf path and use semi-colon as delimiter in…
Browse files Browse the repository at this point in the history
… build info script

Signed-off-by: Partho Sarthi <psarth@nvidia.com>
  • Loading branch information
parthosa committed Mar 6, 2024
1 parent 4daf3f8 commit 82cfc38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/build-info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

#
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -20,19 +20,21 @@
# Arguments:
# version - The current version of the project
# git_path - The path to the repository
# library_path - The path to the libcudf library
set -e

echo_build_properties() {
version=$1
git_path=$2
shift 2
library_path=$3
shift 3
echo version=$version
echo user=$USER
echo revision=$(cd "$git_path" && git rev-parse HEAD)
echo branch=$(cd "$git_path" && git rev-parse --abbrev-ref HEAD)
echo date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
echo url=$(cd "$git_path" && git config --get remote.origin.url)
echo gpu_architectures=$(cd "$git_path" && find . -name libcudfjni.a -o -name libcudf.a | xargs -n 1 bash -c 'cuobjdump $1 || exit 0' _ | grep 'arch = ' | awk -F_ '{print $2}' | sort -n -u)
echo gpu_architectures=$(cd "$git_path" && cuobjdump "$library_path" 2>/dev/null | grep 'arch = ' | awk -F_ '{print $2}' | sort -n -u | tr '\n' ';')
for arg in "$@"; do
echo $arg
done
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,15 @@
<arg value="${project.basedir}/build/build-info"/>
<arg value="${project.version}"/>
<arg value="${cudf.path}"/>
<arg value="${libcudf.build.path}/libcudf.a"/>
</exec>
<exec executable="bash"
output="${project.build.directory}/extra-resources/spark-rapids-jni-version-info.properties"
failonerror="true">
<arg value="${project.basedir}/build/build-info"/>
<arg value="${project.version}"/>
<arg value="${project.basedir}"/>
<arg value="${native.build.path}/libcudf.so"/>
</exec>
</target>
</configuration>
Expand Down

0 comments on commit 82cfc38

Please sign in to comment.