我使用的是sample里面的 /cplusplus/level2_simple_inference/1_classification/googlenet_imagenet_multi_batch 的例子进行推理的。模型是resnet 18,输入图像是 32x32的图像。使用atc转换成了om模型 atc --model=resnet.onnx --framework=5 --output=resnet18 --soc_version=Ascend910A --input_shape="input:128,1,32,32"
但是 推理时间基本跟batchsize的大小成正比(如下)。这是为什么? 同意使用NVDIA显卡,增大batchsize,推理时间基本不变。
batchSize 推理时间(ms)
128 2.145
256 4.061
8192 126
我使用的是sample里面的 /cplusplus/level2_simple_inference/1_classification/googlenet_imagenet_multi_batch 的例子进行推理的。模型是resnet 18,输入图像是 32x32的图像。使用atc转换成了om模型 atc --model=resnet.onnx --framework=5 --output=resnet18 --soc_version=Ascend910A --input_shape="input:128,1,32,32"
但是 推理时间基本跟batchsize的大小成正比(如下)。这是为什么? 同意使用NVDIA显卡,增大batchsize,推理时间基本不变。
batchSize 推理时间(ms)
128 2.145
256 4.061
8192 126