{"action":"created","issue":{"url":"https://api.github.com/repos/PaddlePaddle/models/issues/673","repository_url":"https://api.github.com/repos/PaddlePaddle/models","labels_url":"https://api.github.com/repos/PaddlePaddle/models/issues/673/labels{/name}","comments_url":"https://api.github.com/repos/PaddlePaddle/models/issues/673/comments","events_url":"https://api.github.com/repos/PaddlePaddle/models/issues/673/events","html_url":"https://github.com/PaddlePaddle/models/issues/673","id":300941497,"number":673,"title":"Profiling results for sync data reader of DeepASR","user":{"login":"pkuyym","id":5782283,"avatar_url":"https://avatars1.githubusercontent.com/u/5782283?v=4","gravatar_id":"","url":"https://api.github.com/users/pkuyym","html_url":"https://github.com/pkuyym","followers_url":"https://api.github.com/users/pkuyym/followers","following_url":"https://api.github.com/users/pkuyym/following{/other_user}","gists_url":"https://api.github.com/users/pkuyym/gists{/gist_id}","starred_url":"https://api.github.com/users/pkuyym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkuyym/subscriptions","organizations_url":"https://api.github.com/users/pkuyym/orgs","repos_url":"https://api.github.com/users/pkuyym/repos","events_url":"https://api.github.com/users/pkuyym/events{/privacy}","received_events_url":"https://api.github.com/users/pkuyym/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-28T09:02:03Z","updated_at":"2018-02-28T09:31:03Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"测试采用实际音频数据，共run了10个batch，batch size=32，结论如下：\r\n1. 最主要热点是trans add delta，这个占用了超过80%的时间\r\n2. feeding操作耗时很少，可以暂不考虑优化\r\n\r\n主函数耗时分析：\r\n1. 热点是data processing\r\n2. feeding操作耗时很少，可以排除掉这个风险\r\n\r\n```python\r\nTotal time: 109.838 s\r\nFile: profile_sync_reader.py\r\nFunction: profile_reader at line 33\r\n\r\nLine #      Hits         Time  Per Hit   % Time  Line Contents\r\n==============================================================\r\n    33                                           @profile\r\n    34                                           def profile_reader(epoch_num, batch_size):\r\n    35         2         10.0      5.0      0.0      for epoch_id in xrange(epoch_num):\r\n    36         1          4.0      4.0      0.0          for batch_id, one_batch in enumerate(\r\n    37        11   95392189.0 8672017.2     86.8                  data_reader.batch_iterator(batch_size, batch_size)):\r\n    38        11      46440.0   4221.8      0.0              (bat_feature, bat_label, lod) = one_batch\r\n    39        11      83802.0   7618.4      0.1              res_feature.set(bat_feature, place)\r\n    40        11        452.0     41.1      0.0              res_feature.set_lod([lod])\r\n    41        11       1048.0     95.3      0.0              res_label.set(bat_label, place)\r\n    42        11         90.0      8.2      0.0              res_label.set_lod([lod])\r\n    43        11   14309543.0 1300867.5     13.0              time.sleep(1.3)\r\n    44        11         61.0      5.5      0.0              if batch_id > 9:\r\n    45         1       4296.0   4296.0      0.0                  break\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/PaddlePaddle/models/issues/comments/369177322","html_url":"https://github.com/PaddlePaddle/models/issues/673#issuecomment-369177322","issue_url":"https://api.github.com/repos/PaddlePaddle/models/issues/673","id":369177322,"user":{"login":"pkuyym","id":5782283,"avatar_url":"https://avatars1.githubusercontent.com/u/5782283?v=4","gravatar_id":"","url":"https://api.github.com/users/pkuyym","html_url":"https://github.com/pkuyym","followers_url":"https://api.github.com/users/pkuyym/followers","following_url":"https://api.github.com/users/pkuyym/following{/other_user}","gists_url":"https://api.github.com/users/pkuyym/gists{/gist_id}","starred_url":"https://api.github.com/users/pkuyym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkuyym/subscriptions","organizations_url":"https://api.github.com/users/pkuyym/orgs","repos_url":"https://api.github.com/users/pkuyym/repos","events_url":"https://api.github.com/users/pkuyym/events{/privacy}","received_events_url":"https://api.github.com/users/pkuyym/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T09:31:03Z","updated_at":"2018-02-28T09:31:03Z","author_association":"CONTRIBUTOR","body":"这是sync版，去掉了异步+buffer"}}
{"actor":{"display_login":"pkuyym"}}