昇腾GPU服务器SDK找不到问题
收藏回复举报
昇腾GPU服务器SDK找不到问题
t('forum.solved') 已解决
新人帖
发表于2024-03-26 10:32:00
0 查看

环境

docker镜像  swr.cn-central-221.ovaijisuan.com/mindformers/mindformers1.0_mindspore2.2.11:aarch_20240125

docker run -it -u root \

--ipc=host \

--network host \

--device=/dev/davinci0 \

--device=/dev/davinci_manager \

--device=/dev/devmm_svm \

--device=/dev/hisi_hdc \

-v /etc/localtime:/etc/localtime \

-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \

-v /var/log/npu/:/usr/slog \

-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \

--name bc2 \

swr.cn-central-221.ovaijisuan.com/mindformers/mindformers1.0_mindspore2.2.11:aarch_20240125 \

/bin/bash

mindspore2.2.11_py39 

mindformers  https://gitee.com/mindspore/mindformers 最新版,build.sh 安装的

  1. hccn_tool 找不到

python ./mindformers/tools/hccl_tools.py --device_num "[0,1)"

  1. 模型转换失败   

python ./research/baichuan/convert_weight.py --torch_ckpt_path TORCH_CKPT_PATH --mindspore_ckpt_path MS_CKPT_NAME

  1. 推理失败

命令

python run_baichuan2.py \

--config run_baichuan2_7b.yaml \

--run_mode predict \

--use_parallel False \

--load_checkpoint '../../models/Baichuan2-7B-Chat/Baichuan2_7B_Chat.ckpt' \

--auto_trans_ckpt False \

--predict_data "<reserved_106>你是谁?<reserved_107>"

报错

2024-03-19 09:02:31,847 - mindformers[mindformers/models/llama/llama_config.py:199] - WARNING - Argument `compute_in_2d` is deprecated.

2024-03-19 09:02:31,847 - mindformers[mindformers/version_control.py:62] - INFO - The Cell Reuse compilation acceleration feature is not supported when the environment variable ENABLE_CELL_REUSE is 0 or MindSpore version is earlier than 2.1.0 or stand_alone mode or pipeline_stages <= 1

2024-03-19 09:02:31,847 - mindformers[mindformers/version_control.py:66] - INFO -

The current ENABLE_CELL_REUSE=0, please set the environment variable as follows:

export ENABLE_CELL_REUSE=1 to enable the Cell Reuse compilation acceleration feature.

2024-03-19 09:02:31,847 - mindformers[mindformers/version_control.py:72] - INFO - The Cell Reuse compilation acceleration feature does not support single-card mode.This feature is disabled by default. ENABLE_CELL_REUSE=1 does not take effect.

2024-03-19 09:02:31,848 - mindformers[mindformers/version_control.py:75] - INFO - The Cell Reuse compilation acceleration feature only works in pipeline parallel mode(pipeline_stage>1).Current pipeline stage=1, the feature is disabled by default.

[WARNING] ME(304:281465918746208,MainProcess):2024-03-19-09:02:35.841.256 [mindspore/ops/primitive.py:228] The in_strategy of the operator in your network will not take effect in stand_alone mode. This means the the shard function called in the network is ignored.

If you want to enable it, please use semi auto or auto parallel mode by context.set_auto_parallel_context(parallel_mode=ParallelMode.SEMI_AUTO_PARALLEL or context.set_auto_parallel_context(parallel_mode=ParallelMode.AUTO_PARALLEL)

Traceback (most recent call last):

  File "/opt/mindformers/research/baichuan2/run_baichuan2_chat.py", line 237, in <module>

    main(config=args.config,

  File "/opt/mindformers/research/baichuan2/run_baichuan2_chat.py", line 109, in main

    network = model_dict[model_name](model_config)

  File "/root/miniconda3/envs/mindspore2.2.11_py39/lib/python3.9/site-packages/mindformers/version_control.py", line 78, in decorator

    func(*args, **kwargs)

  File "/opt/mindformers/research/baichuan2/baichuan2_7b.py", line 363, in __init__

    self.model = Baichuan7BV2Model(config=config)

  File "/opt/mindformers/research/baichuan2/baichuan2_7b.py", line 114, in __init__

    self.casual_mask = LowerTriangularMaskWithDynamic(seq_length=config.seq_length,

  File "/root/miniconda3/envs/mindspore2.2.11_py39/lib/python3.9/site-packages/mindformers/tools/logger.py", line 575, in wrapper

    res = func(*args, **kwargs)

  File "/root/miniconda3/envs/mindspore2.2.11_py39/lib/python3.9/site-packages/mindformers/modules/transformer/transformer.py", line 888, in __init__

    self.lower_triangle_mask = ops.cast(Tensor(np.tril(np.ones(shape=(seq_length, seq_length))), mstype.float32),

  File "/root/miniconda3/envs/mindspore2.2.11_py39/lib/python3.9/site-packages/mindspore/ops/primitive.py", line 314, in __call__

    return _run_op(self, self.name, args)

  File "/root/miniconda3/envs/mindspore2.2.11_py39/lib/python3.9/site-packages/mindspore/ops/primitive.py", line 913, in _run_op

    stub = _pynative_executor.run_op_async(obj, op_name, args)

  File "/root/miniconda3/envs/mindspore2.2.11_py39/lib/python3.9/site-packages/mindspore/common/api.py", line 1186, in run_op_async

    return self._executor.run_op_async(*args)

RuntimeError: The pointer[res_manager_] is null.

----------------------------------------------------

- Framework Unexpected Exception Raised:

----------------------------------------------------

This exception is caused by framework's unexpected error. Please create an issue at https://gitee.com/mindspore/mindspore/issues to get help.

本帖最后由 匿名用户2024/04/02 09:23:05 编辑

我要发帖子