Skip to content

Commit

Permalink
Fix the build_project.sh with ROCr changes from ATD.
Browse files Browse the repository at this point in the history
  • Loading branch information
ampandey-AMD committed Dec 16, 2024
1 parent 86b8237 commit 72fdc6d
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 74 deletions.
2 changes: 1 addition & 1 deletion bin/aomp_common_vars
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
# no compiler at $AOMP so set where we expect ASAN_LIP_PATH to be
ASAN_LIB_PATH=${LLVM_INSTALL_LOC}/lib/clang/${AOMP_MAJOR_VERSION}/lib/linux
fi
ASAN_FLAGS="-g -fsanitize=address -shared-libasan -Wl,-rpath=$ASAN_LIB_PATH -L$ASAN_LIB_PATH"
ASAN_FLAGS="-fsanitize=address -shared-libasan -Wl,-rpath=$ASAN_LIB_PATH -L$ASAN_LIB_PATH"
if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
ASAN_FLAGS="$ASAN_FLAGS -I$ROCM_DIR/include -I$ROCM_DIR/include/hsa"
fi
Expand Down
7 changes: 4 additions & 3 deletions bin/build_comgr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ osversion=$(cat /etc/os-release)
#fi

if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
ASAN_FLAGS="$ASAN_FLAGS"
LDFLAGS="-fuse-ld=lld $ASAN_FLAGS"
fi

Expand All @@ -62,7 +63,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
echo "This is a FRESH START. ERASING any previous builds in $BUILD_AOMP/build_comgr"
echo "Use ""$0 nocmake"" or ""$0 install"" to avoid FRESH START."

BUILDTYPE="Release"
BUILDTYPE="Debug"
echo $SUDO rm -rf $BUILD_AOMP/build/comgr
$SUDO rm -rf $BUILD_AOMP/build/comgr
export LLVM_DIR=$AOMP_INSTALL_DIR
Expand Down Expand Up @@ -94,8 +95,8 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
cd $BUILD_AOMP/build/comgr/asan
echo " -----Running comgr-asan cmake ----- "
ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DCMAKE_C_COMPILER=$LLVM_INSTALL_LOC/bin/clang -DCMAKE_CXX_COMPILER=$LLVM_INSTALL_LOC/bin/clang++"
echo ${AOMP_CMAKE} ${ASAN_CMAKE_OPTS} -DCMAKE_PREFIX_PATH="$AOMP/lib/asan/cmake;$COMMON_PREFIX_PATH:$AOMP/lib/cmake" -DCMAKE_INSTALL_LIBDIR=lib/asan $AOMP_ASAN_ORIGIN_RPATH -DCMAKE_C_FLAGS="'$ASAN_FLAGS'" -DCMAKE_CXX_FLAGS="'$ASAN_FLAGS'" $AOMP_ASAN_ORIGIN_RPATH $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_COMGR_REPO_NAME
${AOMP_CMAKE} ${ASAN_CMAKE_OPTS} -DCMAKE_PREFIX_PATH="$AOMP/lib/asan/cmake;$COMMON_PREFIX_PATH;$AOMP/lib/cmake" -DCMAKE_INSTALL_LIBDIR=lib/asan $AOMP_ASAN_ORIGIN_RPATH -DCMAKE_C_FLAGS="'$ASAN_FLAGS'" -DCMAKE_CXX_FLAGS="'$ASAN_FLAGS'" $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_COMGR_REPO_NAME
echo ${AOMP_CMAKE} ${ASAN_CMAKE_OPTS} -DCMAKE_PREFIX_PATH="$AOMP/lib/asan/cmake;$COMMON_PREFIX_PATH:$AOMP/lib/cmake" -DCMAKE_INSTALL_LIBDIR=lib/asan $AOMP_ASAN_ORIGIN_RPATH -DCMAKE_C_FLAGS="'-O0 $ASAN_FLAGS'" -DCMAKE_CXX_FLAGS="'-O0 $ASAN_FLAGS'" $AOMP_ASAN_ORIGIN_RPATH $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_COMGR_REPO_NAME
${AOMP_CMAKE} ${ASAN_CMAKE_OPTS} -DCMAKE_PREFIX_PATH="$AOMP/lib/asan/cmake;$COMMON_PREFIX_PATH;$AOMP/lib/cmake" -DCMAKE_INSTALL_LIBDIR=lib/asan $AOMP_ASAN_ORIGIN_RPATH -DCMAKE_C_FLAGS="'-O0 $ASAN_FLAGS'" -DCMAKE_CXX_FLAGS="'-O0 $ASAN_FLAGS'" $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_COMGR_REPO_NAME
if [ $? != 0 ] ; then
echo "ERROR comgr-asan cmake failed. cmake flags"
exit 1
Expand Down
14 changes: 11 additions & 3 deletions bin/build_hipamd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ if [ "$1" == "install" ] ; then
$SUDO rm $AOMP_INSTALL_DIR/testfile
fi

patchrepo $AOMP_REPOS/hipamd
#patchrepo $AOMP_REPOS/hipamd

if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
LDFLAGS="-fuse-ld=lld $ASAN_FLAGS"
LDFLAGS="-fuse-ld=lld $ASAN_FLAGS"
fi

_ompd_src_dir="$LLVM_INSTALL_LOC/share/gdb/python/ompd/src"
Expand All @@ -90,14 +90,22 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
rm -rf $BUILD_DIR/build/hipamd
fi

<<<<<<< Updated upstream
MYCMAKEOPTS="-DCMAKE_BUILD_TYPE=$BUILDTYPE \
||||||| Stash base
export ROCM_RPATH="$AOMP_ORIGIN_RPATH_LIST"
MYCMAKEOPTS="-DCMAKE_BUILD_TYPE=$BUILDTYPE \
=======
export ROCM_RPATH="$AOMP_ORIGIN_RPATH_LIST"
MYCMAKEOPTS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
>>>>>>> Stashed changes
-DCMAKE_INSTALL_PREFIX=$AOMP_INSTALL_DIR \
-DHIP_COMMON_DIR=$HIP_DIR \
-DHIP_PLATFORM=amd \
-DHIP_COMPILER=clang \
-DCMAKE_HIP_ARCHITECTURES=OFF \
-DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=ON \
-DHIPCC_BIN_DIR=$AOMP_REPOS/build/hipcc \
-DHIPCC_BIN_DIR=$AOMP_REPOS/../build/hipcc \
-DROCM_PATH=$ROCM_PATH"

# If this machine does not have an actvie amd GPU, tell hipamd
Expand Down
106 changes: 53 additions & 53 deletions bin/build_hipcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
# SOFTWARE.

# --- Start standard header to set AOMP environment variables ----
realpath=`realpath $0`
thisdir=`dirname $realpath`
realpath=$(realpath $0)
thisdir=$(dirname $realpath)
. $thisdir/aomp_common_vars
# --- end standard header ----

Expand All @@ -37,7 +37,7 @@ BUILDTYPE="Release"

INSTALL_HIPCC=${INSTALL_HIPCC:-$AOMP_INSTALL_DIR}

if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ] ; then
if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ]; then
echo " "
echo "Example commands and actions: "
echo " ./build_hipcc.sh cmake, make, NO Install "
Expand All @@ -47,37 +47,37 @@ if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ] ; then
exit
fi

if [ ! -d $EXTRAS_REPO_DIR ] ; then
echo "ERROR: Missing repository $EXTRAS_REPO_DIR/"
exit 1
if [ ! -d $EXTRAS_REPO_DIR ]; then
echo "ERROR: Missing repository $EXTRAS_REPO_DIR/"
exit 1
fi

if [ ! -f $LLVM_INSTALL_LOC/bin/clang ] ; then
echo "ERROR: Missing file $LLVM_INSTALL_LOC/bin/clang"
echo " Build and install the AOMP clang compiler in $AOMP first"
echo " This is needed to build hipcc "
echo " "
exit 1
if [ ! -f $LLVM_INSTALL_LOC/bin/clang ]; then
echo "ERROR: Missing file $LLVM_INSTALL_LOC/bin/clang"
echo " Build and install the AOMP clang compiler in $AOMP first"
echo " This is needed to build hipcc "
echo " "
exit 1
fi

# Make sure we can update the install directory
if [ "$1" == "install" ] ; then
$SUDO mkdir -p $INSTALL_HIPCC
$SUDO touch $INSTALL_HIPCC/testfile
if [ $? != 0 ] ; then
echo "ERROR: No update access to $INSTALL_HIPCC"
exit 1
fi
$SUDO rm $INSTALL_HIPCC/testfile
if [ "$1" == "install" ]; then
$SUDO mkdir -p $INSTALL_HIPCC
$SUDO touch $INSTALL_HIPCC/testfile
if [ $? != 0 ]; then
echo "ERROR: No update access to $INSTALL_HIPCC"
exit 1
fi
$SUDO rm $INSTALL_HIPCC/testfile
fi

if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
if [ "$1" != "nocmake" ] && [ "$1" != "install" ]; then

if [ -d "$BUILD_DIR/build/hipcc" ] ; then
echo
echo "FRESH START , CLEANING UP FROM PREVIOUS BUILD"
echo rm -rf $BUILD_DIR/build/hipcc
rm -rf $BUILD_DIR/build/hipcc
if [ -d "$BUILD_DIR/build/hipcc" ]; then
echo
echo "FRESH START , CLEANING UP FROM PREVIOUS BUILD"
echo rm -rf $BUILD_DIR/build/hipcc
rm -rf $BUILD_DIR/build/hipcc
fi

MYCMAKEOPTS="-DCMAKE_BUILD_TYPE=$BUILDTYPE -DCMAKE_INSTALL_PREFIX=$AOMP_INSTALL_DIR"
Expand All @@ -89,11 +89,11 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
echo
echo " -----Running cmake ---- "
echo ${AOMP_CMAKE} $MYCMAKEOPTS $HIPCC_REPO_DIR
${AOMP_CMAKE} $MYCMAKEOPTS $HIPCC_REPO_DIR
if [ $? != 0 ] ; then
echo "ERROR hipcc cmake failed. Cmake flags"
echo " $MYCMAKEOPTS"
exit 1
${AOMP_CMAKE} $MYCMAKEOPTS $HIPCC_REPO_DIR
if [ $? != 0 ]; then
echo "ERROR hipcc cmake failed. Cmake flags"
echo " $MYCMAKEOPTS"
exit 1
fi
fi

Expand All @@ -104,31 +104,31 @@ fi
cd $BUILD_DIR/build/hipcc
echo
echo " -----Running make for hipcc ---- "
make -j $AOMP_JOB_THREADS
if [ $? != 0 ] ; then
echo " "
echo "ERROR: make -j $AOMP_JOB_THREADS FAILED"
echo "To restart:"
echo " cd $BUILD_DIR/build/hipcc"
echo " make "
exit 1
make -j $AOMP_JOB_THREADS
if [ $? != 0 ]; then
echo " "
echo "ERROR: make -j $AOMP_JOB_THREADS FAILED"
echo "To restart:"
echo " cd $BUILD_DIR/build/hipcc"
echo " make "
exit 1
else
if [ "$1" != "install" ] ; then
echo
echo " BUILD COMPLETE! To install hipcc component run this command:"
echo " $0 install"
echo
if [ "$1" != "install" ]; then
echo
echo " BUILD COMPLETE! To install hipcc component run this command:"
echo " $0 install"
echo
fi
fi

# ----------- Install only if asked ----------------------------
if [ "$1" == "install" ] ; then
cd $BUILD_DIR/build/hipcc
echo
echo " -----Installing to $INSTALL_HIPCC ----- "
$SUDO make install
if [ $? != 0 ] ; then
echo "ERROR make install failed "
exit 1
fi
if [ "$1" == "install" ]; then
cd $BUILD_DIR/build/hipcc
echo
echo " -----Installing to $INSTALL_HIPCC ----- "
$SUDO make install
if [ $? != 0 ]; then
echo "ERROR make install failed "
exit 1
fi
fi
9 changes: 4 additions & 5 deletions bin/build_libdevice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOURCEDIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_LIBDEVICE_REPO_NAME

REPO_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_LIBDEVICE_REPO_NAME

MYCMAKEOPTS="-DLLVM_DIR=$LLVM_DIR -DCMAKE_INSTALL_LIBDIR=lib"
MYCMAKEOPTS="-DLLVM_DIR=$LLVM_DIR -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$AOMP/llvm/bin/clang -DCMAKE_CXX_COMPILER=$AOMP/llvm/bin/clang++ -DCMAKE_BUILD_TYPE=Debug"

if [ ! -d $AOMP_INSTALL_DIR/lib ] ; then
echo "ERROR: Directory $AOMP/lib is missing"
Expand All @@ -37,8 +37,7 @@ export PATH=$LLVM_BUILD/bin:$PATH

patchrepo $REPO_DIR

if [ "$1" != "install" && "$1" != "nocmake" ]; then

if [ "$1" != "install" ] && [ "$1" != "nocmake" ];then
builddir_libdevice=$BUILD_DIR/build/libdevice
if [ -d $builddir_libdevice ] ; then
echo rm -rf $builddir_libdevice
Expand All @@ -53,8 +52,8 @@ if [ "$1" != "install" && "$1" != "nocmake" ]; then

CC="$LLVM_BUILD/bin/clang"
export CC
echo "${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_LIBDEVICE_REPO_NAME"
${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_LIBDEVICE_REPO_NAME
echo "${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_C_FLAGS="-O0 -g" -DCMAKE_CXX_FLAGS="-O0 -g" -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_LIBDEVICE_REPO_NAME"
${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_C_FLAGS="-O0 -g" -DCMAKE_CXX_FLAGS="-O0 -g" -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/$AOMP_LIBDEVICE_REPO_NAME
if [ $? != 0 ] ; then
echo "ERROR cmake failed command was \n"
echo " ${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $BUILD_DIR/$AOMP_LIBDEVICE_REPO_NAME"
Expand Down
2 changes: 1 addition & 1 deletion bin/build_offload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
else
MYCMAKEOPTS="$COMMON_CMAKE_OPTS -DCMAKE_PREFIX_PATH=$INSTALL_PREFIX/lib/cmake -DCMAKE_BUILD_TYPE=Release $OPENMP_EXTRAS_ORIGIN_RPATH"
fi
if [ "$AOMP_LEGACY_OPENMP" == "1" ] && [ "$SANITIZER" != 1 ]; then
if [ "$AOMP_LEGACY_OPENMP" == "1" ] || [ "$SANITIZER" != 1 ]; then
echo " -----Running offload cmake ---- "
mkdir -p $BUILD_DIR/build/offload
cd $BUILD_DIR/build/offload
Expand Down
10 changes: 6 additions & 4 deletions bin/build_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ WEBSITE="http\:\/\/github.com\/ROCm-Developer-Tools\/aomp"

# Check-openmp prep
# Patch rocr
ROCR_REPO_DIR=$AOMP_REPOS/$AOMP_ROCR_REPO_NAME
patchrepo $ROCR_REPO_DIR
if [ "$AOMP_APPLY_ATD_AMD_STAGING_PATCH" == 1 ] ; then
ROCR_REPO_DIR=$AOMP_REPOS/$AOMP_ROCR_REPO_NAME
patchrepo $ROCR_REPO_DIR
fi

# Patch llvm-project with ATD patch customized for amd-staging.
# WARNING: This patch (ATD_ASO_full.patch) rarely applies cleanly
Expand Down Expand Up @@ -218,8 +220,8 @@ cd $BUILD_DIR/build/$AOMP_PROJECT_REPO_NAME
if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
echo
echo " -----Running cmake ---- "
echo ${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm
${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm 2>&1
echo ${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_C_FLAGS="" -DCMAKE_CXX_FLAGS="" $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm
${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_C_FLAGS="" -DCMAKE_CXX_FLAGS="" $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm 2>&1
if [ $? != 0 ] ; then
echo "ERROR cmake failed. Cmake flags"
echo " $MYCMAKEOPTS"
Expand Down
6 changes: 3 additions & 3 deletions bin/build_rocprofiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
fi
BUILD_TYPE="Release"
export CMAKE_BUILD_TYPE=$BUILD_TYPE
CMAKE_PREFIX_PATH="$ROCM_DIR/roctracer/include/ext;$ROCM_DIR/include/platform;$ROCM_DIR/include;$ROCM_DIR/lib;$ROCM_DIR;$HOME/.local/bin;$HOME/local/aqlprofile;$LLVM_INSTALL_LOC"
CMAKE_PREFIX_PATH="$ROCM_DIR/roctracer/include/ext;$ROCM_DIR/include/platform;$ROCM_DIR/include;$ROCM_DIR/lib;$ROCM_DIR;$HOME/.local/bin;$AOMP_SUPP/aqlprofile;$LLVM_INSTALL_LOC"
export CMAKE_PREFIX_PATH
#export HSA_RUNTIME_INC=$ROCM_DIR/include
#export HSA_RUNTIME_LIB=$ROCM_DIR/include/lib
Expand All @@ -79,8 +79,8 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
cd $BUILD_AOMP/build/rocprofiler
export PATH=$HOME/.local/bin:$INSTALL_ROCPROF/bin:$PATH
echo " -----Running rocprofiler cmake ---- "
echo ${AOMP_CMAKE} -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_ASAN_PACKAGING=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DROCM_PATH=$AOMP_INSTALL_DIR -DCMAKE_MODULE_PATH=$INSTALL_ROCPROF/lib/cmake/hip -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCPROF -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" -DPROF_API_HEADER_PATH=$INSTALL_ROCPROF/include/roctracer/ext -DHIP_ROOT_DIR=$INSTALL_ROCPROF/hip $AOMP_REPOS/$AOMP_PROF_REPO_NAME -DAQLPROFILE_LIB=$AOMP_SUPP/aqlprofile/lib/libhsa-amd-aqlprofile64.so -DCMAKE_CXX_FLAGS=-I$HOME/local/rocmsmilib/include -DHIP_HIPCC_FLAGS="-I$HOME/local/rocmsmilib/include" -DCMAKE_EXE_LINKER_FLAGS="-L$HOME/local/rocmsmilib/lib -L$HOME/local/rocmsmilib/lib64 -Wl,--disable-new-dtags"
${AOMP_CMAKE} -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_ASAN_PACKAGING=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DROCM_PATH=$AOMP_INSTALL_DIR -DCMAKE_MODULE_PATH=$INSTALL_ROCPROF/lib/cmake/hip -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCPROF -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" -DPROF_API_HEADER_PATH=$INSTALL_ROCPROF/include/roctracer/ext -DHIP_ROOT_DIR=$INSTALL_ROCPROF/hip $AOMP_REPOS/$AOMP_PROF_REPO_NAME -DAQLPROFILE_LIB=$AOMP_SUPP/aqlprofile/lib/libhsa-amd-aqlprofile64.so -DCMAKE_CXX_FLAGS=-I$HOME/local/rocmsmilib/include -DHIP_HIPCC_FLAGS="-I$HOME/local/rocmsmilib/include" -DCMAKE_EXE_LINKER_FLAGS="-L$HOME/local/rocmsmilib/lib -L$HOME/local/rocmsmilib/lib64 -Wl,--disable-new-dtags"
echo ${AOMP_CMAKE} -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_ASAN_PACKAGING=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DROCM_PATH=$AOMP_INSTALL_DIR -DCMAKE_MODULE_PATH=$INSTALL_ROCPROF/lib/cmake/hip -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCPROF -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" -DPROF_API_HEADER_PATH=$INSTALL_ROCPROF/include/roctracer/ext -DHIP_ROOT_DIR=$INSTALL_ROCPROF/hip $AOMP_REPOS/$AOMP_PROF_REPO_NAME -DAQLPROFILE_LIB=$AOMP_SUPP/aqlprofile/lib/libhsa-amd-aqlprofile64.so -DCMAKE_CXX_FLAGS=-I$AOMP_SUPP/rocmsmilib/include -DHIP_HIPCC_FLAGS="-I$AOMP_SUPP/rocmsmilib/include" -DCMAKE_EXE_LINKER_FLAGS="-L$AOMP_SUPP/rocmsmilib/lib -L$AOMP_SUPP/rocmsmilib/lib64 -Wl,--disable-new-dtags"
${AOMP_CMAKE} -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_ASAN_PACKAGING=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DROCM_PATH=$AOMP_INSTALL_DIR -DCMAKE_MODULE_PATH=$INSTALL_ROCPROF/lib/cmake/hip -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCPROF -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" -DPROF_API_HEADER_PATH=$INSTALL_ROCPROF/include/roctracer/ext -DHIP_ROOT_DIR=$INSTALL_ROCPROF/hip $AOMP_REPOS/$AOMP_PROF_REPO_NAME -DAQLPROFILE_LIB="$AOMP_SUPP/aqlprofile/lib/libhsa-amd-aqlprofile64.so" -DCMAKE_CXX_FLAGS="-I$AOMP_SUPP/rocmsmilib/include" -DHIP_HIPCC_FLAGS="-I$AOMP_SUPP/rocmsmilib/include" -DCMAKE_EXE_LINKER_FLAGS="-L$AOMP_SUPP/rocmsmilib/lib -L$AOMP_SUPP/rocmsmilib/lib64 -Wl,--disable-new-dtags"
if [ $? != 0 ] ; then
echo "ERROR rocprofiler cmake failed. cmake flags"
echo " $MYCMAKEOPTS"
Expand Down
2 changes: 1 addition & 1 deletion bin/build_rocr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
echo "This is a FRESH START. ERASING any previous builds in $BUILD_AOMP/build_rocr"
echo "Use ""$0 nocmake"" or ""$0 install"" to avoid FRESH START."

BUILDTYPE="Release"
BUILDTYPE="Debug"
echo rm -rf $BUILD_AOMP/build/rocr
rm -rf $BUILD_AOMP/build/rocr
export PATH=/opt/rocm/llvm/bin:$PATH
Expand Down
2 changes: 2 additions & 0 deletions bin/run_rocm_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ export AOMP_GPU

# Enable AMDGPU Sanitizer Testing
if [ "$1" == "-a" ]; then
echo "Enabling Sanitizer Testing!!!!"
echo "Value of AOMPROCM env variable :- $AOMPROCM"
export AOMP_SANITIZER=1
export LD_LIBRARY_PATH=$AOMP/lib/asan:$AOMPROCM/lib/asan:$LD_LIBRARY_PATH
fi
Expand Down

0 comments on commit 72fdc6d

Please sign in to comment.