mirror of
https://github.com/ROCm/ROCm.git
synced 2026-01-10 07:08:08 -05:00
42 lines
1007 B
Bash
Executable File
42 lines
1007 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
|
|
|
set_component_src TransferBench
|
|
|
|
build_transferbench() {
|
|
echo "Start build"
|
|
|
|
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
|
ack_and_skip_static
|
|
fi
|
|
|
|
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
|
init_rocm_common_cmake_params
|
|
|
|
CXX=$(set_build_variables __HIP_CC__) \
|
|
cmake "${rocm_math_common_cmake_params[@]}" "$COMPONENT_SRC"
|
|
make package
|
|
|
|
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
|
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
|
show_build_cache_stats
|
|
}
|
|
|
|
clean_transferbench() {
|
|
echo "Cleaning TransferBench build directory: ${BUILD_DIR} ${PACKAGE_DIR}"
|
|
rm -rf "$BUILD_DIR" "$PACKAGE_DIR"
|
|
echo "Done!"
|
|
}
|
|
|
|
stage2_command_args "$@"
|
|
|
|
case $TARGET in
|
|
build) build_transferbench; build_wheel ;;
|
|
outdir) print_output_directory ;;
|
|
clean) clean_transferbench ;;
|
|
*) die "Invalid target $TARGET" ;;
|
|
esac
|