microsoft / microsoft/onnxruntime
onnxruntime-web bug : 'return f4' is fast as normal, but 'return f1,f2,f3,f4' is very slow in webgl mode
@shalvamist is already working on this.
Since Aug 17, 2022.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 179
Description
(1)slow when return f1,f2,f3,f4
def forward(self, x):
f1 = self.b1(x)
f2 = self.b2(f1)
f3 = self.b3(f2)
f4 = self.b4(f3)
return f1,f2,f3,f4
when I return f1,f2,f3,f4 , the onnx used in chrome is very slow. (ort.min.js using webgl)
(2) fast when return f4
def forward(self, x):
f1 = self.b1(x)
f2 = self.b2(f1)
f3 = self.b3(f2)
f4 = self.b4(f3)
return f4
when I only return f4 , the onnx used in chrome is very fast. (ort.min.js using webgl)
but in normal , the two way should be the same time
I also find that
def forward(self, x):
f1 = self.b1(x)
f2 = self.b2(f1)
return f2
is faster than
def forward(self, x):
f1 = self.b1(x)
return f1
So anyone can tell me why?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.