Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
BowenBao committed Nov 9, 2020
1 parent 3ffbe49 commit cbc1108
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torch/csrc/jit/passes/onnx/scalar_type_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ static c10::optional<c10::ScalarType> InferExpectedScalarType(const Node* n) {
// Mimic PyTorch scalar type promotion logic
// from https://github.com/pytorch/pytorch/issues/9515
// Quoting:
// A Tensor is a considered a "wrapped number" if it is auto-wrapped
// from a C++ or Python number type. Integer types are wrapped as
// 0-dim int64 tensors and floating-point types are wrapped as 0-dim
// double tensors.
// A Tensor is a considered a "wrapped number" if it is
// auto-wrapped from a C++ or Python number type. Integer types are
// wrapped as 0-dim int64 tensors and floating-point types are
// wrapped as 0-dim double tensors.
if (rank == 0) {
auto default_scalar_type =
at::typeMetaToScalarType(at::get_default_dtype());
Expand Down

0 comments on commit cbc1108

Please sign in to comment.