Skip to content

Commit d21d836

Browse files
committed
Chunk size check needs to be >= not >
1 parent b91de34 commit d21d836

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cxx/rl/io/writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void Writer::writeTensor(std::string const &name, Shape<N> const &shape, Scalar
139139
// Try to stop chunk dimension going over 4 gig
140140
Index sizeInBytes = Product(shape) * sizeof(Scalar);
141141
Index dimToShrink = 0;
142-
while (sizeInBytes > (1L << 32L)) {
142+
while (sizeInBytes >= (1L << 32L)) {
143143
if (chunk_dims[dimToShrink] > 1) {
144144
chunk_dims[dimToShrink] /= 2;
145145
sizeInBytes /= 2;

0 commit comments

Comments
 (0)