Skip to content

有时候会卡主webgl的渲染 #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
geshu opened this issue Jun 29, 2020 · 3 comments
Open

有时候会卡主webgl的渲染 #71

geshu opened this issue Jun 29, 2020 · 3 comments

Comments

@geshu
Copy link

geshu commented Jun 29, 2020

TensorFlow.js version:2.0.1
tfjs-wechat plugin version:0.10
WeChat version:7.0.13
WeChat base API version:2.11.3
WeChat IDE version:stable 1.03.2006090

我们团队做了一个关于鞋子3D姿态识别的AI,并使其可在IOS微信小程序上以较好的帧率运行,然后我们想接入一个3D绘制的效
果,但发现有时渲染会在AI代码运行后卡主,具体表现为渲染与AI代码依旧正常执行,Webgl渲染区域变得全黑。所以我们又对
tfjs使用与webgl渲染的结合进行了多种测试,甚至发现在iPhone8的测试机上有时只运行了简单的tensor操作与使用webgl渲染相
机帧也会出现webgl渲染卡住的问题,且随着双方功能的复杂度提升在更好的机型上也会出现渲染卡住的问题。
这个问题在不同机型上都呈现着不报错,不必现,console输出正常的情况,让我们在debug时十分困扰,因为猜测不到具体
是什么原因造成的问题。
我们也猜测过是因为webgl内存不足导致的问题,但如果没有被卡主AI与渲染是可以持续执行的,且在消耗很少的操作中也会出现这样的问题,所以我现在的猜测是webgl内存地址在双方调用时发生了冲突。

@pyu10055
Copy link
Collaborator

pyu10055 commented Jul 1, 2020

@geshu are there way to check the GPU mem footprint when the error happens? How large is your model?
You can use the profile() method to track the peak tensor size on GPU.

@geshu
Copy link
Author

geshu commented Jul 2, 2020

@pyu10055 thank you for check this issue. I do not know if there is a way to check the GPU mem footprint in phone(this error only happens wthen the program run in the phone, program can run well in the devtool), and our model is about 7-8mb,but we tried run posnet and render camera framedata in iphoneXR this error is steal happen. i will use the profile() to check if there is something wrong when the error hanppen. Thank you again and keep touch.

@pyu10055
Copy link
Collaborator

pyu10055 commented Jul 2, 2020

@ele828 Hi Eric, do you have an idea what could be wrong here? thanks.

@geshu geshu closed this as completed Jul 9, 2020
@geshu geshu reopened this Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants