Skip to content

Commit

Permalink
Fix typo in persistent RNN kernel checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Stewart Hall committed Jun 30, 2016
1 parent 8a5b2c4 commit 79ab17f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neon/backends/nervanagpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -2468,7 +2468,7 @@ def compound_rnn_unroll_fprop(self, W_recur, h_prev_s, h_ff_s, h_s, bias,
num_blocks = (-(-h_s[0].shape[0] // 128)) * (-(-h_s[0].shape[1] // 32))
num_blocks = (-(-num_blocks // 4))

if (activation.classnm == 'Rectlinclip' and num_blocks < self.sm_count and
if (activation.classnm == 'Rectlinclip' and num_blocks <= self.sm_count and
not self.use_cudac_kernels):
if h_s[0].base is not h_ff_s[0].base:
if len(h_s[0].base.shape) == 3:
Expand Down Expand Up @@ -2543,7 +2543,7 @@ def compound_rnn_unroll_bprop(self, W_recur, delta_prev_s, delta_s, h_s,
num_blocks = (-(-delta_s[0].shape[0] // 128)) * (-(-delta_s[0].shape[1] // 32))
num_blocks = (-(-num_blocks // 4))

if (activation.classnm == 'Rectlinclip' and num_blocks < self.sm_count and
if (activation.classnm == 'Rectlinclip' and num_blocks <= self.sm_count and
not self.use_cudac_kernels):
# Compute activation bprop for first timestep since there is
# no compounded GEMM
Expand Down

0 comments on commit 79ab17f

Please sign in to comment.