Skip to content

Commit

Permalink
Makes rdiv consistent with div (#45407)
Browse files Browse the repository at this point in the history
Summary:
In addition to making rdiv consistent with div, this PR significantly expands division testing, accounting for floor_divide actually performing truncation division, too.

Pull Request resolved: #45407

Reviewed By: ngimel

Differential Revision: D23974967

Pulled By: mruberry

fbshipit-source-id: 82b46b07615603f161ab7cd1d3afaa6d886bfe95
  • Loading branch information
Mike Ruberry authored and facebook-github-bot committed Sep 29, 2020
1 parent 7cde662 commit 6d37126
Show file tree
Hide file tree
Showing 3 changed files with 296 additions and 82 deletions.
76 changes: 28 additions & 48 deletions test/onnx/expect/TestOperators.test_view_flatten.expect
Expand Up @@ -65,60 +65,40 @@ graph {
}
}
node {
input: "6"
output: "7"
name: "Cast_6"
op_type: "Cast"
attribute {
name: "to"
i: 11
type: INT
}
}
node {
output: "8"
name: "Constant_7"
name: "Constant_6"
op_type: "Constant"
attribute {
name: "value"
t {
data_type: 11
raw_data: "\000\000\000\000\000\000\360?"
data_type: 7
raw_data: "\030\000\000\000\000\000\000\000"
}
type: TENSOR
}
}
node {
input: "8"
input: "7"
output: "9"
name: "Div_8"
input: "6"
output: "8"
name: "Div_7"
op_type: "Div"
}
node {
output: "10"
name: "Constant_9"
op_type: "Constant"
input: "8"
output: "9"
name: "Cast_8"
op_type: "Cast"
attribute {
name: "value"
t {
data_type: 11
raw_data: "\000\000\000\000\000\0008@"
}
type: TENSOR
name: "to"
i: 7
type: INT
}
}
node {
input: "9"
input: "10"
output: "11"
name: "Mul_10"
op_type: "Mul"
}
node {
input: "11"
output: "12"
name: "Cast_11"
output: "10"
name: "Cast_9"
op_type: "Cast"
attribute {
name: "to"
Expand All @@ -128,8 +108,8 @@ graph {
}
node {
input: "3"
output: "13"
name: "Unsqueeze_12"
output: "11"
name: "Unsqueeze_10"
op_type: "Unsqueeze"
attribute {
name: "axes"
Expand All @@ -138,9 +118,9 @@ graph {
}
}
node {
input: "12"
output: "14"
name: "Unsqueeze_13"
input: "10"
output: "12"
name: "Unsqueeze_11"
op_type: "Unsqueeze"
attribute {
name: "axes"
Expand All @@ -149,10 +129,10 @@ graph {
}
}
node {
input: "13"
input: "14"
output: "15"
name: "Concat_14"
input: "11"
input: "12"
output: "13"
name: "Concat_12"
op_type: "Concat"
attribute {
name: "axis"
Expand All @@ -162,9 +142,9 @@ graph {
}
node {
input: "0"
input: "15"
output: "16"
name: "Reshape_15"
input: "13"
output: "14"
name: "Reshape_13"
op_type: "Reshape"
}
name: "torch-jit-export"
Expand All @@ -191,7 +171,7 @@ graph {
}
}
output {
name: "16"
name: "14"
type {
tensor_type {
elem_type: 1
Expand Down

0 comments on commit 6d37126

Please sign in to comment.