Skip to content

Commit

Permalink
hipclang doc update (#82)
Browse files Browse the repository at this point in the history
* hipclang doc update

* doxygen seem to struggle with tabs and spaces

* doc auto version sync
  • Loading branch information
ntrost57 authored Jun 29, 2020
1 parent dcfe3cc commit 0da3129
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 104 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ option(BUILD_VERBOSE "Output additional build information" OFF)
include(cmake/Dependencies.cmake)

# Setup version
rocm_setup_version(VERSION 1.14.4)
set(VERSION_STRING "1.14.4")
rocm_setup_version(VERSION ${VERSION_STRING})
set(rocsparse_SOVERSION 0.1)

# AMD targets
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "rocSPARSE"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v3.0.1.0
PROJECT_NUMBER = v1.14.4

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
5 changes: 5 additions & 0 deletions docs/run_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ if [ -d docBin ]; then
rm -rf docBin
fi

cur_version=$(sed -n -e "s/^.*VERSION_STRING.* \"\([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt)
sed -i -e "s/\(PROJECT_NUMBER.*=\)\(.*\)/\1 v${cur_version}/" Doxyfile
sed -i -e "s/\(version.*=\)\(.*\)/\1 u'${cur_version}'/" source/conf.py
sed -i -e "s/\(release.*=\)\(.*\)/\1 u'${cur_version}'/" source/conf.py

sed -e 's/ROCSPARSE_EXPORT//g' ../library/include/rocsparse-functions.h > rocsparse-functions.h
sed -e 's/ROCSPARSE_EXPORT//g' ../library/include/rocsparse-auxiliary.h > rocsparse-auxiliary.h
sed -i 's/#include "rocsparse-export.h"//g' rocsparse-functions.h
Expand Down
3 changes: 3 additions & 0 deletions docs/run_doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ if [ -d docBin ]; then
rm -rf docBin
fi

cur_version=$(sed -n -e "s/^.*VERSION_STRING.* \"\([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt)
sed -i -e "s/\(PROJECT_NUMBER.*=\)\(.*\)/\1 v${cur_version}/" Doxyfile

sed -e 's/ROCSPARSE_EXPORT//g' ../library/include/rocsparse-functions.h > rocsparse-functions.h
sed -e 's/ROCSPARSE_EXPORT//g' ../library/include/rocsparse-auxiliary.h > rocsparse-auxiliary.h
sed -i 's/#include "rocsparse-export.h"//g' rocsparse-functions.h
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
# built documents.
#
# The short X.Y version.
version = u'3.4'
version = u'1.14.4'
# The full version, including alpha/beta/rc tags.
release = u'3.4'
release = u'1.14.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ C and C++ code is formatted using clang-format. To format a file, use

::

/opt/rocm/hcc/bin/clang-format -style=file -i <file>
/opt/rocm/llvm/bin/clang-format -style=file -i <file>

To format all files, run the following script in rocSPARSE directory:

Expand All @@ -115,7 +115,7 @@ To format all files, run the following script in rocSPARSE directory:
-o -iname '*.cpp.in' \
-o -iname '*.cl' \
| grep -v 'build' \
| xargs -n 1 -P 8 -I{} /opt/rocm/hcc/bin/clang-format -style=file -i {}
| xargs -n 1 -P 8 -I{} /opt/rocm/llvm/bin/clang-format -style=file -i {}

Library Source Organization
===========================
Expand Down
16 changes: 4 additions & 12 deletions docs/source/usermanual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ rocSPARSE can be built using the following commands:
$ mkdir -p build/release ; cd build/release

# Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX=<path> to adjust it
$ CXX=/opt/rocm/bin/hcc cmake ../..
$ CXX=/opt/rocm/bin/hipcc cmake ../..

# Compile rocSPARSE library
$ make -j$(nproc)
Expand All @@ -145,9 +145,9 @@ rocSPARSE with dependencies and clients can be built using the following command
$ cd ..

# Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX=<path> to adjust it
$ CXX=/opt/rocm/bin/hcc cmake ../.. -DBUILD_CLIENTS_TESTS=ON \
-DBUILD_CLIENTS_BENCHMARKS=ON \
-DBUILD_CLIENTS_SAMPLES=ON
$ CXX=/opt/rocm/bin/hipcc cmake ../.. -DBUILD_CLIENTS_TESTS=ON \
-DBUILD_CLIENTS_BENCHMARKS=ON \
-DBUILD_CLIENTS_SAMPLES=ON

# Compile rocSPARSE library
$ make -j$(nproc)
Expand All @@ -157,14 +157,6 @@ rocSPARSE with dependencies and clients can be built using the following command

Common build problems
`````````````````````
#. **Issue:** HIP (`/opt/rocm/hip`) was built using `hcc` 1.0.xxx-xxx-xxx-xxx, but you are using `/opt/rocm/bin/hcc` with version 1.0.yyy-yyy-yyy-yyy from `hipcc` (version mismatch). Please rebuild HIP including cmake or update HCC_HOME variable.

**Solution:** Download HIP from GitHub and use `hcc` to `build from source <https://github.com/ROCm-Developer-Tools/HIP/blob/master/INSTALL.md>`_ and then use the built HIP instead of `/opt/rocm/hip`.

#. **Issue:** HCC RUNTIME ERROR: Failed to find compatible kernel

**Solution:** Add the following to the cmake command when configuring: `-DCMAKE_CXX_FLAGS="--amdgpu-target=gfx803,gfx900,gfx906,gfx908"`

#. **Issue:** Could not find a package configuration file provided by "ROCM" with any of the following names: ROCMConfig.cmake, rocm-config.cmake

**Solution:** Install `ROCm cmake modules <https://github.com/RadeonOpenCompute/rocm-cmake>`_
Expand Down
Loading

0 comments on commit 0da3129

Please sign in to comment.