Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjodin committed May 24, 2019
2 parents 1260186 + cce06f9 commit 49293db
Show file tree
Hide file tree
Showing 34 changed files with 1,568 additions and 111 deletions.
10 changes: 8 additions & 2 deletions LINUXSUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee
wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list
sudo apt update
sudo install rock_dkms
sudo apt install rock-dkms
sudo reboot
sudo usermod -a -G video $LOGNAME
```
### NVIDIA CUDA Driver
To build AOMP with support for nvptx GPUs, you must first install CUDA 10. We recommend CUDA 10.0. CUDA 10.1 will not work until AOMP moves to the trunk development of LLVM 9. Once you download CUDA 10.0 local install file, these commands should complete the install of CUDA. The CUDA installation is now optional. Note the first command references the install for Ubuntu 16.04.
To build AOMP with support for nvptx GPUs, you must first install CUDA 10. We recommend CUDA 10.0. CUDA 10.1 will not work until AOMP moves to the trunk development of LLVM 9. The CUDA installation is now optional. Note these instructions reference the install for Ubuntu 16.04.

<b>Download Instructions for CUDA (Ubuntu 16.04)</b>
1. Go to https://developer.nvidia.com/cuda-10.0-download-archive
2. For Ubuntu 16.04, select Linux, x86_64, Ubuntu, 16.04, deb(local) and then click Download. Note you can change these options for your specific distribution type.
3. Navigate to the debian in your Linux directory and run the following commands:
```
sudo dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
```
Depending on your system the CUDA install could take a very long time.

## openSuse Support
Coming Soon.
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
AOMP - V 0.6-1
AOMP - V 0.6-2
==============

AOMP: AMD OpenMP Compiler

This is README.md for https://github.com/ROCM-Developer-Tools/aomp . This is the base repository for AOMP, Use this for issues, documentation, packaging, examples, build.

The last release of AOMP is version 0.6-1. Currently version 0.6-2 is under development.
The last release of AOMP is version 0.6-2. Currently version 0.6-3 is under development.

AOMP is an experimental PROTOTYPE that is intended to support multiple programming models including OpenMP 4.5+,
, HIP, and cuda clang. It supports offloading to multiple GPU acceleration targets(multi-target). It also supports different host platforms such as AMD64, PPC64LE, and AARCH64. (multi-platform).
Expand Down Expand Up @@ -74,24 +74,24 @@ Software License Agreement.

AOMP needs certain support for Linux to function properly, such as the KFD driver for AMD GPUs and CUDA for nvptx. Click [LINUXSUPPORT](LINUXSUPPORT.md) for more information.

## AOMP Install V 0.6-1
## AOMP Install V 0.6-2

<A NAME="Install">

### Debian/Ubunutu Install

On Ubuntu 18.04 LTS (bionic beaver), run these commands:
```
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/r/aomp_Ubuntu1804_0.6-1_amd64.deb
sudo dpkg -i aomp_Ubuntu1804_0.6-1_amd64.deb
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_0.6-2/aomp_Ubuntu1804_0.6-2_amd64.deb
sudo dpkg -i aomp_Ubuntu1804_0.6-2_amd64.deb
```
The AOMP bin directory (which includes the standard clang and llvm binaries) is not intended to be in your PATH for typical operation.

<!--### RPM Install
For rpm-based Linux distributions, use this rpm
```
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/r/aomp-0.6-1.x86_64.rpm
sudo rpm -i aomp-0.6-1.x86_64.rpm
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/r/aomp-0.6-2.x86_64.rpm
sudo rpm -i aomp-0.6-2.x86_64.rpm
```
-->
### No root Debian Install
Expand All @@ -100,8 +100,8 @@ By default, the packages install their content to the release directory /opt/roc

To install the debian package without root access into your home directory, you can run these commands.
```
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/r/aomp_Ubuntu1604_0.6-1_amd64.deb
dpkg -x aomp_Ubuntu1604_0.6-1_amd64.deb /tmp/temproot
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_0.6-2/aomp_Ubuntu1604_0.6-2_amd64.deb
dpkg -x aomp_Ubuntu1604_0.6-2_amd64.deb /tmp/temproot
mv /tmp/temproot/opt/rocm $HOME
export PATH=$PATH:$HOME/rocm/aomp/bin
export AOMP=$HOME/rocm/aomp
Expand All @@ -115,8 +115,8 @@ By default, the packages install their content to the release directory /opt/roc
To install the rpm package without root access into your home directory, you can run these commands.
```
mkdir /tmp/temproot ; cd /tmp/temproot
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/r/aomp-0.6-1.x86_64.rpm
rpm2cpio aomp-0.6-1.x86_64.rpm | cpio -idmv
wget https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_0.6-2/aomp-0.6-2.x86_64.rpm
rpm2cpio aomp-0.6-2.x86_64.rpm | cpio -idmv
mv /tmp/temproot/opt/rocm $HOME
export PATH=$PATH:$HOME/rocm/aomp/bin
export AOMP=$HOME/rocm/aomp
Expand Down
52 changes: 24 additions & 28 deletions SOURCEINSTALL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Source Install V 0.6-2 (DEV)
# Source Install V 0.6-3 (DEV)

Build and install from sources is possible. However, the source build for AOMP is complex for several reasons.
- Many repos are required. The clone_aomp.sh script ensures you have all repos and the correct branch.
Expand All @@ -11,42 +11,38 @@ Building AOMP from source requires these dependencies that can be resolved on an
```
sudo apt-get install cmake g++-5 g++ pkg-config libpci-dev libnuma-dev libelf-dev libffi-dev git python libopenmpi-dev
```
The ROCm kernel driver is required for AMD GPU support. These commands are for supported Debian-based systems and target only the rock_dkms core component. More information can be found [HERE](https://rocm.github.io/ROCmInstall.html#ubuntu-support---installing-from-a-debian-repository).
```
echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rules
wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list
sudo apt update
sudo install rock_dkms
## AOMP Verify and Install Linux Support

Please verify you have the proper software installed as AOMP needs certain support for Linux to function properly, such as the KFD driver for AMD GPUs and CUDA for nvptx. Click [LINUXSUPPORT](LINUXSUPPORT.md) for more information.

## Clone and Build AOMP

sudo reboot
sudo usermod -a -G video $LOGNAME
```
To build AOMP with support for nvptx GPUs, you must first install CUDA 10. We recommend CUDA 10.0. CUDA 10.1 will not work until AOMP moves to the trunk development of LLVM 9. Once you download CUDA 10.0 local install file, these commands should complete the install of CUDA. The CUDA installation is now optional. Note the first command references the install for Ubuntu 16.04.
```
sudo dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
```
To build AOMP from source, run these commands.
```
cd $HOME ; mkdir -p git/aomp ; cd git/aomp
git clone https://github.com/rocm-developer-tools/aomp
cd $HOME/git/aomp/aomp/bin
git checkout master
./clone_aomp.sh
./build_aomp.sh
```
Depending on your system, the last two commands and the CUDA install could take a very long time. For more information, please refer to the AOMP developers README file located [HERE](bin/README.md).

The source build process above builds the development version of AOMP by checking out the master branch of AOMP. The development version is the next version to be released. It is possible that the development version is broken due to regressions that often occur during development. If you want to build from the sources of a previous release such as 0.6-1, run these commands before running clone_aomp.sh.
<b>Choose a Build Version (Development or Release)</b>
The development version is the next version to be released. It is possible that the development version is broken due to regressions that often occur during development. If instead, you want to build from the sources of a previous release such as 0.6-2 that is possible as well.

<b>For the Development Branch:</b>
```
git checkout rel_0.6.1
git pull
git checkout master
```
You only need to do this in the AOMP repository. The file "bin/aomp_common_vars" lists the branches of each repository for a particular AOMP release. In the master branch of AOMP, aomp_common_vars lists the development branches. It is a good idea to run clone_aomp.sh twice after you checkout a release to be sure you pulled all the checkouts for a particular release.

If your are interested in joining the development of AOMP, please read the details on the source build at [README](bin/README.md).
<b>For the Release Branch:</b>
```
git checkout rel_0.6-2
git pull
```
<b>Clone and Build:</b>
```
./clone_aomp.sh
./build_aomp.sh
```
Depending on your system, the last two commands could take a very long time. For more information, please refer to the AOMP developers README file located [HERE](bin/README.md).

You only need to do the checkout/pull in the AOMP repository. The file "bin/aomp_common_vars" lists the branches of each repository for a particular AOMP release. In the master branch of AOMP, aomp_common_vars lists the development branches. It is a good idea to run clone_aomp.sh twice after you checkout a release to be sure you pulled all the checkouts for a particular release.

If your are interested in joining the development of AOMP, please read the details on the source build at [README](bin/README.md).
8 changes: 7 additions & 1 deletion bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ build_llvm.sh - Build llvm component
build_lld.sh - Build lld component
build_clang.sh - Build clang component
build_extras.sh - Builds hostcall, libm, and utils all stored in the aomp-extras repo
build_utils.sh - Builds the AOMP utilities
build_atmi.sh - Builds early release of ATMI for aomp.
Expand All @@ -32,7 +34,8 @@ build_hip.sh - Builds the hip host runtimes needed by aomp.
build_openmp.sh - Builds the OpenMP libraries for aomp.
build_libdevice.sh - Builds the device bc libraries from rocm-device-libs
build_libdevice.sh - Builds the rocdl device bc libraries from rocm-device-libs
build_libm.sh - Built the libm DBCL (Device BC Library)
```
Expand Down Expand Up @@ -136,6 +139,9 @@ Developers may update a component and then run these scripts in the folowing or
./build_clang.sh
./build_clang.sh install
./build_extras.sh
./build_extras.sh install
./build_utils.sh
./build_utils.sh install
Expand Down
24 changes: 13 additions & 11 deletions bin/aomp_common_vars
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Set the AOMP VERSION STRING.
# After a release, this is changed to the next release under development
AOMP_VERSION=${AOMP_VERSION:-"0.6"}
AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"2"}
AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"3"}
AOMP_VERSION_STRING=${AOMP_VERSION_STRING:-"$AOMP_VERSION-$AOMP_VERSION_MOD"}
export AOMP_VERSION_STRING

Expand Down Expand Up @@ -69,35 +69,37 @@ GITKHRONOS="https://github.com/KhronosGroup"
AOMP_REPO_NAME=${AOMP_REPO_NAME:-aomp}
AOMP_REPO_BRANCH=${AOMP_REPO_BRANCH:-master}
AOMP_LLVM_REPO_NAME=${AOMP_LLVM_REPO_NAME:-llvm}
AOMP_LLVM_REPO_BRANCH=${AOMP_LLVM_REPO_BRANCH:-release_80_AOMP}
AOMP_LLVM_REPO_BRANCH=${AOMP_LLVM_REPO_BRANCH:-release_80_AOMP_063}
AOMP_CLANG_REPO_NAME=${AOMP_CLANG_REPO_NAME:-clang}
AOMP_CLANG_REPO_BRANCH=${AOMP_CLANG_REPO_BRANCH:-release_80_AOMP}
AOMP_CLANG_REPO_BRANCH=${AOMP_CLANG_REPO_BRANCH:-release_80_AOMP_063}
AOMP_LLD_REPO_NAME=${AOMP_LLD_REPO_NAME:-lld}
AOMP_LLD_REPO_BRANCH=${AOMP_LLD_REPO_BRANCH:-release_80}
AOMP_OPENMP_REPO_NAME=${AOMP_OPENMP_REPO_NAME:-openmp}
AOMP_OPENMP_REPO_BRANCH=${AOMP_OPENMP_REPO_BRANCH:-release_80_AOMP}
AOMP_OPENMP_REPO_BRANCH=${AOMP_OPENMP_REPO_BRANCH:-release_80_AOMP_063}
AOMP_LIBDEVICE_REPO_NAME=${AOMP_LIBDEVICE_REPO_NAME:-rocm-device-libs}
AOMP_LIBDEVICE_REPO_BRANCH=${AOMP_LIBDEVICE_REPO_BRANCH:-AOMP-181210}
AOMP_OCLRUNTIME_REPO_NAME=${AOMP_OCLRUNTIME_REPO_NAME:-rocm-opencl-runtime}
AOMP_OCLRUNTIME_REPO_BRANCH=${AOMP_OCLRUNTIME_REPO_BRANCH:-roc-2.1.x}
AOMP_OCLRUNTIME_REPO_BRANCH=${AOMP_OCLRUNTIME_REPO_BRANCH:-roc-2.4.x}
AOMP_OCLDRIVER_REPO_NAME=${AOMP_OCLDRIVER_REPO_NAME:-rocm-opencl-driver}
AOMP_OCLDRIVER_REPO_BRANCH=${AOMP_OCLDRIVER_REPO_BRANCH:-roc-2.1.x}
AOMP_OCLDRIVER_REPO_BRANCH=${AOMP_OCLDRIVER_REPO_BRANCH:-roc-2.4.x}
AOMP_OCLICD_REPO_NAME=${AOMP_OCLICD_REPO_NAME:-opencl-icd-loader}
AOMP_OCLICD_REPO_BRANCH=${AOMP_OCLICD_REPO_BRANCH:-master}
AOMP_HCC_REPO_NAME=${AOMP_HCC_REPO_NAME:-hcc}
AOMP_HCC_REPO_BRANCH=${AOMP_HCC_REPO_BRANCH:-roc-2.1.x}
AOMP_HCC_REPO_BRANCH=${AOMP_HCC_REPO_BRANCH:-roc-2.4.x}
AOMP_HIP_REPO_NAME=${AOMP_HIP_REPO_NAME:-hip}
AOMP_HIP_REPO_BRANCH=${AOMP_HIP_REPO_BRANCH:-AOMP-190412}
AOMP_ROCT_REPO_NAME=${AOMP_ROCT_REPO_NAME:-roct-thunk-interface}
AOMP_ROCT_REPO_BRANCH=${AOMP_ROCT_REPO_BRANCH:-roc-2.1.x}
AOMP_ROCT_REPO_BRANCH=${AOMP_ROCT_REPO_BRANCH:-roc-2.4.x}
AOMP_ROCR_REPO_NAME=${AOMP_ROCR_REPO_NAME:-rocr-runtime}
AOMP_ROCR_REPO_BRANCH=${AOMP_ROCR_REPO_BRANCH:-roc-2.1.x}
AOMP_ROCR_REPO_BRANCH=${AOMP_ROCR_REPO_BRANCH:-roc-2.4.x}
AOMP_ATMI_REPO_NAME=${AOMP_ATMI_REPO_NAME:-atmi}
AOMP_ATMI_REPO_BRANCH=${AOMP_ATMI_REPO_BRANCH:-atmi-0.5}
AOMP_ATMI_REPO_BRANCH=${AOMP_ATMI_REPO_BRANCH:-atmi-0.5-063}
AOMP_EXTRAS_REPO_BRANCH=${AOMP_EXTRAS_REPO_BRANCH:-master}
AOMP_EXTRAS_REPO_NAME=${AOMP_EXTRAS_REPO_NAME:-aomp-extras}
AOMP_APPS_REPO_NAME=${AOMP_APPS_REPO_NAME:-openmpapps}
AOMP_APPS_REPO_BRANCH=${AOMP_APPS_REPO_BRANCH:-AOMP-0.5}
AOMP_COMGR_REPO_NAME=${AOMP_COMGR_REPO_NAME:-rocm-compilersupport}
AOMP_COMGR_REPO_BRANCH=${AOMP_COMGR_REPO_BRANCH:-roc-2.1.x}
AOMP_COMGR_REPO_BRANCH=${AOMP_COMGR_REPO_BRANCH:-roc-2.4.x}
AOMP_FLANG_REPO_NAME=${AOMP_FLANG_REPO_NAME:-flang}
AOMP_FLANG_REPO_BRANCH=${AOMP_FLANG_REPO_BRANCH:-master}

Expand Down
4 changes: 2 additions & 2 deletions bin/build_aomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ echo " ================= START build_aomp.sh ==================="
echo

if [ "$AOMP_BUILD_HIP" == 1 ] ; then
components="roct rocr llvm lld clang utils hcc hip atmi openmp libdevice libm"
components="roct rocr llvm lld clang extras utils hcc hip atmi openmp libdevice libm"
else
# The hip build will only install headers if AOMP_BUILD_HIP is off
# if AOMP_BUILD_HIP is off, then hcc is not built
components="roct rocr llvm lld clang utils hip atmi openmp libdevice libm"
components="roct rocr llvm lld clang extras utils hip atmi openmp libdevice libm"
fi
for COMPONENT in $components ; do
echo
Expand Down
3 changes: 3 additions & 0 deletions bin/build_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
#
BUILD_TYPE=${BUILD_TYPE:-Release}
if [ $CLANG_BUILD_TYPE"1" != "1" ] ; then
BUILD_TYPE=$CLANG_BUILD_TYPE
fi

# --- Start standard header ----
function getdname(){
Expand Down
Loading

0 comments on commit 49293db

Please sign in to comment.