Skip to content

Commit

Permalink
PR feedbacks initalize
Browse files Browse the repository at this point in the history
  • Loading branch information
neon60 committed Oct 10, 2024
1 parent 8bb5416 commit 6b337b2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/how-to/hip_runtime_api/initialization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,18 @@ Querying and setting GPUs
If multiple GPUs are available, it's worth to query and select the desired GPU(s)
based on properties.

Querying GPU devices
Querying GPUs
--------------------------------------------------------------------------------

The properties of a gpu can be queried using :cpp:func:`hipGetDeviceProperties`,
which returns a struct of :cpp:struct:`hipDeviceProp_t`. This struct can be
used to identify a device or give an overview of hardware characteristics, that
might make one gpu better suited for the task at hand than others.
might make one gpu better suited for the task at hand than others.

The :cpp:func:`hipGetDeviceCount` function returns the number of available GPUs,
which can be used to loop over the available GPUs.

Example code of querying GPUs:

.. code-block:: cpp
Expand Down

0 comments on commit 6b337b2

Please sign in to comment.