一、问题
安装torch_npu后,运行python3 -c "import torch;import torch_npu;print(torch_npu.npu.is_available())"可以返回true,但在使用时,运行python3 -c "import torch;import torch_npu; a = torch.randn(3, 4).npu(); print(a + a);"报错Failed to find function aclrtReserveMemAddress,具体如下:
二、驱动信息
驱动:23.0.0
Ascend-cann-toolkit版本:7.0.RC1.alpha002
三、python环境
python3.9
Package Version
---------------------------- -----------
absl-py 2.1.0
addict 2.4.0
aiohappyeyeballs 2.3.4
aiohttp 3.10.0
aiosignal 1.3.1
aliyun-python-sdk-core 2.15.1
aliyun-python-sdk-kms 2.16.3
astunparse 1.6.3
async-timeout 4.0.3
attrs 23.2.0
auto-tune 0.1.0
blinker 1.8.2
cachetools 5.4.0
certifi 2024.7.4
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
cloudpickle 3.0.0
cnocr 2.2.3.2
cnstd 1.2.4.2
coloredlogs 15.0.1
contourpy 1.2.1
crcmod 1.7
cryptography 43.0.0
cycler 0.12.1
dataflow 0.0.1
datasets 2.16.0
decorator 5.1.1
demjson3 3.0.6
dill 0.3.7
filelock 3.15.4
Flask 3.0.3
flatbuffers 24.3.25
fonttools 4.53.0
frozenlist 1.4.1
fsspec 2023.10.0
gast 0.4.0
google-auth 2.32.0
google-auth-oauthlib 1.0.0
google-pasta 0.2.0
grpcio 1.65.2
h5py 3.11.0
hccl 0.1.0
hccl-parser 0.1
huggingface-hub 0.24.5
humanfriendly 10.0
idna 3.7
imageio 2.34.1
imgaug 0.4.0
importlib_metadata 7.1.0
importlib_resources 6.4.0
itsdangerous 2.2.0
jax 0.4.30
jaxlib 0.4.30
Jinja2 3.1.4
jmespath 0.10.0
keras 2.12.0
Keras-Preprocessing 1.1.2
kiwisolver 1.4.5
lazy_loader 0.4
libclang 18.1.1
lightning-utilities 0.11.6
Markdown 3.6
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.9.0
mdurl 0.1.2
ml-dtypes 0.4.0
modelscope 1.16.1
mpmath 1.3.0
msadvisor 1.0.0
multidict 6.0.5
multiprocess 0.70.15
namex 0.0.8
networkx 3.2.1
numpy 1.23.5
oauthlib 3.2.2
onnx 1.16.1
onnxruntime 1.18.0
op-gen 0.1
op-test-frame 0.1
opc-tool 0.1.0
opencv-python 4.10.0.82
opt-einsum 3.3.0
optree 0.12.1
oss2 2.18.6
packaging 24.0
pandas 2.2.2
pillow 10.3.0
pip 24.0
Polygon3 3.0.9.1
protobuf 4.25.4
psutil 6.0.0
py-cpuinfo 9.0.0
pyarrow 17.0.0
pyarrow-hotfix 0.6
pyasn1 0.6.0
pyasn1_modules 0.4.0
pyclipper 1.3.0.post5
pycparser 2.22
pycryptodome 3.20.0
Pygments 2.18.0
pyparsing 3.1.2
python-dateutil 2.9.0.post0
pytorch-lightning 2.3.3
pytz 2024.1
PyYAML 6.0.1
requests 2.32.3
requests-oauthlib 2.0.0
rich 13.7.1
rsa 4.9
schedule-search 0.0.1
scikit-image 0.22.0
scipy 1.13.1
seaborn 0.13.2
setuptools 69.5.1
shapely 2.0.4
simplejson 3.19.2
six 1.16.0
sortedcontainers 2.4.0
sympy 1.12.1
synr 0.5.0
te 0.4.0
tensorboard 2.12.3
tensorboard-data-server 0.7.2
tensorboard-plugin-wit 1.8.1
tensorflow 2.12.0
tensorflow-cpu-aws 2.12.0
tensorflow-estimator 2.12.0
tensorflow-io-gcs-filesystem 0.37.1
termcolor 2.4.0
tf-slim 1.1.0
tifffile 2024.5.22
torch 2.1.0
torch-npu 2.1.0.post6
torchmetrics 1.4.0.post0
torchvision 0.16.0
tornado 6.4.1
tqdm 4.66.4
typing_extensions 4.5.0
tzdata 2024.1
ultralytics 8.2.70
ultralytics-thop 2.0.0
Unidecode 1.3.8
urllib3 2.2.2
Werkzeug 3.0.3
wheel 0.43.0
wrapt 1.14.1
xxhash 3.4.1
yarl 1.9.4
zipp 3.19.1
————————————————————
我最终的目的在这台机器上运行modelscope的代码,例如:https://developer.aliyun.com/article/1420243。
atc命令可以正常使用,但是在安装torch_npu的过程中出现上述问题,这怎么解决?求助
一、问题
安装torch_npu后,运行python3 -c "import torch;import torch_npu;print(torch_npu.npu.is_available())"可以返回true,但在使用时,运行python3 -c "import torch;import torch_npu; a = torch.randn(3, 4).npu(); print(a + a);"报错Failed to find function aclrtReserveMemAddress,具体如下:
二、驱动信息
驱动:23.0.0
Ascend-cann-toolkit版本:7.0.RC1.alpha002
三、python环境
python3.9
Package Version
---------------------------- -----------
absl-py 2.1.0
addict 2.4.0
aiohappyeyeballs 2.3.4
aiohttp 3.10.0
aiosignal 1.3.1
aliyun-python-sdk-core 2.15.1
aliyun-python-sdk-kms 2.16.3
astunparse 1.6.3
async-timeout 4.0.3
attrs 23.2.0
auto-tune 0.1.0
blinker 1.8.2
cachetools 5.4.0
certifi 2024.7.4
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
cloudpickle 3.0.0
cnocr 2.2.3.2
cnstd 1.2.4.2
coloredlogs 15.0.1
contourpy 1.2.1
crcmod 1.7
cryptography 43.0.0
cycler 0.12.1
dataflow 0.0.1
datasets 2.16.0
decorator 5.1.1
demjson3 3.0.6
dill 0.3.7
filelock 3.15.4
Flask 3.0.3
flatbuffers 24.3.25
fonttools 4.53.0
frozenlist 1.4.1
fsspec 2023.10.0
gast 0.4.0
google-auth 2.32.0
google-auth-oauthlib 1.0.0
google-pasta 0.2.0
grpcio 1.65.2
h5py 3.11.0
hccl 0.1.0
hccl-parser 0.1
huggingface-hub 0.24.5
humanfriendly 10.0
idna 3.7
imageio 2.34.1
imgaug 0.4.0
importlib_metadata 7.1.0
importlib_resources 6.4.0
itsdangerous 2.2.0
jax 0.4.30
jaxlib 0.4.30
Jinja2 3.1.4
jmespath 0.10.0
keras 2.12.0
Keras-Preprocessing 1.1.2
kiwisolver 1.4.5
lazy_loader 0.4
libclang 18.1.1
lightning-utilities 0.11.6
Markdown 3.6
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.9.0
mdurl 0.1.2
ml-dtypes 0.4.0
modelscope 1.16.1
mpmath 1.3.0
msadvisor 1.0.0
multidict 6.0.5
multiprocess 0.70.15
namex 0.0.8
networkx 3.2.1
numpy 1.23.5
oauthlib 3.2.2
onnx 1.16.1
onnxruntime 1.18.0
op-gen 0.1
op-test-frame 0.1
opc-tool 0.1.0
opencv-python 4.10.0.82
opt-einsum 3.3.0
optree 0.12.1
oss2 2.18.6
packaging 24.0
pandas 2.2.2
pillow 10.3.0
pip 24.0
Polygon3 3.0.9.1
protobuf 4.25.4
psutil 6.0.0
py-cpuinfo 9.0.0
pyarrow 17.0.0
pyarrow-hotfix 0.6
pyasn1 0.6.0
pyasn1_modules 0.4.0
pyclipper 1.3.0.post5
pycparser 2.22
pycryptodome 3.20.0
Pygments 2.18.0
pyparsing 3.1.2
python-dateutil 2.9.0.post0
pytorch-lightning 2.3.3
pytz 2024.1
PyYAML 6.0.1
requests 2.32.3
requests-oauthlib 2.0.0
rich 13.7.1
rsa 4.9
schedule-search 0.0.1
scikit-image 0.22.0
scipy 1.13.1
seaborn 0.13.2
setuptools 69.5.1
shapely 2.0.4
simplejson 3.19.2
six 1.16.0
sortedcontainers 2.4.0
sympy 1.12.1
synr 0.5.0
te 0.4.0
tensorboard 2.12.3
tensorboard-data-server 0.7.2
tensorboard-plugin-wit 1.8.1
tensorflow 2.12.0
tensorflow-cpu-aws 2.12.0
tensorflow-estimator 2.12.0
tensorflow-io-gcs-filesystem 0.37.1
termcolor 2.4.0
tf-slim 1.1.0
tifffile 2024.5.22
torch 2.1.0
torch-npu 2.1.0.post6
torchmetrics 1.4.0.post0
torchvision 0.16.0
tornado 6.4.1
tqdm 4.66.4
typing_extensions 4.5.0
tzdata 2024.1
ultralytics 8.2.70
ultralytics-thop 2.0.0
Unidecode 1.3.8
urllib3 2.2.2
Werkzeug 3.0.3
wheel 0.43.0
wrapt 1.14.1
xxhash 3.4.1
yarl 1.9.4
zipp 3.19.1
————————————————————
我最终的目的在这台机器上运行modelscope的代码,例如:https://developer.aliyun.com/article/1420243。
atc命令可以正常使用,但是在安装torch_npu的过程中出现上述问题,这怎么解决?求助