My machine has the following spec:
CPU: Xeon E5-1620 v4
GPU: Titan X (Pascal)
Ubuntu 16.04
Nvidia driver 375.26
CUDA tookit 8.0
Too small batch size. Try to increase.
Results for my GTX1050Ti:
imdb_bidirectional_lstm.py batch_size time 32 (default) 252 64 131 96 87 128 66 imdb_lstm.py batch_size time 32 (default) 108 64 50 96 34 128 25