[普通]muti-thread 推理tensorflow

作者(passion) 阅读(1013次) 评论(0) 分类( 软件)

https://pypi.org/project/nn-sdk/


muti-thread 推理tensorflow



model_dir /home/tk/finalmodel/bert_ner/dhcc_model_1.15.0, max_seq_length 256 , inner_decode 1

2020-12-29 05:45:30.750590: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2

tf_sdk_new resource load, tf version 1

WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/nn_sdk/inference_csdk.py:25: The name tf.GPUOptions is deprecated. Please use tf.compat.v1.GPUOptions instead.


WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/nn_sdk/inference_csdk.py:25: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.


WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/nn_sdk/inference_csdk.py:25: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.


2020-12-29 05:45:31.952051: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA

2020-12-29 05:45:31.985100: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2095010000 Hz

2020-12-29 05:45:31.987617: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4a9f8d0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:

2020-12-29 05:45:31.987661: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version

2020-12-29 05:45:31.992022: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1

2020-12-29 05:45:32.662558: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4b17140 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:

2020-12-29 05:45:32.662626: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): TITAN X (Pascal), Compute Capability 6.1

2020-12-29 05:45:32.664027: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: 

name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate(GHz): 1.531

pciBusID: 0000:04:00.0

2020-12-29 05:45:32.664088: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2

2020-12-29 05:45:32.667356: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10

2020-12-29 05:45:32.670468: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10

2020-12-29 05:45:32.671002: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10

2020-12-29 05:45:32.674726: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10

2020-12-29 05:45:32.676808: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10

2020-12-29 05:45:32.680973: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7

2020-12-29 05:45:32.682368: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0

2020-12-29 05:45:32.682403: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2

2020-12-29 05:45:33.000486: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:

2020-12-29 05:45:33.000543: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186]      0 

2020-12-29 05:45:33.000551: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0:   N 

2020-12-29 05:45:33.002143: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11379 MB memory) -> physical GPU (device: 0, name: TITAN X (Pascal), pci bus id: 0000:04:00.0, compute capability: 6.1)

WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/nn_sdk/inference_csdk.py:25: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.


WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/nn_sdk/inference_csdk.py:25: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.


csdk_object create  26853616

vocab_file /home/tk/finalmodel/bert_ner/vocab.txt ,max_seq_length 256 , do_lower_case 0 ,mode 0 ,pad 0

csdk_tokenizer create  677848512

model_dir /home/tk/finalmodel/bert_ner/dhcc_model_1.15.0, max_seq_length 256 , inner_decode 1

tf_sdk_new resource load, tf version 1

2020-12-29 05:45:35.253587: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: 

name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate(GHz): 1.531

pciBusID: 0000:04:00.0

2020-12-29 05:45:35.253651: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2

2020-12-29 05:45:35.253695: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10

2020-12-29 05:45:35.253715: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10

2020-12-29 05:45:35.253732: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10

2020-12-29 05:45:35.253753: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10

2020-12-29 05:45:35.253771: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10

2020-12-29 05:45:35.253790: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7

2020-12-29 05:45:35.255133: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0

2020-12-29 05:45:35.255176: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:

2020-12-29 05:45:35.255187: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186]      0 

2020-12-29 05:45:35.255197: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0:   N 

2020-12-29 05:45:35.256563: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11379 MB memory) -> physical GPU (device: 0, name: TITAN X (Pascal), pci bus id: 0000:04:00.0, compute capability: 6.1)

csdk_object create  327774800

vocab_file /home/tk/finalmodel/bert_ner/vocab.txt ,max_seq_length 256 , do_lower_case 0 ,mode 0 ,pad 0

csdk_tokenizer create  1790913152

[[101, 2456, 6121, 6572, 1384, 3221, 126, 124, 123, 125, 123, 123, 130, 122, 124, 125, 122, 129, 125, 121, 122, 123, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]

2020-12-29 05:45:49.090640: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10

[[['银行卡号', 5, 20]]]

下面进行性能测试

batch_size 1 ,real cost_time 35.300

[[['银行卡号', 5, 20]]]

下面进行性能测试

batch_size 1 ,real cost_time 35.700

run time 19958.0 ms

csdk_tokenizer destroy

csdk_object destroy

csdk_tokenizer destroy

csdk_object destroy


« 上一篇:fastlabel 最强版标注神器,想你所想,做你想做
« 下一篇:Pytorch常用的交叉熵损失函数CrossEntropyLoss()详解
在这里写下您精彩的评论
  • 微信

  • QQ

  • 支付宝

返回首页
返回首页 img
返回顶部~
返回顶部 img