You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to find the fastest way of performing logical and on 3 operands over a huge batch of data. I benchmarked several approaches and find that on GPUs (T4), using bool arrays directly are significantly slower (15%+) than converting them to int arrays then do reduction. However, this behaviour is not observed on more advanced GPUs (V100), and is reversed on TPU (ints are slower). Why is this the case?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to find the fastest way of performing logical
and
on 3 operands over a huge batch of data. I benchmarked several approaches and find that on GPUs (T4), using bool arrays directly are significantly slower (15%+) than converting them to int arrays then do reduction. However, this behaviour is not observed on more advanced GPUs (V100), and is reversed on TPU (ints are slower). Why is this the case?The benchmark code are as below. (Colab available here)
Benchmark Code
The outputs are as below
T4, JAX 0.4.10, Python 3.10.12
V100, JAX 0.4.10, Python 3.10.12
TPU, JAX 0.3.25, Python 3.10.12
Beta Was this translation helpful? Give feedback.
All reactions