Skip to content

Commit

Permalink
BUG: Bug fix in range chech.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdiamos committed Jul 19, 2016
1 parent 021dcba commit 01838c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/prnn/detail/rnn/recurrent_ops_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class RecurrentConfig {
};

enum {
BARRIER_WAIT_COUNT = 3//333 // about 10us
BARRIER_WAIT_COUNT = 3333 // about 10us
};

public:
Expand Down
8 changes: 4 additions & 4 deletions include/prnn/detail/rnn/recurrent_ops_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <prnn/detail/util/atomics.h>

#define DEBUG_RECURRENT_OPS 1
#define DEBUG_RECURRENT_OPS 0
#define ATOMIC_INCREMENT 1
#define USE_BARRIER 1
#define SHOULD_SPIN 1
Expand All @@ -18,11 +18,11 @@

#if DEBUG_RECURRENT_OPS

#define dprintf(...) do { if( true ) \
#define dprintf(...) do { if( blockIdx.x == 0 && blockIdx.y == 0 ) \
{ std::printf(__VA_ARGS__); } } while(0)

#define t0printf(...) do { if(threadIdx.x == 0 && (threadIdx.y == 0) && \
true ) { std::printf(__VA_ARGS__); } } while(0)
blockIdx.x == 0 && blockIdx.y == 0 ) { std::printf(__VA_ARGS__); } } while(0)

#define UNROLL

Expand Down Expand Up @@ -1828,7 +1828,7 @@ class PersistentEngine
index_t offsetInLayer = threadOffset + row * 2 * Config::THREADS_PER_BLOCK;
index_t offset = offsetInLayer + blockOffset + bufferOffset;

bool condition = offset < register_state.expanded_layer_size &&
bool condition = (offsetInLayer + blockOffset) < register_state.expanded_layer_size &&
offsetInLayer < Config::EXPANDED_BLOCK_TILE_ROWS;

#if DEBUG_RECURRENT_OPS
Expand Down

0 comments on commit 01838c1

Please sign in to comment.