Title: Large latency on Tensor allocation · Issue #313 · tensorflow/java · GitHub
Open Graph Title: Large latency on Tensor allocation · Issue #313 · tensorflow/java
X Title: Large latency on Tensor allocation · Issue #313 · tensorflow/java
Description: System information TensorFlow version: 0.3.1 Doc Link: https://www.tensorflow.org/jvm/install Describe the documentation issue Not sure this is the correct forum but I would like to some guidance on how to setup sessions and resource man...
Open Graph Description: System information TensorFlow version: 0.3.1 Doc Link: https://www.tensorflow.org/jvm/install Describe the documentation issue Not sure this is the correct forum but I would like to some guidance o...
X Description: System information TensorFlow version: 0.3.1 Doc Link: https://www.tensorflow.org/jvm/install Describe the documentation issue Not sure this is the correct forum but I would like to some guidance o...
Opengraph URL: https://github.com/tensorflow/java/issues/313
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Large latency on Tensor allocation","articleBody":"\r\n**System information**\r\n- TensorFlow version: 0.3.1\r\n- Doc Link: https://www.tensorflow.org/jvm/install\r\n\r\n\r\n**Describe the documentation issue**\r\n\r\nNot sure this is the correct forum but I would like to some guidance on how to setup sessions and resource management would be interesting. \r\n\r\nAfter two weeks trying to understand why latencies in 0.3.1 were completely uncontrollable (as compared to official 1.3.1) I ran into #208. This matches my observations. \r\n\r\nWe are trying to run Prediction on models with thousands of data points in different tensor per prediction. Memory allocation on the threads are in 20MB/s and there seems to be a sync between JavaCCP Allocation thread and our worker threads. In addition to this allocation using Size(1) tensor seems to be very slow (in the 7ms range). \r\n\r\nAfter reading #208, it seems we are doing everything wrong. But I don't really have a clear picture of how it should be done: Would `EagerSession` help? Could I use a `Session` per HTTP request? Should I allocate larger multi-dimensional tensors instead of a single one? How should I configure thread pools? I understand that the API is work in progress, but current documentation is very light on this kind of documentation.\r\n\r\nI don't think this is a bug, but I can convert into some other sort of issue. ","author":{"url":"https://github.com/nebulorum","@type":"Person","name":"nebulorum"},"datePublished":"2021-05-03T19:44:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":43},"url":"https://github.com/313/java/issues/313"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:917f5200-5fb5-c40f-760d-d757ccb81768 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E94A:1672C1:B03BFD:E68D62:696AF97E |
| html-safe-nonce | 280c7c5594151ea55357c2eba4f6e794fa08a22994b4e43a2fceea02a0af80a5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTRBOjE2NzJDMTpCMDNCRkQ6RTY4RDYyOjY5NkFGOTdFIiwidmlzaXRvcl9pZCI6Ijg2MjA2NDM1OTI3NTUxNDkxODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 11b138f5f2bf34a648177303444c82c75d910fd265f394727c15107e5fa91b22 |
| hovercard-subject-tag | issue:874854435 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tensorflow/java/313/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5239b8c1848009e1596710837cf112bc4882a3ac63e82d39f4ae41943971428/tensorflow/java/issues/313 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5239b8c1848009e1596710837cf112bc4882a3ac63e82d39f4ae41943971428/tensorflow/java/issues/313 |
| og:image:alt | System information TensorFlow version: 0.3.1 Doc Link: https://www.tensorflow.org/jvm/install Describe the documentation issue Not sure this is the correct forum but I would like to some guidance o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nebulorum |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/tensorflow/java git https://github.com/tensorflow/java.git |
| octolytics-dimension-user_id | 15658638 |
| octolytics-dimension-user_login | tensorflow |
| octolytics-dimension-repository_id | 207384523 |
| octolytics-dimension-repository_nwo | tensorflow/java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 207384523 |
| octolytics-dimension-repository_network_root_nwo | tensorflow/java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width