TFJS basic operations are extremely slow in comparison to Native JS #70252
Labels
comp:apis
Highlevel API related issues
stat:awaiting response
Status - Awaiting response from author
type:performance
Performance Issue
Issue type
Performance
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
tfjs
Custom code
No
OS platform and distribution
No response
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
I was just shocked when I saw that even basic operations like passing an array to
tf.tensor
is 60% slower than allocating atf.buffer
, setting each value one by one and callingtoTensor()
. When it comes totf.randomNormal
, which I believe is called many many times, there is a major slow down, even though the same Box-Muller algorithm is used.Standalone code to reproduce the issue
Relevant log output
The text was updated successfully, but these errors were encountered: