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
675 stars 172 forks source link

chatglm是否支持x86 cpu+910 gpu的9010服务器 #575

Closed gptq closed 1 year ago

gptq commented 1 year ago

If this is your first time, please read our contributor guidelines: https://github.com/mindspore-lab/mindcv/blob/main/CONTRIBUTING.md

Describe the bug/ 问题描述 (Mandatory / 必填) 提示ReduceSumReduceSum错误

To Reproduce / 重现步骤 (Mandatory / 必填) Steps to reproduce the behavior: python3 -m pytest tests/ut/models/glm/test_modeling_chatglm.py

Screenshots/ 日志 / 截图 (Mandatory / 必填)

E TypeError: E ---------------------------------------------------- E - Kernel select failed: E ---------------------------------------------------- E Select CPU operator[ReduceSum] fail! Unsupported data type! E The supported data types are input[Float32 Int32], output[Float32]; input[Float32 Int64], output[Float32]; input[Float64 Int32], output[Float64]; input[Float64 Int64], output[Float64]; input[Int8 Int32], output[Int8]; input[Int8 Int64], output[Int8]; input[Int16 Int32], output[Int16]; input[Int16 Int64], output[Int16]; input[Int32 Int32], output[Int32]; input[Int32 Int64], output[Int32]; input[Int64 Int32], output[Int64]; input[Int64 Int64], output[Int64]; input[UInt8 Int32], output[UInt8]; input[UInt8 Int64], output[UInt8]; input[UInt16 Int32], output[UInt16]; input[UInt16 Int64], output[UInt16]; input[UInt32 Int32], output[UInt32]; input[UInt32 Int64], output[UInt32]; input[UInt64 Int32], output[UInt64]; input[UInt64 Int64], output[UInt64]; input[Complex64 Int32], output[Complex64]; input[Complex64 Int64], output[Complex64]; input[Complex128 Int32], output[Complex128]; input[Complex128 Int64], output[Complex128]; , but get input[Bool Int64 ] and output[Bool ] E node: @kernel_graph_5:[CNode]1{[0]: ValueNode ReduceSum, [1]: @kernel_graph_5:[Parameter]2, [2]: ValueNode Tensor(shape=[1], dtype=Int64, value=[0])} E
E ---------------------------------------------------- E - C++ Call Stack: (For framework developers) E ---------------------------------------------------- E mindspore/ccsrc/plugin/device/cpu/hal/hardware/cpu_device_context.cc:340 SetOperatorInfo

/usr/local/python3.7.5/lib/python3.7/site-packages/mindspore/common/_stub_tensor.py:150: TypeError

lvyufeng commented 1 year ago

看其实是reduce sum算子的问题,我修一下

gptq commented 1 year ago

是啊。多谢老大。

lvyufeng commented 1 year ago

是啊。多谢老大。

已支持,在启智的1.10环境已测试。