Skip to content

Instantly share code, notes, and snippets.

@jamesr66a
Created November 1, 2018 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesr66a/d3fcf1b1defd8913e9f7d4b5d8a866ce to your computer and use it in GitHub Desktop.
Save jamesr66a/d3fcf1b1defd8913e9f7d4b5d8a866ce to your computer and use it in GitHub Desktop.
======================================================================
ERROR: test_ge (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 1443, in test_ge
ge = torch._C.GraphExecutor(foo, (a, b))
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. torch._C.GraphExecutor(func: function, inputs: tuple, var_name_lookup_fn: function, optimize: bool = True)
2. torch._C.GraphExecutor(graph: torch::jit::Graph, optimize: bool = True)
Invoked with: <function TestJit.test_ge.<locals>.foo at 0x11a2636a8>, (tensor([0.1696]), tensor([0.1232]))
======================================================================
ERROR: test_inplace_check (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 1106, in test_inplace_check
ge = torch._C.GraphExecutor(fn, (x,))
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. torch._C.GraphExecutor(func: function, inputs: tuple, var_name_lookup_fn: function, optimize: bool = True)
2. torch._C.GraphExecutor(graph: torch::jit::Graph, optimize: bool = True)
Invoked with: <function TestJit.test_inplace_check.<locals>.fn at 0x11a2636a8>, (tensor([[ 2.0226, -1.3502, 0.6972, 0.0099, 0.4891],
[-0.3097, 0.5574, -1.3314, -1.1927, -2.4451],
[ 0.3312, -1.0075, -0.0567, 0.6201, -0.2603],
[-0.7260, 0.5136, 0.5163, -0.1574, -0.3182],
[-0.6280, 0.2443, 0.0276, 0.2924, 1.0204]]),)
======================================================================
FAIL: test_export_tensoroption_to (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 1940, in test_export_tensoroption_to
example_outputs=example_outputs))
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'Mode[148 chars]me: "0", type:Tensor dims: 2}]\n outputs:[865 chars]n}\n' != 'Mode[148 chars]me: "x", type:Tensor dims: 2}]\n outputs:[865 chars]n}\n'
ModelProto {
producer_name: "pytorch"
domain: ""
doc_string: ""
graph:
GraphProto {
name: "torch-jit-export"
- inputs: [{name: "0", type:Tensor dims: 2}]
? ^
+ inputs: [{name: "x", type:Tensor dims: 2}]
? ^
outputs: [{name: "7", type:Tensor dims: 2}]
initializers: []
nodes: [
Node {type: "Constant", inputs: [], outputs: [1], attributes: [{ name: 'value', type: tensor, value:TensorProto shape: []}]},
- Node {type: "Gather", inputs: [0,1], outputs: [2], attributes: [{ name: 'axis', type: int, value: 0}]},
? ^
+ Node {type: "Gather", inputs: [x,1], outputs: [2], attributes: [{ name: 'axis', type: int, value: 0}]},
? ^
Node {type: "Constant", inputs: [], outputs: [3], attributes: [{ name: 'value', type: tensor, value:TensorProto shape: []}]},
Node {type: "Shape", inputs: [3], outputs: [4], attributes: []},
Node {type: "Expand", inputs: [2,4], outputs: [5], attributes: []},
Node {type: "Cast", inputs: [5], outputs: [6], attributes: [{ name: 'to', type: int, value: 1}]},
- Node {type: "Add", inputs: [6,0], outputs: [7], attributes: []}
? ^
+ Node {type: "Add", inputs: [6,x], outputs: [7], attributes: []}
? ^
]
}
opset_import: [OperatorSetIdProto { domain: }],
}
======================================================================
FAIL: test_peephole (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 413, in test_peephole
self.assertExpectedGraph(tf.graph)
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(1)\n %1 : Double(1)) {\n return (%0);\n}\n' != 'graph(%x : Double(1)\n %y : Double(1)) {\n return (%x);\n}\n'
- graph(%0 : Double(1)
? ^
+ graph(%x : Double(1)
? ^
- %1 : Double(1)) {
? ^
+ %y : Double(1)) {
? ^
- return (%0);
? ^
+ return (%x);
? ^
}
======================================================================
FAIL: test_trace_detach (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 1750, in test_trace_detach
self.assertExpectedGraph(traced.graph)
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)\n %1 : Double(4, 5)[104 chars]n}\n' != 'graph(%x : Double(3, 4)\n %w : Double(4, 5)[104 chars]n}\n'
- graph(%0 : Double(3, 4)
? ^
+ graph(%x : Double(3, 4)
? ^
- %1 : Double(4, 5)) {
? ^
+ %w : Double(4, 5)) {
? ^
- %2 : Double(3, 5) = aten::matmul(%0, %1)
? ^ ^
+ %2 : Double(3, 5) = aten::matmul(%x, %w)
? ^ ^
%3 : Double(3, 5) = aten::detach(%2)
return (%3);
}
======================================================================
FAIL: test_trace_detach_inplace (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 1765, in test_trace_detach_inplace
self.assertExpectedGraph(traced.graph)
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)\n %1 : Double(4, 5)[104 chars]n}\n' != 'graph(%x : Double(3, 4)\n %w : Double(4, 5)[104 chars]n}\n'
- graph(%0 : Double(3, 4)
? ^
+ graph(%x : Double(3, 4)
? ^
- %1 : Double(4, 5)) {
? ^
+ %w : Double(4, 5)) {
? ^
- %2 : Double(3, 5) = aten::matmul(%0, %1)
? ^ ^ ^
+ %y : Double(3, 5) = aten::matmul(%x, %w)
? ^ ^ ^
- %3 : Double(3, 5) = aten::detach(%2)
? ^
+ %3 : Double(3, 5) = aten::detach(%y)
? ^
return (%3);
}
======================================================================
FAIL: test_trace_tuple (__main__.TestJit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 1196, in test_trace_tuple
self.assertExpectedGraph(traced_fn.graph)
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(2, 2)\n %1 : Tuple) {\n [208 chars]n}\n' != 'graph(%x : Double(2, 2)\n %1 : Tuple) {\n [208 chars]n}\n'
- graph(%0 : Double(2, 2)
? ^
+ graph(%x : Double(2, 2)
? ^
%1 : Tuple) {
%2 : Double(2, 2), %3 : Double(2, 2) = prim::TupleUnpack(%1)
- %4 : Double(2, 2) = aten::mul(%0, %3)
? ^
+ %4 : Double(2, 2) = aten::mul(%x, %3)
? ^
- %5 : Double(2, 2) = aten::mul(%0, %2)
? ^
+ %5 : Double(2, 2) = aten::mul(%x, %2)
? ^
%6 : Tuple = prim::TupleConstruct(%4, %5)
- return (%0, %6);
? ^
+ return (%x, %6);
? ^
}
======================================================================
FAIL: test_addmm_fusion (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 7558, in test_addmm_fusion
self.assertExpectedGraph(ge_graph, 'jit')
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(*, *)\n %1 : Double(*, *)[233 chars]n}\n' != 'graph(%x : Double(*, *)\n %y : Double(*, *)[233 chars]n}\n'
- graph(%0 : Double(*, *)
? ^
+ graph(%x : Double(*, *)
? ^
- %1 : Double(*, *)
? ^
+ %y : Double(*, *)
? ^
- %2 : Double(*, *)) {
? ^
+ %c : Double(*, *)) {
? ^
%3 : int = prim::Constant[value=1](), scope: AddmmWrapper
- %4 : Double(*, *) = aten::mm(%0, %1), scope: AddmmWrapper
? ^ ^
+ %4 : Double(*, *) = aten::mm(%x, %y), scope: AddmmWrapper
? ^ ^
- %5 : Double(*, *) = aten::add(%4, %2, %3), scope: AddmmWrapper
? ^
+ %5 : Double(*, *) = aten::add(%4, %c, %3), scope: AddmmWrapper
? ^
return (%5);
}
======================================================================
FAIL: test_call_python_mod_from_traced_module (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 6721, in test_call_python_mod_from_traced_module
self.assertExpected(canonical(tm.graph))
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)\n %1 : Double(4, 5)[380 chars]n}\n' != 'graph(%x.1 : Double(3, 4)\n %1 : Double(4, [384 chars]n}\n'
- graph(%0 : Double(3, 4)
? ^
+ graph(%x.1 : Double(3, 4)
? ^^^
%1 : Double(4, 5)
%2 : Double(5, 7)) {
- %3 : Double(3, 5) = aten::mm(%0, %1), scope: TracedModule
? ^ ^
+ %x : Double(3, 5) = aten::mm(%x.1, %1), scope: TracedModule
? ^ ^^^
- %4 : Double(3, 7) = aten::mm(%3, %2), scope: TracedModule/PythonModule[mod]
? ^
+ %4 : Double(3, 7) = aten::mm(%x, %2), scope: TracedModule/PythonModule[mod]
? ^
%5 : Double() = prim::Constant[value={1}](), scope: TracedModule
%6 : int = prim::Constant[value=1](), scope: TracedModule
%7 : Double(3, 7) = aten::add(%4, %5, %6), scope: TracedModule
return (%7);
}
======================================================================
FAIL: test_call_python_mod_from_tracing_fn (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 6619, in test_call_python_mod_from_tracing_fn
self.assertExpected(canonical(traced_fn.graph))
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)) {\n %1 : Double(4, 3) [259 chars]n}\n' != 'graph(%x : Double(3, 4)) {\n %1 : Double(4, 3) [259 chars]n}\n'
- graph(%0 : Double(3, 4)) {
? ^
+ graph(%x : Double(3, 4)) {
? ^
%1 : Double(4, 3) = prim::Constant[value=<Tensor>](), scope: PythonMod
- %2 : Double(3, 3) = aten::mm(%0, %1), scope: PythonMod
? ^
+ %2 : Double(3, 3) = aten::mm(%x, %1), scope: PythonMod
? ^
%3 : Double() = prim::Constant[value={1}]()
%4 : int = prim::Constant[value=1]()
%5 : Double(3, 3) = aten::add(%2, %3, %4)
return (%5);
}
======================================================================
FAIL: test_call_script_fn_from_traced_module (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 6779, in test_call_script_fn_from_traced_module
self.assertExpected(canonical(tm.graph))
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)\n %1 : Double(4, 5)[152 chars]n}\n' != 'graph(%x : Double(3, 4)\n %1 : Double(4, 5)[152 chars]n}\n'
- graph(%0 : Double(3, 4)
? ^
+ graph(%x : Double(3, 4)
? ^
%1 : Double(4, 5)) {
- %2 : Double(3, 5) = aten::mm(%0, %1), scope: TracedModule
? ^
+ %2 : Double(3, 5) = aten::mm(%x, %1), scope: TracedModule
? ^
%3 : Double(*, *) = aten::neg(%2), scope: TracedModule/ScriptModule
return (%3);
}
======================================================================
FAIL: test_call_script_module_from_traced_module (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 6804, in test_call_script_module_from_traced_module
self.assertExpected(canonical(tm.graph))
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)\n %1 : Double(4, 5)[377 chars]n}\n' != 'graph(%x : Double(3, 4)\n %1 : Double(4, 5)[377 chars]n}\n'
- graph(%0 : Double(3, 4)
? ^
+ graph(%x : Double(3, 4)
? ^
%1 : Double(4, 5)
%2 : Double(5, 7)) {
- %3 : Double(3, 5) = aten::mm(%0, %1), scope: TracedModule
? ^
+ %3 : Double(3, 5) = aten::mm(%x, %1), scope: TracedModule
? ^
%4 : Double(*, *) = aten::mm(%3, %2), scope: TracedModule/ScriptMod[mod]
%5 : Double() = prim::Constant[value={1}](), scope: TracedModule
%6 : int = prim::Constant[value=1](), scope: TracedModule
%7 : Double(3, 7) = aten::add(%4, %5, %6), scope: TracedModule
return (%7);
}
======================================================================
FAIL: test_call_traced_fn_from_traced_module (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 6738, in test_call_traced_fn_from_traced_module
self.assertExpected(canonical(tm.graph))
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)\n %1 : Double(4, 5)[149 chars]n}\n' != 'graph(%x : Double(3, 4)\n %1 : Double(4, 5)[149 chars]n}\n'
- graph(%0 : Double(3, 4)
? ^
+ graph(%x : Double(3, 4)
? ^
%1 : Double(4, 5)) {
- %2 : Double(3, 5) = aten::mm(%0, %1), scope: TracedModule
? ^
+ %2 : Double(3, 5) = aten::mm(%x, %1), scope: TracedModule
? ^
%3 : Double(*, *) = aten::neg(%2), scope: TracedModule/traced_fn
return (%3);
}
======================================================================
FAIL: test_call_traced_module_from_traced_module (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 6762, in test_call_traced_module_from_traced_module
self.assertExpected(canonical(tm.graph))
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(3, 4)\n %1 : Double(4, 5)[363 chars]n}\n' != 'graph(%x : Double(3, 4)\n %1 : Double(4, 5)[363 chars]n}\n'
- graph(%0 : Double(3, 4)
? ^
+ graph(%x : Double(3, 4)
? ^
%1 : Double(4, 5)
%2 : Double(5, 7)) {
- %3 : Double(3, 5) = aten::mm(%0, %1), scope: TracedModule
? ^
+ %3 : Double(3, 5) = aten::mm(%x, %1), scope: TracedModule
? ^
%4 : Double(*, *) = aten::mm(%3, %2), scope: TracedModule1
%5 : Double() = prim::Constant[value={1}](), scope: TracedModule
%6 : int = prim::Constant[value=1](), scope: TracedModule
%7 : Double(3, 7) = aten::add(%4, %5, %6), scope: TracedModule
return (%7);
}
======================================================================
FAIL: test_index_put_trace_with_view (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 7045, in test_index_put_trace_with_view
self.assertExpectedGraph(test_index_put.graph)
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(100)\n %1 : Long(4)\n [342 chars]n}\n' != 'graph(%target : Double(100)\n %indices.1 : [384 chars]n}\n'
- graph(%0 : Double(100)
? ^
+ graph(%target : Double(100)
? ^^^^^^
- %1 : Long(4)
+ %indices.1 : Long(4)
? ++++++++
- %2 : Double(1, 1, 1, 4)) {
? ^
+ %rhs : Double(1, 1, 1, 4)) {
? ^^^
%3 : int = prim::Constant[value=4]()
%4 : int[] = prim::ListConstruct(%3)
- %5 : Double(4) = aten::view(%2, %4)
? ^
+ %5 : Double(4) = aten::view(%rhs, %4)
? ^^^
%6 : bool = prim::Constant[value=0]()
- %7 : Long(4) = aten::_cast_Long(%1, %6)
? ^
+ %indices : Long(4) = aten::_cast_Long(%indices.1, %6)
? ^^^^^^^ ++++++++
- %8 : Dynamic[] = prim::ListConstruct(%7)
? ^
+ %8 : Dynamic[] = prim::ListConstruct(%indices)
? ^^^^^^^
- %9 : Double(100) = aten::index_put(%0, %8, %5)
? ^
+ %9 : Double(100) = aten::index_put(%target, %8, %5)
? ^^^^^^
return (%9);
}
======================================================================
FAIL: test_index_put_trace_without_view (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 7053, in test_index_put_trace_without_view
self.assertExpectedGraph(test_index_put.graph)
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(100)\n %1 : Long(4)\n [214 chars]n}\n' != 'graph(%target : Double(100)\n %indices.1 : [256 chars]n}\n'
- graph(%0 : Double(100)
? ^
+ graph(%target : Double(100)
? ^^^^^^
- %1 : Long(4)
+ %indices.1 : Long(4)
? ++++++++
- %2 : Double(4)) {
? ^
+ %rhs : Double(4)) {
? ^^^
%3 : bool = prim::Constant[value=0]()
- %4 : Long(4) = aten::_cast_Long(%1, %3)
? ^
+ %indices : Long(4) = aten::_cast_Long(%indices.1, %3)
? ^^^^^^^ ++++++++
- %5 : Dynamic[] = prim::ListConstruct(%4)
? ^
+ %5 : Dynamic[] = prim::ListConstruct(%indices)
? ^^^^^^^
- %6 : Double(100) = aten::index_put(%0, %5, %2)
? ^ ^
+ %6 : Double(100) = aten::index_put(%target, %5, %rhs)
? ^^^^^^ ^^^
return (%6);
}
======================================================================
FAIL: test_onnx_export_shape_reshape (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 6004, in test_onnx_export_shape_reshape
self.assertExpected(s)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'Mode[148 chars]me: "0", type:Tensor dims: 1 2 3}]\n outp[515 chars]n}\n' != 'Mode[148 chars]me: "x.1", type:Tensor dims: 1 2 3}]\n ou[519 chars]n}\n'
ModelProto {
producer_name: "pytorch"
domain: ""
doc_string: ""
graph:
GraphProto {
name: "torch-jit-export"
- inputs: [{name: "0", type:Tensor dims: 1 2 3}]
? ^
+ inputs: [{name: "x.1", type:Tensor dims: 1 2 3}]
? ^^^
outputs: [{name: "4", type:Tensor dims: 5 2 3}]
initializers: []
nodes: [
Node {type: "Constant", inputs: [], outputs: [1], attributes: [{ name: 'value', type: tensor, value:TensorProto shape: [3]}]},
- Node {type: "Tile", inputs: [0,1], outputs: [2], attributes: []},
? ^
+ Node {type: "Tile", inputs: [x.1,1], outputs: [2], attributes: []},
? ^^^
Node {type: "Shape", inputs: [2], outputs: [3], attributes: []},
Node {type: "Reshape", inputs: [2,3], outputs: [4], attributes: []}
]
}
opset_import: [OperatorSetIdProto { domain: }],
}
======================================================================
FAIL: test_trace_contiguous_short_circuit (__main__.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_jit.py", line 7692, in test_trace_contiguous_short_circuit
self.assertExpectedGraph(traced.graph)
File "test/test_jit.py", line 257, in assertExpectedGraph
self.assertExpected(str(graph), *args, **kwargs)
File "/Users/jamesreed/onnx-fairseq/pytorch/test/common_utils.py", line 584, in assertExpected
self.assertMultiLineEqual(expected, s)
AssertionError: 'graph(%0 : Double(2, 3, 4)) {\n %1 : Double(2, [45 chars]n}\n' != 'graph(%x : Double(2, 3, 4)) {\n %1 : Double(2, [45 chars]n}\n'
- graph(%0 : Double(2, 3, 4)) {
? ^
+ graph(%x : Double(2, 3, 4)) {
? ^
- %1 : Double(2, 3, 4) = aten::contiguous(%0)
? ^
+ %1 : Double(2, 3, 4) = aten::contiguous(%x)
? ^
return (%1);
}
----------------------------------------------------------------------
Ran 1314 tests in 163.719s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment