提交 9a7724dc 编写于 作者: Z zhangting2020

modify doc

上级 f2c97b6d
...@@ -258,6 +258,7 @@ from .tensor.stat import numel #DEFINE_ALIAS ...@@ -258,6 +258,7 @@ from .tensor.stat import numel #DEFINE_ALIAS
from .device import get_cudnn_version from .device import get_cudnn_version
from .device import set_device from .device import set_device
from .device import get_device from .device import get_device
from .device import is_compiled_with_cuda
# from .tensor.tensor import Tensor #DEFINE_ALIAS # from .tensor.tensor import Tensor #DEFINE_ALIAS
# from .tensor.tensor import LoDTensor #DEFINE_ALIAS # from .tensor.tensor import LoDTensor #DEFINE_ALIAS
# from .tensor.tensor import LoDTensorArray #DEFINE_ALIAS # from .tensor.tensor import LoDTensorArray #DEFINE_ALIAS
......
...@@ -18,6 +18,7 @@ import re ...@@ -18,6 +18,7 @@ import re
from paddle.fluid import core from paddle.fluid import core
from paddle.fluid import framework from paddle.fluid import framework
from paddle.fluid.dygraph.parallel import ParallelEnv from paddle.fluid.dygraph.parallel import ParallelEnv
from paddle.fluid.framework import is_compiled_with_cuda
__all__ = [ __all__ = [
'get_cudnn_version', 'get_cudnn_version',
...@@ -29,7 +30,7 @@ __all__ = [ ...@@ -29,7 +30,7 @@ __all__ = [
# 'cuda_places', # 'cuda_places',
# 'CUDAPinnedPlace', # 'CUDAPinnedPlace',
# 'CUDAPlace', # 'CUDAPlace',
# 'is_compiled_with_cuda' 'is_compiled_with_cuda'
] ]
_cudnn_version = None _cudnn_version = None
......
...@@ -350,13 +350,13 @@ def is_compiled_with_cuda(): ...@@ -350,13 +350,13 @@ def is_compiled_with_cuda():
""" """
Whether this whl package can be used to run the model on GPU. Whether this whl package can be used to run the model on GPU.
Returns (bool): support gpu or not. Returns (bool): `True` if CUDA is currently available, otherwise `False`.
Examples: Examples:
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle
support_gpu = fluid.is_compiled_with_cuda() support_gpu = paddle.is_compiled_with_cuda()
""" """
return core.is_compiled_with_cuda() return core.is_compiled_with_cuda()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册