tensorflow / tensorflow/java

Interaction between Tensorflow Java and JavaCPP Pointer deallocation

未关闭
#208 40 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Java
星标
928
派生
227
PR 合并指标
30 天内没有已合并 PR

描述

I am trying to understand why when I use DJL + Tensorflow engine, there is a good amount of time spent in GC, while both DJL and Tensorflow Java seem to use pointerscope and do not relay on GC for object cleanup.

For example, I see JavaCPP Pointer.deallocator gets invoked https://github.com/bytedeco/javacpp/blob/master/src/main/java/org/bytedeco/javacpp/Pointer.java#L666-L667

which is a heavy synchronized call.

Any help is appreciated.

Screen Shot 2021-02-04 at 4 34 24 PM

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先阅读链接的 Pointer.java deallocator 实现,然后跟踪 DJL 和 TensorFlow 引擎在所报告工作负载期间如何使用 PointerScope。重现 GC 配置并比较 deallocator 活动;完成的标准是记录同步清理成本的原因,并确定一条经过验证的降低该成本的方向。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, tensorflow
领域
machine-learning, performance
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。