Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Doc updates #81

Open
wants to merge 318 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
318 commits
Select commit Hold shift + click to select a range
456eec3
Update Current-Release-Notes.rst
Rmalavally Jul 7, 2020
9789fe3
Update Current-Release-Notes.rst
Rmalavally Jul 7, 2020
e0ca454
Update Current-Release-Notes.rst
Rmalavally Jul 7, 2020
7550993
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
4c4c17e
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
ea28c8d
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
e941331
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
fe5bf56
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
ce8f5a8
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
1546a83
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
4b35da9
Update Current-Release-Notes.rst
Rmalavally Jul 8, 2020
6fa3d91
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
63cd475
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
7cbca6e
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
3264769
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
4c505b7
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
ac61ca2
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
ed53201
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
a5109f2
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
b22957a
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
08f5748
Update Current-Release-Notes.rst
Rmalavally Jul 9, 2020
b6d0cb9
Update Current-Release-Notes.rst
Rmalavally Aug 16, 2020
7e1b453
Update Current-Release-Notes.rst
Rmalavally Aug 16, 2020
dc8fe18
Update Current-Release-Notes.rst
Rmalavally Aug 16, 2020
d2af329
Update Current-Release-Notes.rst
Rmalavally Aug 16, 2020
2e86303
Update Current-Release-Notes.rst
Rmalavally Aug 16, 2020
66867cf
Update Current-Release-Notes.rst
Rmalavally Aug 18, 2020
ca62353
Update Current-Release-Notes.rst
Rmalavally Aug 19, 2020
bd0dc12
Update Current-Release-Notes.rst
Rmalavally Aug 20, 2020
0c4ed62
Update Current-Release-Notes.rst
Rmalavally Aug 20, 2020
e4f3e69
Update Current-Release-Notes.rst
Rmalavally Aug 20, 2020
19d10f2
Update Current-Release-Notes.rst
Rmalavally Aug 20, 2020
7ec89ea
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
5dc9378
Add files via upload
Rmalavally Sep 16, 2020
13c4e69
Delete RDCComponentsrevised.png
Rmalavally Sep 16, 2020
a3dbd06
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
d7b2f79
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
d63c8cc
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
b9d42d4
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
0b1abf7
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
34c8482
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
70ae89e
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
9d98ff7
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
50edcfc
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
74ddd90
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
608eeae
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
cbaf73b
Update Current-Release-Notes.rst
Rmalavally Sep 16, 2020
b28d292
Update Current-Release-Notes.rst
Rmalavally Sep 18, 2020
38351b6
Update Current-Release-Notes.rst
Rmalavally Sep 18, 2020
d5a5468
Update Current-Release-Notes.rst
Rmalavally Sep 18, 2020
3c64ee1
Add files via upload
Rmalavally Sep 18, 2020
43906b5
Update Current-Release-Notes.rst
Rmalavally Sep 18, 2020
7922020
Update Current-Release-Notes.rst
Rmalavally Sep 18, 2020
d34fef9
Add files via upload
Rmalavally Sep 19, 2020
64325e0
Add files via upload
Rmalavally Sep 19, 2020
60883f9
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
de32a21
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
d409385
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
84c6aa3
Delete forweb.PNG
Rmalavally Oct 27, 2020
ae8a6d3
Delete staticlinkinglib.PNG
Rmalavally Oct 27, 2020
62bdb84
Add files via upload
Rmalavally Oct 27, 2020
c4f716f
Delete RDCComponentsrevised.png
Rmalavally Oct 27, 2020
f12f8e0
Add files via upload
Rmalavally Oct 27, 2020
5690d73
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
29fc16e
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
12af3f2
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
3579056
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
10054c6
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
543c2a9
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
cf66c13
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
d4916d7
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
c110125
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
2ba818d
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
6e0d407
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
df993fc
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
301f221
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2020
779a402
Update Current-Release-Notes.rst
Rmalavally Oct 28, 2020
f886aab
Update Current-Release-Notes.rst
Rmalavally Oct 28, 2020
306d94b
Update Current-Release-Notes.rst
Rmalavally Oct 28, 2020
49836e7
Update Current-Release-Notes.rst
Rmalavally Oct 28, 2020
6fd4d8d
Update Current-Release-Notes.rst
Rmalavally Nov 23, 2020
7337bde
Update Current-Release-Notes.rst
Rmalavally Nov 29, 2020
f705cc2
Delete GEMM2.PNG
Rmalavally Nov 29, 2020
8165779
Delete ROCMCLI1.PNG
Rmalavally Nov 29, 2020
bb97fb3
Delete ROCMCLI2.PNG
Rmalavally Nov 29, 2020
6220170
Delete ROCMCLI3.PNG
Rmalavally Nov 29, 2020
11e1ea4
Delete matrix.png
Rmalavally Nov 29, 2020
62ef1b3
Create test
Rmalavally Nov 29, 2020
0956178
Add files via upload
Rmalavally Nov 29, 2020
fecccb6
Delete test
Rmalavally Nov 29, 2020
778d766
Update Current-Release-Notes.rst
Rmalavally Nov 29, 2020
8fc257b
Update Current-Release-Notes.rst
Rmalavally Nov 29, 2020
80d5745
Update Current-Release-Notes.rst
Rmalavally Nov 29, 2020
83bd68d
Update Current-Release-Notes.rst
Rmalavally Nov 30, 2020
2e8a565
Update Current-Release-Notes.rst
Rmalavally Nov 30, 2020
4c8bdcf
Update Current-Release-Notes.rst
Rmalavally Nov 30, 2020
461ee57
Create Using CMake with AMD ROCm.rst
Rmalavally Dec 2, 2020
5cb273c
Update Using CMake with AMD ROCm.rst
Rmalavally Dec 2, 2020
e7705f6
Remove this file since it breaks the repo as it collide with another …
pfultz2 Dec 3, 2020
048e9b5
Remove spaces
pfultz2 Dec 3, 2020
9e65d1c
Convert to rst
pfultz2 Dec 3, 2020
00c5e1f
Add rest of document
pfultz2 Dec 3, 2020
973603e
Formatting fixes
pfultz2 Dec 3, 2020
1937ce8
Add missing underscore
pfultz2 Dec 3, 2020
a08d965
Add table for cmake package and library
pfultz2 Dec 3, 2020
e06a651
Create MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
cb986dc
Update UsingCMakewithAMDROCm.rst
Rmalavally Dec 3, 2020
80e8bfa
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
6c8d129
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
d49736c
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
16484f4
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
b73d7ff
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
39da999
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
c31b552
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
88c1835
Update UsingCMakewithAMDROCm.rst
Rmalavally Dec 3, 2020
ec3ea88
Update UsingCMakewithAMDROCm.rst
Rmalavally Dec 3, 2020
d7eafbf
Update UsingCMakewithAMDROCm.rst
Rmalavally Dec 3, 2020
3323a80
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
299a5ee
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
6d673e9
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
d9aecb0
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
d28e049
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
f1c3635
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
b4f2add
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
fa4ffe7
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
ad61fb7
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
ddb6190
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
8a65926
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
de4a181
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
85f1b97
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
9c3e181
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
ae462d4
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
2de857f
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
fc97422
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
4c35190
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
c6a9386
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
8abf3e6
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
78bef8c
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
76e9a39
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
2c7361c
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
f27903f
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
8528184
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
c865b76
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
879c2dd
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
c3f941e
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
354254b
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 3, 2020
b200e75
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
afd585d
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
1a98d20
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
ef96e99
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
80a2b8c
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
ac8978f
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
57d86b2
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
0934a50
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
d24d383
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
a477a7d
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 4, 2020
3e9d014
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 6, 2020
6822ddd
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 10, 2020
9ca9387
Math Libraries Targets (#105)
saadrahim Dec 10, 2020
e32c0a5
Update MESA-Multimedia_Installation.rst
Rmalavally Dec 11, 2020
90e679b
Update UsingCMakewithAMDROCm.rst
Rmalavally Dec 12, 2020
2b2a0c1
Update UsingCMakewithAMDROCm.rst
Rmalavally Dec 12, 2020
3adc5d3
Update UsingCMakewithAMDROCm.rst
Rmalavally Dec 12, 2020
3d4454d
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
f623271
Add files via upload
Rmalavally Dec 15, 2020
4da01d4
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
1ade4d4
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
005b282
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
fd42e69
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
1d33719
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
2b75296
Add files via upload
Rmalavally Dec 15, 2020
c0e133c
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
83493cc
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
3643fbd
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
64ec948
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
b88e7b1
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
4ac5983
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
84f9796
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
6a96cd9
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
dadbfb5
Update Current-Release-Notes.rst
Rmalavally Dec 15, 2020
faca5bc
Update Current-Release-Notes.rst
Rmalavally Dec 17, 2020
46e816e
Update Current-Release-Notes.rst
Rmalavally Dec 17, 2020
558fd44
Update Current-Release-Notes.rst
Rmalavally Dec 17, 2020
690c558
Update Current-Release-Notes.rst
Rmalavally Dec 17, 2020
4364313
Update Current-Release-Notes.rst
Rmalavally Dec 17, 2020
d509630
Update Current-Release-Notes.rst
Rmalavally Dec 18, 2020
3d0dbc3
Update Current-Release-Notes.rst
Rmalavally Dec 18, 2020
6430ed4
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
ed3f181
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
6e42f92
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
e3fb7c2
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
db47e76
Add files via upload
Rmalavally Mar 23, 2021
3ac8a6b
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
e43ae2a
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
f4c061e
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
330d14b
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
57ee2ab
Update Current-Release-Notes.rst
Rmalavally Mar 23, 2021
b821d10
Update Current-Release-Notes.rst
Rmalavally Aug 1, 2021
39f8ddf
Update Current-Release-Notes.rst
Rmalavally Aug 1, 2021
22fae15
Update Current-Release-Notes.rst
Rmalavally Aug 2, 2021
998589a
Create ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
4596a73
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
80f4db6
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
d62481b
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
8b40aec
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
924ea5f
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
d95c4dd
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
e66933b
Add files via upload
Rmalavally Oct 25, 2021
9e476b9
Add files via upload
Rmalavally Oct 25, 2021
953242b
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
fab260e
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
6ebfc89
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
2a772f5
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
f1d60e5
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
c9824b2
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
63e70a3
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
6f98e76
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
daa15b6
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
93c5573
Add files via upload
Rmalavally Oct 25, 2021
9560bae
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
1294a6d
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
abc458f
Add files via upload
Rmalavally Oct 25, 2021
ddb9aad
Add files via upload
Rmalavally Oct 25, 2021
8f82623
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
c9f408f
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
54af96d
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
bb83b39
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
e18a075
Update ROCm Installation v4.5.rst
Rmalavally Oct 25, 2021
0ea0a6e
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
453a0dd
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
d7a8af6
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
d8940a6
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
fe4292d
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
44cf4d1
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
025962d
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
58d3e49
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
c687dfa
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
ca09ae4
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
85325ad
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
1e9ec03
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
374b984
Update Current-Release-Notes.rst
Rmalavally Oct 27, 2021
e8667ad
Update Current-Release-Notes.rst
Rmalavally Oct 28, 2021
2f692c3
Update Current-Release-Notes.rst
Rmalavally Feb 10, 2022
eea6fd2
Update Current-Release-Notes.rst
Rmalavally Feb 10, 2022
cfff15e
Update Current-Release-Notes.rst
Rmalavally Feb 10, 2022
24c88c3
Update Current-Release-Notes.rst
Rmalavally Feb 10, 2022
4a49929
Update Current-Release-Notes.rst
Rmalavally Feb 10, 2022
7a62203
Add files via upload
Rmalavally Feb 10, 2022
12a75c3
Update Current-Release-Notes.rst
Rmalavally Feb 10, 2022
f7a20a6
Update Current-Release-Notes.rst
Rmalavally Feb 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 168 additions & 0 deletions CMake/UsingCMakewithAMDROCm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@

===========================
Using CMake with AMD ROCm
===========================

Most components in AMD ROCm support CMake 3.5 or higher out-of-the-box and do not require any special Find modules. A Find module is often used by
downstream to find the files by guessing locations of files with platform-specific hints. Typically, the Find module is required when the
upstream is not built with CMake or the package configuration files are not available.

AMD ROCm provides the respective *config-file* packages, and this enables ``find_package`` to be used directly. AMD ROCm does not require any Find
module as the *config-file* packages are shipped with the upstream projects.

Finding Dependencies
--------------------

When dependencies are not found in standard locations such as */usr* or */usr/local*, then the ``CMAKE_PREFIX_PATH`` variable can be set to the
installation prefixes. This can be set to multiple locations with a semicolon separating the entries.

There are two ways to set this variable:

- Pass the flag when configuring with ``-DCMAKE_PREFIX_PATH=....`` This approach is preferred when users install the components in custom
locations. 

- Append the variable in the CMakeLists.txt file. This is useful if the dependencies are found in a common location. For example, when
the binaries provided on `repo.radeon.com <http://repo.radeon.com>`_ are installed to */opt/rocm*, you can add the following line to a CMakeLists.txt file

:: 

list (APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)



Using HIP in CMake
==================

There are two ways to use HIP in CMake:

- Use the HIP API without compiling the GPU device code. As there is no GPU code, any C or C++ compiler can be used.
The ``find_package(hip)`` provides the ``hip::host`` target to use HIP in this context

::

# Search for rocm in common locations
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
# Find hip
find_package(hip)
# Create the library
add_library(myLib ...)
# Link with HIP
target_link_libraries(myLib hip::host)

.. note::
The ``hip::host`` target provides all the usage requirements needed to use HIP without compiling GPU device code.

- Use HIP API and compile GPU device code. This requires using a
device compiler. The compiler for CMake can be set using either the
``CMAKE_C_COMPILER`` and ``CMAKE_CXX_COMPILER`` variable or using the ``CC`` and
``CXX`` environment variables. This can be set when configuring CMake or
put into a CMake toolchain file. The device compiler must be set to a
compiler that supports AMD GPU targets, which is usually Clang. 

The ``find_package(hip)`` provides the ``hip::device`` target to add all the
flags for device compilation

::

# Search for rocm in common locations
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
# Find hip
find_package(hip)
# Create library
add_library(myLib ...)
# Link with HIP
target_link_libraries(myLib hip::device)

This project can then be configured with::

cmake -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ ..

Which uses the device compiler provided from the binary packages from
`repo.radeon.com <http://repo.radeon.com>`_.

.. note::
Compiling for the GPU device requires at least C++11. This can be
enabled by setting ``CMAKE_CXX_STANDARD`` or setting the correct compiler flags
in the CMake toolchain.

The GPU device code can be built for different GPU architectures by
setting the ``GPU_TARGETS`` variable. By default, this is set to all the
currently supported architectures for AMD ROCm. It can be set by passing
the flag during configuration with ``-DGPU_TARGETS=gfx900``. It can also be
set in the CMakeLists.txt as a cached variable before calling
``find_package(hip)``::

# Set the GPU to compile for
set(GPU_TARGETS "gfx900" CACHE STRING "GPU targets to compile for")
# Search for rocm in common locations
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
# Find hip
find_package(hip)

Using AMD ROCm Libraries
========================

Libraries such as rocBLAS, MIOpen, and others support CMake users as
well.

As illustrated in the example below, to use MIOpen from CMake, you can
call ``find_package(miopen)``, which provides the ``MIOpen`` CMake target. This
can be linked with ``target_link_libraries``::

# Search for rocm in common locations
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
# Find miopen
find_package(miopen)
# Create library
add_library(myLib ...)
# Link with miopen
target_link_libraries(myLib MIOpen)

.. note::
Most libraries are designed as host-only API, so using a GPU device
compiler is not necessary for downstream projects unless it uses the GPU
device code.


ROCm CMake Packages
===================

+-----------+----------+-------------------------------------------------------+
| Component | Package | Targets |
+===========+==========+=======================================================+
| HIP | hip | hip::host, hip::device |
+-----------+----------+-------------------------------------------------------+
| rocPRIM | rocprim | roc::rocprim |
+-----------+----------+-------------------------------------------------------+
| rocThrust | rocthrust| roc::rocthrust |
+-----------+----------+-------------------------------------------------------+
| hipCUB | hipcub | hip::hipcub |
+-----------+----------+-------------------------------------------------------+
| rocRAND | rocrand | roc::rocrand |
+-----------+----------+-------------------------------------------------------+
| rocBLAS | rocblas | roc::rocblas |
+-----------+----------+-------------------------------------------------------+
| rocSOLVER | rocsolver| roc::rocsolver |
+-----------+----------+-------------------------------------------------------+
| hipBLAS | hipblas | roc::hipblas |
+-----------+----------+-------------------------------------------------------+
| rocFFT | rocfft | roc::rocfft |
+-----------+----------+-------------------------------------------------------+
| hipFFT | hipfft | hip::hipfft |
+-----------+----------+-------------------------------------------------------+
| rocSPARSE | rocsparse| roc::rocsparse |
+-----------+----------+-------------------------------------------------------+
| hipSPARSE | hipsparse|roc::hipsparse |
+-----------+----------+-------------------------------------------------------+
| rocALUTION|rocalution| roc::rocalution |
+-----------+----------+-------------------------------------------------------+
| RCCL | rccl | rccl |
+-----------+----------+-------------------------------------------------------+
| MIOpen | miopen | MIOpen |
+-----------+----------+-------------------------------------------------------+
| MIGraphX | migraphx | migraphx::migraphx, migraphx::migraphx_c, |
| | | migraphx::migraphx_cpu, migraphx::migraphx_gpu, |
| | | migraphx::migraphx_onnx, migraphx::migraphx_tf |
+-----------+----------+-------------------------------------------------------+


Loading