[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mnist_mind实例运行失败 #357

Open
yubo105139 opened this issue May 12, 2023 · 18 comments
Open

Mnist_mind实例运行失败 #357

yubo105139 opened this issue May 12, 2023 · 18 comments

Comments

@yubo105139
Copy link

运行环境信息 | System information (请提供足够详细的信息 | Please provide as much relevant information as possible)

使用dockers
modelbox/modelbox-develop-mindspore_1.9.0-cann_6.0.1-d310p-ubuntu-x86_64:latest

npu -info
image

描述问题 | Describe the current behavior:
运行Mnist_mind实例,失败
错误信息:request invalid, job config is invalid, Not found, build graph failed, please check graph config. -> create flowunit 'mnist_infer' failed. -> current environment does not support the inference type: 'mindspore:cpu'
同时新建单元后面功能无法圈选
b60234120c29493007fa462a0ea39c9

期望的行为 | Describe the expected behavior:

重现步骤描述 | Standalone code to reproduce the issue:
使用acl_inference 的om模型也无法运行

提供具体重现问题的步骤,如果可能,提供相关的截图信息,日志信息。
Provide a reproducible test case that is the bare minimum necessary to replicate the problem.

日志信息 | Logs

收集ModelBox的运行日志,路径为/var/log/modelbox
Please Provide modleobx logs, log path /var/log/modelbox

其他信息 | Other Info.

@pymumu
Copy link
Contributor
pymumu commented May 12, 2023

你选了cpu的推理,要选ascend的

@yubo105139
Copy link
Author

create flowunit 'mnist_infer' failed. -> current environment does not support the inference type: 'mindspore:ascend'

@yubo105139
Copy link
Author

我这边没有任何作用

@pymumu
Copy link
Contributor
pymumu commented May 12, 2023

modelbox-tool driver -info -details
看看输出,应该是没要找到mindspore的库

@yubo105139
Copy link
Author

Device Information :
-------------------------------- :
name: 0
type: ascend
version:
description: This is a ascend device description.

name: 1
type: ascend
version:
description: This is a ascend device description.

name: 2
type: ascend
version:
description: This is a ascend device description.

name: 3
type: ascend
version:
description: This is a ascend device description.

name: 4
type: ascend
version:
description: This is a ascend device description.

name: 5
type: ascend
version:
description: This is a ascend device description.

name: 6
type: ascend
version:
description: This is a ascend device description.

name: 7
type: ascend
version:
description: This is a ascend device description.

name: 0
type: CPU
version:
description: Host cpu device.

Driver Information :
-------------------------------- :
driver name: device-ascend
device type: ascend
version:
class: DRIVER-DEVICE
description: A ascend device driver

driver name: device-cpu
device type: cpu
version:
class: DRIVER-DEVICE
description: A cpu device driver

driver name: graphconf-graphvize
device type: graph
version: 1.0.0
class: DRIVER-GRAPHCONF
description: graph config parse graphviz

driver name: acl_inference
device type: ascend
version:
class: DRIVER-INFERENCE
description: A ascend inference flowunit

driver name: crop
device type: ascend
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A crop flowunit on ascend device.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
The other input port 'in_region' buffer type is rectangle, the memory arrangement is [x,y,w,h].
it contain the following meta fields:
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [nv12], 'layout': [hwc]. One image can only be cropped with one rectangle and output one crop image.

driver name: padding
device type: ascend
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A padding flowunit on ascend device
@PORT paramter: the input port buffer type and the output port buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: the field value range of this flowunit support:'pix_fmt': [nv12], 'layout': [hwc].

driver name: resize
device type: ascend
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A resize flowunit on ascend device.
@PORT parameter: The input port buffer type and the output port buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [nv12], 'layout': [hwc].

driver name: video_decoder
device type: ascend
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A resize flowunit on cpu.
@PORT parameter: the input port buffer type is video_packet, the output port buffer type is video_frame.
The video_packet buffer contain the following meta fields:
Field Name: pts, Type: int64_t
Field Name: dts, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: time_base, Type: double
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
The video_frame buffer contain the following meta fields:
Field Name: index, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: url, Type: string
Field Name: timestamp, Type: int64_t
Field Name: eos, Type: bool
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: the flowuint 'video_decoder' must be used pair with 'video_demuxer. the output buffer meta fields 'pix_fmt' is 'nv12', 'layout' is 'hcw'.

driver name: base64_decoder
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: base64 decoder flowunit on cpu.
@PORT parameter: The input port buffer type is image file binary, the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:

driver name: buff_meta_mapping
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: Modify the input buffer meta field name and value according to custom rules.
@PORT parameter: The input port and the output buffer type are binary.
@constraint:

driver name: crop
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: An OpenCV crop flowunit on cpu.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
The other input port 'in_region' buffer type is rectangle, the memory arrangement is [x,y,w,h].
it contain the following meta fields:
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [rgb_packed,bgr_packed], 'layout': [hwc]. One image can only be cropped with one rectangle and output one crop image.

driver name: data_source_generator
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: The operator can generator test data source config for data_source_parser.
@PORT parameter: The output port buffer data indicate data source config.
@constraint: This flowunit is usually followed by 'data_source_parser'.

driver name: obs
device type: cpu
version:
class: DRIVER-SOURCE-PARSER
description: An OBS data source parser plugin on CPU

driver name: restful
device type: cpu
version:
class: DRIVER-SOURCE-PARSER
description: An restful data source parser plugin on CPU

driver name: url
device type: cpu
version:
class: DRIVER-SOURCE-PARSER
description: A url data source parser plugin on CPU

driver name: vcn_restful
device type: cpu
version:
class: DRIVER-SOURCE-PARSER
description: A VCN restful data source parser plugin on CPU

driver name: vis
device type: cpu
version:
class: DRIVER-SOURCE-PARSER
description: An vis data source parser plugin on CPU

driver name: data_source_parser
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: this flowunit can obtain the video stream address or download the video file to the local according to the input configuration data, and output the url. Currently supported types have obs, vcn, vis, resetful, url.
@PORT parameter: The input buffer data type is char *, and contain the following meta fields:
Field Name: source_type, Type: string
the output buffer data type is char *.
@constraint: the field value range of this flowunit support: 'source_type': [obs, vcn, vis, restful, url]. This flowunit is usually followed by 'video_demuxer'.

driver name: draw_bbox
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: draw a rectangle area on the input image.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
The other input port 'in_region' buffer type is yolo boundingbox, the memory arrangement is [float x,float y,float w,float h,int32_t condition,float score].
@constraint: This flowunit can be only used follow the flowunit yolov3 postprocess'.

driver name: httpserver_async
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: Start a http/https server, reply to the response immediately when a request is received, and output request info to next flowunit.
@PORT parameter: The output port buffer contain the following meta fields:
Field Name: size, Type: size_t
Field Name: method, Type: string
Field Name: uri, Type: string
Field Name: headers, Type: map<string,string>
Field Name: endpoint, Type: string
The the output port buffer data type is char * .
@constraint:

driver name: httpserver_sync
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description: httpserver_sync contain flowunit 'httpserver_sync_receive' and 'httpserver_sync_reply'

driver name: image_decoder
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: An OpenCV crop flowunit on cpu.
@PORT parameter: The input port buffer type is image file binary, the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:

driver name: image_rotate
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: An OpenCV rotate flowunit on cpu.
@PORT parameter: The input port buffer type is image file binary, the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: rotate_angle, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:

driver name: mean
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: The operator is used to subtract the mean for tensor data, for example the image(RGB/BGR), shape(W, H, C), subtract the corresponding value for different channels.
@PORT parameter: The input port and the output buffer type are tensor.
The tensor type buffer contain the following meta fields:
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:

driver name: modeldecrypt-plugin
device type: cpu
version: 1.0.0
class: DRIVER-MODEL-DECRYPT
description: default model descrypt plugin with AES256

driver name: normalize
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: The operator is used to normalize for tensor data, for example the image(RGB/BGR).
@PORT parameter: The input port and the output buffer type are tensor.
The tensor type buffer contain the following meta fields:
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:

driver name: obs
device type: cpu
version:
class: DRIVER-OUTPUT-BROKER
description: A obs output broker plugin on CPU

driver name: webhook
device type: cpu
version:
class: DRIVER-OUTPUT-BROKER
description: A webhook output broker plugin on CPU

driver name: output_broker
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: Output the input data to the specified service. Currently supported types have dis, obs, webhook.
@PORT parameter: the input port buffer contain the following meta fields:
Field Name: out_broker_names, Type: string
Field Name: out_file_names, Type: string
@constraint: the fields 'out_file_names' can be only required when output type is obs.

driver name: packed_planar_transpose
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: Convert the image format from packed to planar.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [rgb,bgr], 'layout': [hwc]

driver name: padding
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A padding flowunit on cpu.
@PORT parameter: The input port buffer type and the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit supports: 'pix_fmt': [rgb,bgr], 'layout': [hwc].

driver name: python
device type: cpu
version:
class: DRIVER-FLOWUNIT
description: A python flowunit

driver name: resize
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A resize flowunit on cpu.
@PORT parameter: The input port buffer type and the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit supports: 'pix_fmt': [rgb_packed,bgr_packed], 'layout': [hwc].

driver name: video_decoder
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A video decoder on cpu.
@PORT parameter: The input port buffer type is video_packet, the output port buffer type is video_frame.
The video_packet buffer contain the following meta fields:
Field Name: pts, Type: int64_t
Field Name: dts, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: time_base, Type: double
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
The video_frame buffer contain the following meta fields:
Field Name: index, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: url, Type: string
Field Name: timestamp, Type: int64_t
Field Name: eos, Type: bool
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The flowuint 'video_decoder' must be used pair with 'video_demuxer. the output buffer meta fields 'pix_fmt' is 'brg_packed' or 'rgb_packed', 'layout' is 'hcw'.

driver name: video_demuxer
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A video demuxer flowunit on cpu.
@PORT parameter: The input port buffer data indicate video file path or stream path, the output port buffer type is video_packet.
The video_packet buffer contain the following meta fields:
Field Name: pts, Type: int64_t
Field Name: dts, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: time_base, Type: double
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
@constraint: The flowuint 'video_decoder' must be used pair with 'video_demuxer.

driver name: video_encoder
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: A video encoder flowunit on cpu.
@PORT parameter: The input port buffer meta type is image
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit supports: 'pix_fmt': [rgb, bgr, nv12], 'layout': [hwc].

driver name: video_input
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description:
@brief: The operator can convert the url configured by the user to buffer data, and be used for video demux.
@PORT parameter: The output port buffer data indicate video path.
@constraint: This flowunit is usually followed by 'video_demuxer'.

driver name: yolov3_postprocess
device type: cpu
version: 1.0.0
class: DRIVER-FLOWUNIT
description: A cpu yolobox flowunit

driver name: inference
device type: virtual
version: 1.0.0
class: DRIVER-VIRTUAL
description:

driver name: python
device type: virtual
version: 1.0.0
class: DRIVER-VIRTUAL
description:

driver name: yolo_postprocess
device type: virtual
version: 1.0.0
class: DRIVER-VIRTUAL
description:

FlowUnit Information :

flowunit name : crop
type : ascend
driver name : crop
version : 1.0.0
description :
@brief: A crop flowunit on ascend device.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
The other input port 'in_region' buffer type is rectangle, the memory arrangement is [x,y,w,h].
it contain the following meta fields:
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [nv12], 'layout': [hwc]. One image can only be cropped with one rectangle and output one crop image.
group : Image
inputs :
input index : 1
name : in_image
type :
device :
input index : 2
name : in_region
type :
device : cpu
outputs :
output index : 1
name : out_image
device :


flowunit name : padding
type : ascend
driver name : padding
version : 1.0.0
description :
@brief: A padding flowunit on ascend device
@PORT paramter: the input port buffer type and the output port buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: the field value range of this flowunit support:'pix_fmt': [nv12], 'layout': [hwc].
group : Image
inputs :
input index : 1
name : in_image
type :
device :
outputs :
output index : 1
name : out_image
device :
options :
option : 1
name : image_width
default : 0
desc : the padding width
required : true
type : int
option : 2
name : image_height
default : 0
desc : the padding height
required : true
type : int
option : 3
name : vertical_align
default : top
desc : vertical align type
required : false
type : string
option : 4
name : horizontal_align
default : left
desc : horizontal align type
required : false
type : string
option : 5
name : padding_data
default : 0,0,0
desc : the padding data
required : false
type : string


flowunit name : resize
type : ascend
driver name : resize
version : 1.0.0
description :
@brief: A resize flowunit on ascend device.
@PORT parameter: The input port buffer type and the output port buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [nv12], 'layout': [hwc].
group : Image
inputs :
input index : 1
name : in_image
type :
device :
outputs :
output index : 1
name : out_image
device :
options :
option : 1
name : image_width
default : 0
desc : the resize width
required : true
type : int
option : 2
name : image_height
default : 0
desc : the resize height
required : true
type : int


flowunit name : video_decoder
type : ascend
driver name : video_decoder
version : 1.0.0
description :
@brief: A resize flowunit on cpu.
@PORT parameter: the input port buffer type is video_packet, the output port buffer type is video_frame.
The video_packet buffer contain the following meta fields:
Field Name: pts, Type: int64_t
Field Name: dts, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: time_base, Type: double
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
The video_frame buffer contain the following meta fields:
Field Name: index, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: url, Type: string
Field Name: timestamp, Type: int64_t
Field Name: eos, Type: bool
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: the flowuint 'video_decoder' must be used pair with 'video_demuxer. the output buffer meta fields 'pix_fmt' is 'nv12', 'layout' is 'hcw'.
group : Video
inputs :
input index : 1
name : in_video_packet
type :
device : cpu
outputs :
output index : 1
name : out_video_frame
device :
options :
option : 1
name : pix_fmt
default : nv12
desc : the pix format
required : true
type : string


flowunit name : base64_decoder
type : cpu
driver name : base64_decoder
version : 1.0.0
description :
@brief: base64 decoder flowunit on cpu.
@PORT parameter: The input port buffer type is image file binary, the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:
group : Image
inputs :
input index : 1
name : in_data
type :
device : cpu
outputs :
output index : 1
name : out_data
device :


flowunit name : buff_meta_mapping
type : cpu
driver name : buff_meta_mapping
version : 1.0.0
description :
@brief: Modify the input buffer meta field name and value according to custom rules.
@PORT parameter: The input port and the output buffer type are binary.
@constraint:
group : Image
inputs :
input index : 1
name : in_data
type :
device :
outputs :
output index : 1
name : out_data
device :
options :
option : 1
name : src_meta
default :
desc : the source meta
required : true
type : string
option : 2
name : dest_meta
default :
desc : the dest meta
required : true
type : string
option : 3
name : rules
default :
desc : the meta mapping rules
required : false
type : string


flowunit name : crop
type : cpu
driver name : crop
version : 1.0.0
description :
@brief: An OpenCV crop flowunit on cpu.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
The other input port 'in_region' buffer type is rectangle, the memory arrangement is [x,y,w,h].
it contain the following meta fields:
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [rgb_packed,bgr_packed], 'layout': [hwc]. One image can only be cropped with one rectangle and output one crop image.
group : Image
inputs :
input index : 1
name : in_image
type :
device :
input index : 2
name : in_region
type :
device :
outputs :
output index : 1
name : out_image
device :


flowunit name : data_source_generator
type : cpu
driver name : data_source_generator
version : 1.0.0
description :
@brief: The operator can generator test data source config for data_source_parser.
@PORT parameter: The output port buffer data indicate data source config.
@constraint: This flowunit is usually followed by 'data_source_parser'.
group : Input
outputs :
output index : 1
name : out_data
device :


flowunit name : data_source_parser
type : cpu
driver name : data_source_parser
version : 1.0.0
description :
@brief: this flowunit can obtain the video stream address or download the video file to the local according to the input configuration data, and output the url. Currently supported types have obs, vcn, vis, resetful, url.
@PORT parameter: The input buffer data type is char *, and contain the following meta fields:
Field Name: source_type, Type: string
the output buffer data type is char *.
@constraint: the field value range of this flowunit support: 'source_type': [obs, vcn, vis, restful, url]. This flowunit is usually followed by 'video_demuxer'.
group : Input
inputs :
input index : 1
name : in_data
type :
device :
outputs :
output index : 1
name : out_video_url
device :
options :
option : 1
name : retry_enable
default : false
desc : enable source parser retry
required : false
type : bool
option : 2
name : retry_interval_ms
default : 1000
desc : the source parser retry interval in ms
required : false
type : int
option : 3
name : retry_count_limit
default : -1
desc : the source parser retry count limit
required : false
type : int


flowunit name : draw_bbox
type : cpu
driver name : draw_bbox
version : 1.0.0
description :
@brief: draw a rectangle area on the input image.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
The other input port 'in_region' buffer type is yolo boundingbox, the memory arrangement is [float x,float y,float w,float h,int32_t condition,float score].
@constraint: This flowunit can be only used follow the flowunit yolov3 postprocess'.
group : Image
inputs :
input index : 1
name : in_image
type :
device :
input index : 2
name : in_region
type :
device :
outputs :
output index : 1
name : out_image
device :


flowunit name : httpserver_async
type : cpu
driver name : httpserver_async
version : 1.0.0
description :
@brief: Start a http/https server, reply to the response immediately when a request is received, and output request info to next flowunit.
@PORT parameter: The output port buffer contain the following meta fields:
Field Name: size, Type: size_t
Field Name: method, Type: string
Field Name: uri, Type: string
Field Name: headers, Type: map<string,string>
Field Name: endpoint, Type: string
The the output port buffer data type is char * .
@constraint:
group : Input
outputs :
output index : 1
name : out_request_info
device :
options :
option : 1
name : endpoint
default : https://127.0.0.1:8080
desc : http server listen URL.
required : true
type : string
option : 2
name : max_requests
default : 1000
desc : max http request.
required : true
type : integer
option : 3
name : keepalive_timeout_sec
default : 200
desc : keep-alive timeout time(sec)
required : false
type : integer
option : 4
name : cert
default :
desc : cert file path
required : false
type : string
option : 5
name : key
default :
desc : key file path
required : false
type : string
option : 6
name : passwd
default :
desc : encrypted key file password.
required : false
type : string
option : 7
name : key_pass
default :
desc : key for encrypted password.
required : false
type : string


flowunit name : httpserver_sync_receive
type : cpu
driver name : httpserver_sync
version : 1.0.0
description :
@brief: Start a http/https server, output request info to next flowunit.
@PORT parameter: The output port buffer contain the following meta fields:
Field Name: size, Type: size_t
Field Name: method, Type: string
Field Name: uri, Type: string
Field Name: headers, Type: map<string,string>
Field Name: endpoint, Type: string
The the output port buffer data type is char * .
@constraint: The flowuint 'httpserver_sync_receive' must be used pair with 'httpserver_sync_reply'.
group : Input
outputs :
output index : 1
name : out_request_info
device :
options :
option : 1
name : endpoint
default : https://127.0.0.1:8080
desc : http server listen URL.
required : true
type : string
option : 2
name : max_requests
default : 1000
desc : max http request.
required : false
type : integer
option : 3
name : keepalive_timeout_sec
default : 200
desc : keep-alive timeout time(sec)
required : false
type : integer
option : 4
name : time_out_ms
default : 5000
desc : max http request timeout.
required : false
type : integer
option : 5
name : cert
default :
desc : cert file path
required : false
type : string
option : 6
name : key
default :
desc : key file path
required : false
type : string
option : 7
name : passwd
default :
desc : encrypted key file password.
required : false
type : string
option : 8
name : key_pass
default :
desc : key for encrypted password.
required : false
type : string


flowunit name : httpserver_sync_reply
type : cpu
driver name : httpserver_sync
version : 1.0.0
description :
@brief: Send reply when receive a response info.flowunit.
@PORT parameter: The input port buffer contain the following meta fields:
Field Name: status, Type: int32_t
Field Name: headers, Type: map<string,string>
The the input port buffer data type is char * .
@constraint: The flowuint 'httpserver_sync_reply' must be used pair with 'httpserver_sync_receive'.
group : Output
inputs :
input index : 1
name : in_reply_info
type :
device :


flowunit name : image_decoder
type : cpu
driver name : image_decoder
version : 1.0.0
description :
@brief: An OpenCV crop flowunit on cpu.
@PORT parameter: The input port buffer type is image file binary, the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:
group : Image
inputs :
input index : 1
name : in_encoded_image
type :
device :
outputs :
output index : 1
name : out_image
device :
options :
option : 1
name : pix_fmt
default : bgr
desc : the output pixel format
required : true
type : string


flowunit name : image_rotate
type : cpu
driver name : image_rotate
version : 1.0.0
description :
@brief: An OpenCV rotate flowunit on cpu.
@PORT parameter: The input port buffer type is image file binary, the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: rotate_angle, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:
group : Image
inputs :
input index : 1
name : in_image
type :
device :
outputs :
output index : 1
name : out_image
device :
options :
option : 1
name : rotate_angle
default : 0
desc : the image rotate image
required : false
type : int


flowunit name : mean
type : cpu
driver name : mean
version : 1.0.0
description :
@brief: The operator is used to subtract the mean for tensor data, for example the image(RGB/BGR), shape(W, H, C), subtract the corresponding value for different channels.
@PORT parameter: The input port and the output buffer type are tensor.
The tensor type buffer contain the following meta fields:
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:
group : Image
inputs :
input index : 1
name : in_data
type :
device :
outputs :
output index : 1
name : out_data
device :
options :
option : 1
name : mean
default :
desc : the mean param
required : true
type : string


flowunit name : normalize
type : cpu
driver name : normalize
version : 1.0.0
description :
@brief: The operator is used to normalize for tensor data, for example the image(RGB/BGR).
@PORT parameter: The input port and the output buffer type are tensor.
The tensor type buffer contain the following meta fields:
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint:
group : Image
inputs :
input index : 1
name : in_data
type :
device :
outputs :
output index : 1
name : out_data
device :
options :
option : 1
name : standard_deviation_inverse
default :
desc : the normalize param
required : true
type : string


flowunit name : output_broker
type : cpu
driver name : output_broker
version : 1.0.0
description :
@brief: Output the input data to the specified service. Currently supported types have dis, obs, webhook.
@PORT parameter: the input port buffer contain the following meta fields:
Field Name: out_broker_names, Type: string
Field Name: out_file_names, Type: string
@constraint: the fields 'out_file_names' can be only required when output type is obs.
group : Output
inputs :
input index : 1
name : in_output_info
type :
device :


flowunit name : packed_planar_transpose
type : cpu
driver name : packed_planar_transpose
version : 1.0.0
description :
@brief: Convert the image format from packed to planar.
@PORT parameter: The input port 'in_image' and the output port 'out_image' buffer type are image.
The image type buffer contain the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit support: 'pix_fmt': [rgb,bgr], 'layout': [hwc]
group : Image
inputs :
input index : 1
name : in_image
type :
device :
outputs :
output index : 1
name : out_image
device :


flowunit name : padding
type : cpu
driver name : padding
version : 1.0.0
description :
@brief: A padding flowunit on cpu.
@PORT parameter: The input port buffer type and the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit supports: 'pix_fmt': [rgb,bgr], 'layout': [hwc].
group : Image
inputs :
input index : 1
name : in_image
type :
device :
outputs :
output index : 1
name : out_image
device :
options :
option : 1
name : image_width
default : 0
desc : Output img width
required : true
type : int
option : 2
name : image_height
default : 0
desc : Output img height
required : true
type : int
option : 3
name : vertical_align
default : top
desc : Output roi vertical align type
required : false
type : list
bottom : bottom
center : center
top : top
option : 4
name : horizontal_align
default : left
desc : Output roi horizontal align type
required : false
type : list
center : center
left : left
right : right
option : 5
name : padding_data
default : 0,0,0
desc : Data for padding
required : false
type : string
option : 6
name : need_scale
default : true
desc : Will scale roi to fit output image
required : false
type : bool
option : 7
name : interpolation
default : inter_linear
desc : Interpolation method to scale roi
required : false
type : list
inter_cubic : inter_cubic
inter_lanczos : inter_lanczos
inter_linear : inter_linear
inter_nn : inter_nn
inter_super : inter_super


flowunit name : resize
type : cpu
driver name : resize
version : 1.0.0
description :
@brief: A resize flowunit on cpu.
@PORT parameter: The input port buffer type and the output port buffer type are image.
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit supports: 'pix_fmt': [rgb_packed,bgr_packed], 'layout': [hwc].
group : Image
inputs :
input index : 1
name : in_image
type :
device :
outputs :
output index : 1
name : out_image
device :
options :
option : 1
name : image_width
default : 640
desc : the resize width
required : true
type : int
option : 2
name : image_height
default : 480
desc : the resize height
required : true
type : int
option : 3
name : interpolation
default : inter_linear
desc : the resize interpolation method
required : true
type : list
inter_area : inter_area
inter_cubic : inter_cubic
inter_lanczos4 : inter_lanczos4
inter_linear : inter_linear
inter_max : inter_max
inter_nearest : inter_nearest
warp_fill_outliers : warp_fill_outliers
warp_inverse_map : warp_inverse_map


flowunit name : video_decoder
type : cpu
driver name : video_decoder
version : 1.0.0
description :
@brief: A video decoder on cpu.
@PORT parameter: The input port buffer type is video_packet, the output port buffer type is video_frame.
The video_packet buffer contain the following meta fields:
Field Name: pts, Type: int64_t
Field Name: dts, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: time_base, Type: double
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
The video_frame buffer contain the following meta fields:
Field Name: index, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: url, Type: string
Field Name: timestamp, Type: int64_t
Field Name: eos, Type: bool
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The flowuint 'video_decoder' must be used pair with 'video_demuxer. the output buffer meta fields 'pix_fmt' is 'brg_packed' or 'rgb_packed', 'layout' is 'hcw'.
group : Video
inputs :
input index : 1
name : in_video_packet
type :
device :
outputs :
output index : 1
name : out_video_frame
device :
options :
option : 1
name : pix_fmt
default : 0
desc : the decoder pixel format
required : true
type : list
bgr : bgr
nv12 : nv12
rgb : rgb


flowunit name : video_demuxer
type : cpu
driver name : video_demuxer
version : 1.0.0
description :
@brief: A video demuxer flowunit on cpu.
@PORT parameter: The input port buffer data indicate video file path or stream path, the output port buffer type is video_packet.
The video_packet buffer contain the following meta fields:
Field Name: pts, Type: int64_t
Field Name: dts, Type: int64_t
Field Name: rate_num, Type: int32_t
Field Name: rate_den, Type: int32_t
Field Name: duration, Type: int64_t
Field Name: time_base, Type: double
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
@constraint: The flowuint 'video_decoder' must be used pair with 'video_demuxer.
group : Video
inputs :
input index : 1
name : in_video_url
type :
device :
outputs :
output index : 1
name : out_video_packet
device :


flowunit name : video_encoder
type : cpu
driver name : video_encoder
version : 1.0.0
description :
@brief: A video encoder flowunit on cpu.
@PORT parameter: The input port buffer meta type is image
The image type buffer contains the following meta fields:
Field Name: width, Type: int32_t
Field Name: height, Type: int32_t
Field Name: width_stride, Type: int32_t
Field Name: height_stride, Type: int32_t
Field Name: channel, Type: int32_t
Field Name: pix_fmt, Type: string
Field Name: layout, Type: int32_t
Field Name: shape, Type: vector<size_t>
Field Name: type, Type: ModelBoxDataType::MODELBOX_UINT8
@constraint: The field value range of this flowunit supports: 'pix_fmt': [rgb, bgr, nv12], 'layout': [hwc].
group : Video
inputs :
input index : 1
name : in_video_frame
type :
device :
options :
option : 1
name : default_dest_url
default :
desc : the encoder dest url
required : true
type : string
option : 2
name : format
default : rtsp
desc : the encoder format
required : true
type : list
flv : flv
mp4 : mp4
rtsp : rtsp
option : 3
name : encoder
default : mpeg4
desc : the encoder method
required : true
type : string


flowunit name : video_input
type : cpu
driver name : video_input
version : 1.0.0
description :
@brief: The operator can convert the url configured by the user to buffer data, and be used for video demux.
@PORT parameter: The output port buffer data indicate video path.
@constraint: This flowunit is usually followed by 'video_demuxer'.
group : Video
outputs :
output index : 1
name : out_video_url
device :
options :
option : 1
name : source_url
default :
desc : the video source url
required : true
type : string

@pymumu
Copy link
Contributor
pymumu commented May 12, 2023

没有mindspore的东西。

modelbox是你自己编译,还是镜像里面带的?

@yubo105139
Copy link
Author

用的镜像。然后python 中有

@pymumu
Copy link
Contributor
pymumu commented May 12, 2023

还有你是怎么进入镜像的?你ssh看看,有可能缺少环境变量。

@yubo105139
Copy link
Author

/usr/local/lib/python3.8/dist-packages/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/msopgen/template/custom_operator_sample/DSL/Mindspore/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/msopgen/template/custom_operator_sample/TIK/Mindspore/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/msopgen/template/operator_demo_projects/mindspore_operator_sample/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/examples/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/algorithms/quant/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/algorithms/prune/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/core/networks/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/core/utils/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/core/metrics/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/core/evaluator/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/core/lr_scheduler/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_automl/core/datasets/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_tlt/vega/common/metrics/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_tlt/vega/abstract/metrics/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_tlt/vega/abstract/callbacks/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_tlt/vega/abstract/datasets/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/x2mindspore/x2ms/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_utils/mindspore
/usr/local/Ascend/ascend-toolkit/6.0.RC1/tools/ascend_model_compression/mindspore

@pymumu
Copy link
Contributor
pymumu commented May 12, 2023

ldd看一下mindspore-flowunit.so文件的依赖是否满足。
这些镜像每日构建都在运行,可能你容器mount的目录屏蔽了什么,导致找不到mindspore的库

@yubo105139
Copy link
Author

好的,谢谢您

@mengmaren
Copy link

我也遇到了这个问题,请问这个问题是如何解决的?
也是直接拉取的上面的镜像,通过editor
主要有几个问题:

  1. 在editor的界面中,功能单元->新建单元 中,C++、推理、Yolo这三个选项都无法点击。
  2. mnist和mnist_mindpore都无法运行,报错为:
    request invalid, job config is invalid, Not found, build graph failed, please check graph config. -> create flowunit 'mnist_infer' failed. -> current environment does not support the inference type: 'mindspore:cpu'
  3. 提供的镜像容器,需要什么额外配置来运行示例程序吗?

@pymumu
Copy link
Contributor
pymumu commented Aug 8, 2023

从提示看,是缺少cpu版本的mindspore推理引擎。镜像自带的一般是NPU版本的mindspore,如果要用CPU推理,则需要安装CPU版本的mindspore。

@mengmaren
Copy link

使用CPU和Ascend都报错:current environment does not support the inference type: 'mindspore:cpu'。
在python中看CPU的环境提示正确:
[root@e45619086c67 home]$ python3
Python 3.8.10 (default, Mar 13 2023, 10:26:41)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import mindspore
mindspore.run_check()
MindSpore version: 1.9.0
MindSpore running check failed.
Ascend kernel runtime initialization failed.


  • Ascend Error Message:

EE8888: Inner Error!
Unsupport flags, flags=4[FUNC:StreamCreate][FILE:api_error.cc][LINE:300]
rtStreamCreateWithFlags execute failed, reason=[feature not support][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:49]
Solution: Please contact support engineer.


  • Framework Error Message: (For framework developers)

Create stream failed, ret:207000


  • C++ Call Stack: (For framework developers)

mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_kernel_runtime.cc:425 Init
mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_stream_manager.cc:96 CreateStreamWithFlags

mindspore.set_context(device_target='Ascend')
mindspore.run_check()
MindSpore version: 1.9.0
MindSpore running check failed.
Ascend kernel runtime initialization failed.


  • Ascend Error Message:

EE8888: Inner Error!
Unsupport flags, flags=4[FUNC:StreamCreate][FILE:api_error.cc][LINE:300]
rtStreamCreateWithFlags execute failed, reason=[feature not support][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:49]
Solution: Please contact support engineer.


  • Framework Error Message: (For framework developers)

Create stream failed, ret:207000


  • C++ Call Stack: (For framework developers)

mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_kernel_runtime.cc:425 Init
mindspore/ccsrc/plugin/device/ascend/hal/device/ascend_stream_manager.cc:96 CreateStreamWithFlags

mindspore.set_context(device_target='CPU')
mindspore.run_check()
MindSpore version: 1.9.0
The result of multiplication calculation is correct, MindSpore has been installed successfully!

具体还有什么办法定位问题吗? 拉取的镜像后还需要哪些配置??

@pymumu
Copy link
Contributor
pymumu commented Aug 9, 2023

如果想用ascend推理:
先要在hostOS中安装ascend的驱动。
然后用用下面的命令启动容器:https://modelbox-ai.com/modelbox-book/environment/container-usage.html

# ascend npu card id [modify]
ASCEND_NPU_ID=0

docker run -itd --device=/dev/davinci$ASCEND_NPU_ID --device=/dev/davinci_manager \
        --device=/dev/hisi_hdc --device=/dev/devmm_svm \
        --tmpfs /tmp --tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro \  
        --name $CONTAINER_NAME -v /home:/home -p $SSH_MAP_PORT:22 \
        -p $EDITOR_MAP_PORT:1104 $HTTP_DOCKER_PORT_COMMAND \
        $IMAGE_NAME

如果只是想用CPU测试mnist的话,可以参考这个:
https://modelbox-ai.com/modelbox-book/cases/mnist-on-sbc.html

也可以执行懒人脚本:
http://download.modelbox-ai.com/tools/build/get-start.sh

-m 参数表示使用国内镜像
-j N表示并发编译。

@mengmaren
Copy link

hostOS中驱动已经安装了:
[root@192 Ascend]# ls -al
total 32
drwxr-xr-x. 8 root root 259 Jul 28 10:53 .
drwxr-xr-x. 16 root root 193 Jul 28 10:44 ..
drwxr-xr-x. 4 root root 62 Jul 4 15:20 ascend-toolkit
dr-xr-x---. 3 HwHiAiUser HwHiAiUser 19 Jul 28 10:44 develop
drwxr-xr-x. 9 root root 156 Jul 28 10:44 driver
dr-xr-x---. 5 root root 84 Jul 28 10:53 firmware
-r-xr-x---. 1 root root 3778 Jul 28 10:44 host_servers_remove.sh
-r-xr-x---. 1 root root 5707 Jul 28 10:44 host_servers_setup.sh
-r-xr-x---. 1 root root 89 Jul 28 10:44 host_services_exit.sh
-r-xr-x---. 1 root root 89 Jul 28 10:44 host_services_setup.sh
-r-xr-x---. 1 root root 7485 Jul 28 10:44 host_sys_init.sh
drwxr-xr-x. 4 root root 62 Jul 4 15:24 nnae
drwxr-xr-x. 4 root root 62 Jul 4 15:22 nnrt
-r--r--r--. 1 root root 22 Jul 28 10:44 version.info
[root@192 Ascend]# cat version.info
version=22.0.3.2.b030
[root@192 Ascend]# cat driver/version.info
Version=22.0.3.2.b030
ascendhal_version=6.14.24
aicpu_version=1.0
tdt_version=1.0
log_version=1.0
prof_version=2.0
dvppkernels_version=1.1
tsfw_version=1.0
Innerversion=V100R001C83SPC003B220
package_version=6.0.rc1.2
[root@192 Ascend]# cat ascend-toolkit/
6.0/ 6.0.2/ latest/ set_env.sh
[root@192 Ascend]# cat ascend-toolkit/latest/version.cfg

version: 1.0

runtime_running_version=[1.84.15.2.220:6.0.2]
compiler_running_version=[1.84.15.2.220:6.0.2]
opp_running_version=[1.84.15.2.220:6.0.2]
toolkit_running_version=[1.84.15.2.220:6.0.2]
aoe_running_version=[1.84.15.2.220:6.0.2]
ncs_running_version=[1.84.15.2.220:6.0.2]
runtime_upgrade_version=[1.84.15.2.220:6.0.2]
compiler_upgrade_version=[1.84.15.2.220:6.0.2]
opp_upgrade_version=[1.84.15.2.220:6.0.2]
toolkit_upgrade_version=[1.84.15.2.220:6.0.2]
aoe_upgrade_version=[1.84.15.2.220:6.0.2]
ncs_upgrade_version=[1.84.15.2.220:6.0.2]
runtime_installed_version=[1.84.15.2.220:6.0.2]
compiler_installed_version=[1.84.15.2.220:6.0.2]
opp_installed_version=[1.84.15.2.220:6.0.2]
toolkit_installed_version=[1.84.15.2.220:6.0.2]
aoe_installed_version=[1.84.15.2.220:6.0.2]
ncs_installed_version=[1.84.15.2.220:6.0.2]

除了推理单元,其他示例都能跑通,现在就想用npu来推理,上面的驱动安装或者版本对吗?

@pymumu
Copy link
Contributor
pymumu commented Aug 9, 2023

你改下推理单元的设备类型,改成ascend。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants