性能采样配置文件
sampler_config_onnx.proto文件参数说明如表1所示,该文件所在目录为:AMCT安装目录/amct_onnx/proto/sampler_config_onnx.proto。
消息 |
是否必填 |
类型 |
字段 |
说明 |
|---|---|---|---|---|
SamplerConfig |
- |
- |
- |
性能采样的配置。 |
optional |
AscendSamplerConfig |
ascend_sampler_config |
昇腾硬件性能采样配置。 |
|
AscendSamplerConfig |
- |
- |
- |
昇腾硬件性能采样配置。 |
required |
string |
soc_version |
昇腾硬件芯片型号,当前仅支持:
|
|
required |
string |
input_shape |
模型输入数据的shape。 |
|
required |
DistributeConfig |
distribute_config |
分布式配置文件。 |
|
optional |
AtcConfig |
atc |
ATC工具使用的透传配置参数。 |
|
AtcConfig |
- |
- |
- |
ATC工具使用的透传配置参数。 |
repeated |
MapFieldEntry |
options |
ATC参数选项。 |
|
MapFieldEntry |
- |
- |
- |
ATC参数选项。 |
required |
string |
key |
ATC参数选项的key值。 |
|
required |
string |
value |
ATC参数选项的value值。 |
|
DistributeConfig |
required |
string |
ip |
NCS软件包所在服务器IP地址。 |
required |
string |
port |
NCS软件包所在服务器端口。 |
基于该文件构造的性能采样配置文件sampler_config.cfg样例如下所示:
ascend_sampler_config: {
soc_version: "xxx"
input_shape: "input:32,224,224,3"
distribute_config:{
ip:'xx.xx.xx.xx'
port:'8000'
}
atc: {
options: [
{key: "input_format", value: "NHWC"},
{key: "mode", value: "1"}
]
}
}
父主题: 参考信息