Commit 37806d6b authored by Shucai Xiao's avatar Shucai Xiao
Browse files

fix a crash in running the incepion imagenet model.

parent 645fe9d6
...@@ -85,6 +85,9 @@ bool memory_coloring_impl::allocate(interval_ptr interval) ...@@ -85,6 +85,9 @@ bool memory_coloring_impl::allocate(interval_ptr interval)
offset += (element_size - (offset % element_size)); offset += (element_size - (offset % element_size));
conflict_queue.pop(); conflict_queue.pop();
} }
// when int8 type is used, the offset could be any number
// if not 4-byte aligned, miopen int8 convolution can crash
offset = (offset + 3) / 4 * 4;
segment.offset = offset; segment.offset = offset;
MIGRAPHX_DEBUG(segment.dump()); MIGRAPHX_DEBUG(segment.dump());
required_bytes = std::max(required_bytes, offset + segment.size); required_bytes = std::max(required_bytes, offset + segment.size);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment