Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/FBGEMM.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoung Jin Kim <youki@microsoft.com>2019-09-25 19:40:48 +0300
committerYoung Jin Kim <youki@microsoft.com>2019-09-25 19:40:48 +0300
commit7bd598c9e97871e42c19449fddf7bd317898eb58 (patch)
treea3b1fea18477b63add473037d0644a96b115e0da /src/PackAWithIm2Col.cc
parent08763b198ef743741560ae42a9c10a3017c7c9ce (diff)
parent518d8a1832cf1eb1dda2feace1a278e9e4f302ba (diff)
Merge remote-tracking branch 'upstream/master' into youki/win-jit-debug-int8
Fix for windows build errors
Diffstat (limited to 'src/PackAWithIm2Col.cc')
-rw-r--r--src/PackAWithIm2Col.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/PackAWithIm2Col.cc b/src/PackAWithIm2Col.cc
index 2aca27d..6101fef 100644
--- a/src/PackAWithIm2Col.cc
+++ b/src/PackAWithIm2Col.cc
@@ -275,6 +275,7 @@ void PackAWithIm2Col<T, accT, SPATIAL_DIM>::pack(const block_type_t& block) {
conv_p_.K[1] == 7 && conv_p_.stride[0] == 2 && conv_p_.stride[1] == 2 &&
conv_p_.pad[0] == 3 && conv_p_.pad[1] == 3 && block.col_size == 147 &&
block_p.col_size == 148 && block.col_start == 0 &&
+ conv_p_.dilation[0] == 1 && conv_p_.dilation[1] == 1 &&
std::is_same<T, uint8_t>::value) {
if (BaseType::blockColSize() == 256) {
pack_a_with_im2col_opt<
@@ -350,8 +351,10 @@ void PackAWithIm2Col<T, accT, SPATIAL_DIM>::pack(const block_type_t& block) {
int r = grs / conv_p_.K[1] % conv_p_.K[0];
int g = grs / conv_p_.K[1] / conv_p_.K[0];
- int h_in = -conv_p_.pad[0] + h * conv_p_.stride[0] + r;
- int w_in = -conv_p_.pad[1] + w * conv_p_.stride[1] + s;
+ int h_in =
+ -conv_p_.pad[0] + h * conv_p_.stride[0] + r * conv_p_.dilation[0];
+ int w_in =
+ -conv_p_.pad[1] + w * conv_p_.stride[1] + s * conv_p_.dilation[1];
if (h_in < 0 || h_in >= conv_p_.IN_DIM[0] || w_in < 0 ||
w_in >= conv_p_.IN_DIM[1]) {
@@ -399,9 +402,12 @@ void PackAWithIm2Col<T, accT, SPATIAL_DIM>::pack(const block_type_t& block) {
int q = gqrs / conv_p_.K[2] / conv_p_.K[1] % conv_p_.K[0];
int g = gqrs / conv_p_.K[2] / conv_p_.K[1] / conv_p_.K[0];
- int t_in = -conv_p_.pad[0] + t * conv_p_.stride[0] + q;
- int h_in = -conv_p_.pad[1] + h * conv_p_.stride[1] + r;
- int w_in = -conv_p_.pad[2] + w * conv_p_.stride[2] + s;
+ int t_in =
+ -conv_p_.pad[0] + t * conv_p_.stride[0] + q * conv_p_.dilation[0];
+ int h_in =
+ -conv_p_.pad[1] + h * conv_p_.stride[1] + r * conv_p_.dilation[1];
+ int w_in =
+ -conv_p_.pad[2] + w * conv_p_.stride[2] + s * conv_p_.dilation[2];
if (t_in < 0 || t_in >= conv_p_.IN_DIM[0] || h_in < 0 ||
h_in >= conv_p_.IN_DIM[1] || w_in < 0 ||