Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/3_build-installation-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ body:
2. CPU(可选):请提供CPU型号,MKL/OpenBlas/MKLDNN/等数学库的使用情况,是否支持AVX指令集。
3. GPU:请提供GPU型号,CUDA(如cuda10.2)和CUDNN版本号(如cudnn7.6.5)。
4. 系统环境:请说明系统类型、版本(如Mac OS 10.14)。
5. Python版本(如python 3.7)。
5. Python版本(如python 3.8)。
6. (可选)若安装过程遇到问题,请提供安装方式(pip/conda/docker/源码编译)和相应的安装命令。
7. (可选)若使用paddle过程中,遇到了无法使用gpu相关问题,请在命令行中键入`nvidia-smi`和`nvcc -V`,提供这两个命令输出的截图。
8. (可选)若使用特殊硬件,请单独注明。
Expand Down
4 changes: 2 additions & 2 deletions cmake/python_module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function(check_py_version py_version)
string(REPLACE "." ";" version_list ${py_version})
list(LENGTH version_list version_list_len)
if(version_list_len LESS 2)
message(FATAL_ERROR "Please input Python version, eg:3.7 or 3.8 and so on")
message(FATAL_ERROR "Please input Python version, eg:3.8 or 3.9 and so on")
endif()

list(GET version_list 0 version_major)
Expand All @@ -62,6 +62,6 @@ function(check_py_version py_version)
if((version_major GREATER_EQUAL 3) AND (version_minor GREATER_EQUAL 7))

else()
message(FATAL_ERROR "Paddle only support Python version >=3.7 now!")
message(FATAL_ERROR "Paddle only support Python version >=3.8 now!")
endif()
endfunction()
2 changes: 1 addition & 1 deletion paddle/cinn/auto_schedule/cost_model/xgb_cost_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pybind11::array VectorToNumpy(const std::vector<std::vector<Dtype>>& vec) {
// Something may be wrong when users use virtual Python environment.
void AddDistPkgToPythonSysPath() {
pybind11::module sys_py_mod = pybind11::module::import("sys");
// short version such as "3.7", "3.8", ...
// short version such as "3.8", "3.9", ...
std::string py_short_version =
sys_py_mod.attr("version").cast<std::string>().substr(0, 3);

Expand Down
3 changes: 0 additions & 3 deletions python/paddle/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ def __bootstrap__():
Returns:
None
"""
# NOTE(zhiqiu): When (1)numpy < 1.19; (2) python < 3.7,
# unittest is always imported in numpy (maybe some versions not).
# so is_test is True and p2p is not inited.
in_test = 'unittest' in sys.modules

try:
Expand Down
14 changes: 11 additions & 3 deletions python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,21 @@ packages=['paddle',
with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f:
setup_requires = f.read().splitlines()

if sys.version_info < (3,7):
raise RuntimeError("Paddle only support Python version>=3.7 now")
if sys.version_info < (3,8):
raise RuntimeError("Paddle only support Python version>=3.8 now")

if sys.version_info >= (3,7):
setup_requires_tmp = []
for setup_requires_i in setup_requires:
if "<\"3.6\"" in setup_requires_i or "<=\"3.6\"" in setup_requires_i or "<\"3.5\"" in setup_requires_i or "<=\"3.5\"" in setup_requires_i or "<\"3.7\"" in setup_requires_i:
if (
"<\"3.6\"" in setup_requires_i
or "<=\"3.6\"" in setup_requires_i
or "<\"3.5\"" in setup_requires_i
or "<=\"3.5\"" in setup_requires_i
or "<\"3.7\"" in setup_requires_i
or "<=\"3.7\"" in setup_requires_i
or "<\"3.8\"" in setup_requires_i
):
continue
setup_requires_tmp+=[setup_requires_i]
setup_requires = setup_requires_tmp
Expand Down
4 changes: 2 additions & 2 deletions r/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker build -t paddle-rapi:latest .
```

### Local installation
First, make sure `Python` is installed, assuming that the path is `/opt/python3.7`.
First, make sure `Python` is installed, assuming that the path is `/opt/python3.8`.

``` bash
python -m pip install paddlepaddle # CPU version
Expand All @@ -31,7 +31,7 @@ First, load PaddlePaddle in R.
library(reticulate)
library(RcppCNPy)

use_python("/opt/python3.7/bin/python3.7")
use_python("/opt/python3.8/bin/python3.8")
paddle <- import("paddle.base.core")
```

Expand Down
8 changes: 4 additions & 4 deletions r/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
在 R 中使用 PaddlePaddle

## 环境安装
首先确保已安装Python,假设路径为`/opt/python3.7`
首先确保已安装Python,假设路径为`/opt/python3.8`

使用Python安装Paddle
``` bash
/opt/python3.7/bin/python3.7 -m pip install paddlepaddle # CPU
/opt/python3.7/bin/python3.7 -m pip install paddlepaddle-gpu # GPU
/opt/python3.8/bin/python3.8 -m pip install paddlepaddle # CPU
/opt/python3.8/bin/python3.8 -m pip install paddlepaddle-gpu # GPU
```

安装r运行paddle预测所需要的库
Expand All @@ -20,7 +20,7 @@ install.packages("reticulate") # 调用Paddle

``` r
library(reticulate)
use_python("/opt/python3.7/bin/python")
use_python("/opt/python3.8/bin/python")

paddle <- import("paddle.base.core")
```
Expand Down
2 changes: 1 addition & 1 deletion r/example/mobilenet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.7
#!/usr/bin/env python3.8

# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion r/example/mobilenet.r
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

library(reticulate) # call Python library

use_python("/opt/python3.7/bin/python")
use_python("/opt/python3.8/bin/python")

np <- import("numpy")
paddle <- import("paddle.base.core")
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def get_setup_requires():
setup_requires = (
f.read().splitlines()
) # Specify the dependencies to install
if sys.version_info >= (3, 7):
if sys.version_info >= (3, 8):
setup_requires_tmp = []
for setup_requires_i in setup_requires:
if (
Expand All @@ -882,14 +882,16 @@ def get_setup_requires():
or "<\"3.5\"" in setup_requires_i
or "<=\"3.5\"" in setup_requires_i
or "<\"3.7\"" in setup_requires_i
or "<=\"3.7\"" in setup_requires_i
or "<\"3.8\"" in setup_requires_i
):
continue
setup_requires_tmp += [setup_requires_i]
setup_requires = setup_requires_tmp
return setup_requires
else:
raise RuntimeError(
"please check your python version,Paddle only support Python version>=3.7 now"
"please check your python version,Paddle only support Python version>=3.8 now"
)


Expand Down
4 changes: 2 additions & 2 deletions test/ipu/distributed/test_dist_pod128_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
'''
python3.7 -m paddle.distributed.launch \
python3.8 -m paddle.distributed.launch \
--devices=128 \
ipu \
--hosts=host1,host2 \
Expand All @@ -31,7 +31,7 @@
--vipu-partition=pod128_bert \
--vipu-server-host=lr17-1-ctrl \
--update-partition=yes \
python3.7 test/ipu/disabled/test_dist_pod128_ipu.py
python3.8 test/ipu/disabled/test_dist_pod128_ipu.py
'''

import os
Expand Down
8 changes: 4 additions & 4 deletions test/ipu/distributed/test_dist_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
'''
Single host:
python3.7 -m paddle.distributed.launch \
python3.8 -m paddle.distributed.launch \
--devices=4 \
ipu \
--hosts=localhost \
Expand All @@ -29,11 +29,11 @@
--num-replicas=4 \
--ipus-per-replica=1 \
--print-topology=yes \
python3.7 test/ipu/distributed/test_dist_sample.py
python3.8 test/ipu/distributed/test_dist_sample.py
'''
'''
Multi hosts:
python3.7 -m paddle.distributed.launch \
python3.8 -m paddle.distributed.launch \
--devices=4 \
ipu \
--hosts=host1,host2 \
Expand All @@ -49,7 +49,7 @@
--num-replicas=4 \
--ipus-per-replica=1 \
--print-topology=yes \
python3.7 test/ipu/distributed/test_dist_sample.py
python3.8 test/ipu/distributed/test_dist_sample.py
'''

import os
Expand Down