show

paddle.version. show ( ) [source]

Get the version of paddle if paddle package if tagged. Otherwise, output the corresponding commit id.

Returns

If paddle package is not tagged, the commit-id of paddle will be output. Otherwise, the following information will be output.

full_version: version of paddle

major: the major version of paddle

minor: the minor version of paddle

patch: the patch level version of paddle

rc: whether it’s rc version

cuda: the cuda version of package. It will return False if CPU version paddle package is installed

cudnn: the cudnn version of package. It will return False if CPU version paddle package is installed

xpu: the xpu version of package. It will return False if non-XPU version paddle package is installed

xpu_xccl: the xpu xccl version of package. It will return False if non-XPU version paddle package is installed

xpu_xhpc: the xpu xhpc version of package. It will return False if non-XPU version paddle package is installed

cinn: the cinn version of package. It will return False if paddle package is not compiled with CINN

Examples

>>> import paddle

>>> # Case 1: paddle is tagged with 2.2.0
>>> paddle.version.show()
>>> 
full_version: 2.2.0
major: 2
minor: 2
patch: 0
rc: 0
cuda: '10.2'
cudnn: '7.6.5'
xpu: '20230114'
xpu_xccl: '1.0.7'
xpu_xhpc: '20231208'
cinn: False
>>> 

>>> # Case 2: paddle is not tagged
>>> paddle.version.show()
>>> 
commit: cfa357e984bfd2ffa16820e354020529df434f7d
cuda: '10.2'
cudnn: '7.6.5'
xpu: '20230114'
xpu_xccl: '1.0.7'
xpu_xhpc: '20231208'
cinn: False
>>>