mindspore-lab / mindnlp

Easy-to-use and high-performance NLP and LLM framework based on MindSpore, compatible with models and datasets of 🤗Huggingface.
https://mindnlp.cqu.ai/
Apache License 2.0
700 stars 197 forks source link

bug: vec_multiple_sel at least has one src #1448

Closed VoidIsVoid closed 3 months ago

VoidIsVoid commented 3 months ago

Describe the bug/ 问题描述 (Mandatory / 必填) A clear and concise description of what the bug is.

RuntimeError: [EB9999] vec_multiple_sel at least has one src', 'errPcause': ' ', 'errSolution': ' '} ], optype: [Select]) Solution: See the host log for details, and then check the Python stack where the error log is reported. TraceBack (most recent call last): Compile op[Select121] failed, oppath[/usr/local/Ascend/ascend-toolkit/7.0.1/opp/built-in/op_impl/ai_core/tbe/impl/select.py], optype[Select], taskID[243]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:771] [SubGraphOpt][Compile][ProcFailedCompTask] Thread[281460682519008] recompile single op[Select121] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:954] [SubGraphOpt][Compile][ParalCompOp] Thread[281460682519008] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1001] [SubGraphOpt][Compile][CompOpOnly] CompileOp failed.[FUNC:CompileOpOnly][FILE:op_compiler.cc][LINE:1127] [GraphOpt][FusedGraph][RunCompile] Failed to compile graph with compiler Normal mode Op Compiler[FUNC:SubGraphCompile][FILE:fe_graph_optimizer.cc][LINE:1292] Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition0_rank1_new_sub_graph3[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:131] subgraph 0 optimize failed[FUNC:OptimizeSubGraphWithMultiThreads][FILE:graph_manager.cc][LINE:996] build graph failed, graph id:120, ret:-1[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615] [Build][SingleOpModel]call ge interface generator.BuildSingleOpModel failed. ge result = 4294967295[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161] [Build][Op]Fail to build op model[FUNC:ReportInnerError][FILE:log_inner.cpp][LINE:145] build op model failed, result = 500002[FUNC:ReportInnerError][FILE:log_inner.cpp][LINE:145]

(Please search "Ascend Error Message" at https://www.mindspore.cn for error code description)


RuntimeError: [EB9999] vec_multiple_sel at least has one src', 'errPcause': ' ', 'errSolution': ' '} ]. [FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:763] W49999: Open failed, file is already open[FUNC:GetJsonValueFromJsonFile][FILE:fusion_util.cc][LINE:1516]

To Reproduce / 重现步骤 (Mandatory / 必填) Steps to reproduce the behavior:

import mindspore;mindspore.set_context(device_target='Ascend');

from mindnlp.transformers import AutoTokenizer, Qwen2Config
from mindnlp.transformers import (
        Qwen2ForCausalLM,
        Qwen2ForSequenceClassification,
        Qwen2Model,
    )

EXPECTED_TEXT_COMPLETION = """My favourite condiment is 100% ketchup. I love it on everything. I’m not a big"""
prompt = "My favourite condiment is "
model_name_or_path = "/models"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=False)
model = Qwen2ForCausalLM.from_pretrained(model_name_or_path)
input_ids = tokenizer.encode(prompt, return_tensors="ms")

# greedy generation outputs
generated_ids = model.generate(input_ids, max_new_tokens=20, temperature=0.1)

Expected behavior / 预期结果 (Mandatory / 必填) A clear and concise description of what you expected to happen. 模型正常推理

Screenshots/ 日志 / 截图 (Mandatory / 必填) If applicable, add screenshots to help explain your problem.

Additional context / 备注 (Optional / 选填) Add any other context about the problem here.

lvyufeng commented 3 months ago

910b建议升级MindSpore2.3

lvyufeng commented 3 months ago

cann升级8.0