Skip to content

Commit

Permalink
[ROCM] add is_compiled_with_rocm api, test=develop (#3526)
Browse files Browse the repository at this point in the history
* [ROCM] add is_compiled_with_rocm api, test=develop

* [ROCM] update api doc, test=develop

* [ROCM] address review comment, test=develop
  • Loading branch information
qili93 authored May 31, 2021
1 parent c91f98b commit 110d5b9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/api/paddle/is_compiled_with_rocm_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _cn_api_paddle_is_compiled_with_rocm:

is_compiled_with_rocm
-------------------------------

.. py:function:: paddle.is_compiled_with_rocm()
检查 ``whl`` 包是否可以被用来在AMD或海光GPU(ROCm)上运行模型

返回:bool,支持GPU(ROCm)则为True,否则为False。

**示例代码**

.. code-block:: python
import paddle
support_gpu = paddle.is_compiled_with_rocm()

0 comments on commit 110d5b9

Please sign in to comment.