Merge remote-tracking branch 'upstream/master' into DmlDev

This commit is contained in:
ISS Build Account 2020-10-17 12:28:21 +00:00
commit bc84aeb5a8
3 changed files with 574 additions and 530 deletions

1092
nodejs/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -62,11 +62,11 @@
"node-addon-api": "^3.0.0",
"node-pre-gyp-github": "^1.4.3",
"onnx-proto": "^4.0.4",
"tar-stream": "2.1.2",
"tar-stream": "^2.1.4",
"typedoc": "^0.17.3",
"typescript": "^3.8.3"
},
"dependencies": {
"prebuild-install": "^5.3.3"
"prebuild-install": "^5.3.5"
}
}
}

View file

@ -1203,10 +1203,10 @@ class SymbolicShapeInference:
if out_shape[idx] is not None:
continue
# note that the broadcasting rule aligns from right to left
# if a tensor has a lower rank, it would automatically broadcast and need no merge
dim_idx = [len(s) - len(out_shape) + idx for s in shapes if len(s) >= len(out_shape) - idx]
# if a tensor has a lower rank (dim_idx[idx] < 0), it would automatically broadcast and need no merge
dim_idx = [len(s) - len(out_shape) + idx for s in shapes]
if len(dim_idx) > 0:
self._add_suggested_merge([s[i] if is_literal(s[i]) else str(s[i]) for s, i in zip(shapes, dim_idx)])
self._add_suggested_merge([s[i] if is_literal(s[i]) else str(s[i]) for s, i in zip(shapes, dim_idx) if i >= 0])
self.run_ = True
else:
self.run_ = False