Skip to content

Commit

Permalink
Add GPU architectures to the build-info file (#1840)
Browse files Browse the repository at this point in the history
Add semicolon-separated list of target GPU archs as `gpu_architectures` version info property

---------
Signed-off-by: Partho Sarthi <[email protected]>
  • Loading branch information
parthosa authored Mar 7, 2024
1 parent 0af4d0d commit 8f8aeed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 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,18 +20,21 @@
# Arguments:
# version - The current version of the project
# git_path - The path to the repository
# libcudf_path - The path to the libcudf library
set -e

echo_build_properties() {
version=$1
git_path=$2
shift 2
libcudf_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=$(cuobjdump "$libcudf_path" 2>/dev/null | awk -F_ '/arch =/ {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 8f8aeed

Please sign in to comment.