alnah005 commented on PR #10216:
URL: https://github.com/apache/tvm/pull/10216#issuecomment-1105634235
> @alnah005 it looks like your test failed in CI. do you mind taking a look?
could you also clarify the PR title?
I ran the tests on my end after your message and all the tests in the file
are failing. I also ran the tests before my additions and they also failed.
Here's the output I got after running without my additions:
```
tests/python/relay/test_op_qnn_dense.py data types int64 and int32 do not
match in BroadcastRel
data types int64 and int32 do not match in BroadcastRel
FThe Relay type checker is unable to show the following types match.
In particular `Tensor[(3), int32]` does not match `Tensor[(3), int64]`
FThe Relay type checker is unable to show the following types match.
In particular `Tensor[(3), int32]` does not match `Tensor[(3), int64]`
FThe Relay type checker is unable to show the following types match.
In particular `Tensor[(3), int32]` does not match `Tensor[(3), int64]`
F
=================================================================================================
FAILURES
=================================================================================================
_______________________________________________________________________________________
test_qnn_dense_without_bias
________________________________________________________________________________________
def test_qnn_dense_without_bias():
with TempOpAttr("qnn.dense", "FTVMQnnLegalize", legalize_qnn_dense):
int32_output_without_bias_params =
make_int_configuration(use_bias=False)
> qnn_dense_driver(int32_output_without_bias_params)
tests/python/relay/test_op_qnn_dense.py:230:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/python/relay/test_op_qnn_dense.py:211: in qnn_dense_driver
mod = relay.qnn.transform.CanonicalizeOps()(mod)
../tvm/python/tvm/ir/transform.py:161: in __call__
return _ffi_transform_api.RunPass(self, mod)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tvm.runtime.packed_func.PackedFunc object at 0x110a38500>
args = (Run Function pass: Legalize at the optimization level 1, #[version =
"0.0.5"]
def @main(%quantized_data: Tensor[(2, 1...=int32 */, 0.5f /* ty=float32 */,
0.5f /* ty=float32 */, units=3, out_dtype="int64") /* ty=Tensor[(2, 3), int64]
*/
}
)
temp_args = [], values = <tvm._ffi._ctypes.packed_func.TVMValue_Array_2
object at 0x137ceef40>, tcodes = <tvm._ffi._ctypes.packed_func.c_int_Array_2
object at 0x137d1ca40>
def __call__(self, *args):
"""Call the function with positional arguments
args : list
The positional arguments to the function call.
"""
temp_args = []
values, tcodes, num_args = _make_tvm_args(args, temp_args)
ret_val = TVMValue()
ret_tcode = ctypes.c_int()
if (
_LIB.TVMFuncCall(
self.handle,
values,
tcodes,
ctypes.c_int(num_args),
ctypes.byref(ret_val),
ctypes.byref(ret_tcode),
)
!= 0
):
> raise get_last_ffi_error()
E tvm.error.DiagnosticError: Traceback (most recent call last):
E [bt] (8) 9 libtvm.dylib
0x000000012c36f870 tvm::transform::Pass::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 256
E [bt] (7) 8 libtvm.dylib
0x000000012d6e7c63
tvm::relay::transform::FunctionPassNode::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 2595
E [bt] (6) 7 libtvm.dylib
0x000000012c36f66e tvm::transform::Pass::operator()(tvm::IRModule) const + 158
E [bt] (5) 6 libtvm.dylib
0x000000012c36f870 tvm::transform::Pass::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 256
E [bt] (4) 5 libtvm.dylib
0x000000012c36ff13 tvm::transform::ModulePassNode::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 819
E [bt] (3) 4 libtvm.dylib
0x000000012d5551e4
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void
tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule,
tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::$_2>(tvm::relay::transform::InferType()::$_2)::'lambda'(tvm::runtime::TVMArgs
const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj
const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 1844
E [bt] (2) 3 libtvm.dylib
0x000000012c2f73eb tvm::DiagnosticContext::Render() + 459
E [bt] (1) 2 libtvm.dylib
0x000000012c02b969 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
E [bt] (0) 1 libtvm.dylib
0x000000012d8bb4b8 tvm::runtime::Backtrace() + 24
E File "/Users/suhail/tvm/src/ir/diagnostic.cc", line 105
E DiagnosticError: one or more error diagnostics were emitted,
please check diagnostic render for output.
../tvm/python/tvm/_ffi/_ctypes/packed_func.py:237: DiagnosticError
_________________________________________________________________________________________
test_qnn_dense_with_bias
_________________________________________________________________________________________
def test_qnn_dense_with_bias():
with TempOpAttr("qnn.dense", "FTVMQnnLegalize", legalize_qnn_dense):
int32_output_with_bias_params =
make_int_configuration(use_bias=True)
> qnn_dense_driver(int32_output_with_bias_params)
tests/python/relay/test_op_qnn_dense.py:237:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/python/relay/test_op_qnn_dense.py:210: in qnn_dense_driver
mod = relay.transform.InferType()(mod)
../tvm/python/tvm/ir/transform.py:161: in __call__
return _ffi_transform_api.RunPass(self, mod)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tvm.runtime.packed_func.PackedFunc object at 0x110a38500>
args = (Run Module pass: InferType at the optimization level 0, #[version =
"0.0.5"]
def @main(%quantized_data: Tensor[(2, 10...dense(%quantized_data,
%quantized_kernel, -1, -1, 0.5f, 0.5f, units=3, out_dtype="int64");
nn.bias_add(%0, %bias)
}
)
temp_args = [], values = <tvm._ffi._ctypes.packed_func.TVMValue_Array_2
object at 0x137d5b840>, tcodes = <tvm._ffi._ctypes.packed_func.c_int_Array_2
object at 0x137d5b940>
def __call__(self, *args):
"""Call the function with positional arguments
args : list
The positional arguments to the function call.
"""
temp_args = []
values, tcodes, num_args = _make_tvm_args(args, temp_args)
ret_val = TVMValue()
ret_tcode = ctypes.c_int()
if (
_LIB.TVMFuncCall(
self.handle,
values,
tcodes,
ctypes.c_int(num_args),
ctypes.byref(ret_val),
ctypes.byref(ret_tcode),
)
!= 0
):
> raise get_last_ffi_error()
E tvm.error.DiagnosticError: Traceback (most recent call last):
E [bt] (8) 9 libtvm.dylib
0x000000012d8a02ae TVMFuncCall + 62
E [bt] (7) 8 libtvm.dylib
0x000000012c378ff4
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void
tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass,
tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_6>(tvm::transform::$_6,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >)::'lambda'(tvm::runtime::TVMArgs const&,
tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*,
tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 948
E [bt] (6) 7 libtvm.dylib
0x000000012c36f66e tvm::transform::Pass::operator()(tvm::IRModule) const + 158
E [bt] (5) 6 libtvm.dylib
0x000000012c36f870 tvm::transform::Pass::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 256
E [bt] (4) 5 libtvm.dylib
0x000000012c36ff13 tvm::transform::ModulePassNode::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 819
E [bt] (3) 4 libtvm.dylib
0x000000012d5551e4
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void
tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule,
tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::$_2>(tvm::relay::transform::InferType()::$_2)::'lambda'(tvm::runtime::TVMArgs
const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj
const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 1844
E [bt] (2) 3 libtvm.dylib
0x000000012c2f73eb tvm::DiagnosticContext::Render() + 459
E [bt] (1) 2 libtvm.dylib
0x000000012c02b969 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
E [bt] (0) 1 libtvm.dylib
0x000000012d8bb4b8 tvm::runtime::Backtrace() + 24
E File "/Users/suhail/tvm/src/ir/diagnostic.cc", line 105
E DiagnosticError: one or more error diagnostics were emitted,
please check diagnostic render for output.
../tvm/python/tvm/_ffi/_ctypes/packed_func.py:237: DiagnosticError
__________________________________________________________________________________
test_qnn_dense_with_requantized_output
__________________________________________________________________________________
def test_qnn_dense_with_requantized_output():
with TempOpAttr("qnn.dense", "FTVMQnnLegalize", legalize_qnn_dense):
int8_requantized_output_with_bias_params =
make_int_configuration(
use_bias=True, requantize_output=True
)
> qnn_dense_driver(int8_requantized_output_with_bias_params)
tests/python/relay/test_op_qnn_dense.py:246:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/python/relay/test_op_qnn_dense.py:210: in qnn_dense_driver
mod = relay.transform.InferType()(mod)
../tvm/python/tvm/ir/transform.py:161: in __call__
return _ffi_transform_api.RunPass(self, mod)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tvm.runtime.packed_func.PackedFunc object at 0x110a38500>
args = (Run Module pass: InferType at the optimization level 0, #[version =
"0.0.5"]
def @main(%quantized_data: Tensor[(2, 10...nits=3, out_dtype="int64");
%1 = nn.bias_add(%0, %bias);
qnn.requantize(%1, 0.25f, 0, 1f, -1, out_dtype="int8")
}
)
temp_args = [], values = <tvm._ffi._ctypes.packed_func.TVMValue_Array_2
object at 0x137d5bec0>, tcodes = <tvm._ffi._ctypes.packed_func.c_int_Array_2
object at 0x137d607c0>
def __call__(self, *args):
"""Call the function with positional arguments
args : list
The positional arguments to the function call.
"""
temp_args = []
values, tcodes, num_args = _make_tvm_args(args, temp_args)
ret_val = TVMValue()
ret_tcode = ctypes.c_int()
if (
_LIB.TVMFuncCall(
self.handle,
values,
tcodes,
ctypes.c_int(num_args),
ctypes.byref(ret_val),
ctypes.byref(ret_tcode),
)
!= 0
):
> raise get_last_ffi_error()
E tvm.error.DiagnosticError: Traceback (most recent call last):
E [bt] (8) 9 libtvm.dylib
0x000000012d8a02ae TVMFuncCall + 62
E [bt] (7) 8 libtvm.dylib
0x000000012c378ff4
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void
tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass,
tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_6>(tvm::transform::$_6,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >)::'lambda'(tvm::runtime::TVMArgs const&,
tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*,
tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 948
E [bt] (6) 7 libtvm.dylib
0x000000012c36f66e tvm::transform::Pass::operator()(tvm::IRModule) const + 158
E [bt] (5) 6 libtvm.dylib
0x000000012c36f870 tvm::transform::Pass::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 256
E [bt] (4) 5 libtvm.dylib
0x000000012c36ff13 tvm::transform::ModulePassNode::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 819
E [bt] (3) 4 libtvm.dylib
0x000000012d5551e4
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void
tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule,
tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::$_2>(tvm::relay::transform::InferType()::$_2)::'lambda'(tvm::runtime::TVMArgs
const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj
const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 1844
E [bt] (2) 3 libtvm.dylib
0x000000012c2f73eb tvm::DiagnosticContext::Render() + 459
E [bt] (1) 2 libtvm.dylib
0x000000012c02b969 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
E [bt] (0) 1 libtvm.dylib
0x000000012d8bb4b8 tvm::runtime::Backtrace() + 24
E File "/Users/suhail/tvm/src/ir/diagnostic.cc", line 105
E DiagnosticError: one or more error diagnostics were emitted,
please check diagnostic render for output.
../tvm/python/tvm/_ffi/_ctypes/packed_func.py:237: DiagnosticError
______________________________________________________________________________________
test_per_channel_weight_scale
_______________________________________________________________________________________
def test_per_channel_weight_scale():
with TempOpAttr("qnn.dense", "FTVMQnnLegalize", legalize_qnn_dense):
config = make_int_configuration(use_bias=True,
requantize_output=True, per_channel=True)
> qnn_dense_driver(config)
tests/python/relay/test_op_qnn_dense.py:252:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/python/relay/test_op_qnn_dense.py:210: in qnn_dense_driver
mod = relay.transform.InferType()(mod)
../tvm/python/tvm/ir/transform.py:161: in __call__
return _ffi_transform_api.RunPass(self, mod)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tvm.runtime.packed_func.PackedFunc object at 0x110a38500>
args = (Run Module pass: InferType at the optimization level 0, #[version =
"0.0.5"]
def @main(%quantized_data: Tensor[(2,
10...0AAAAAAAAAAAEAAAAAAAAAAQAAAAIgAQADAAAAAAAAAAwAAAAAAAAAAACAPpqZGT7NzEw+"
],
"attrs": {"tvm_version": "0.9.dev0"}
})
temp_args = [], values = <tvm._ffi._ctypes.packed_func.TVMValue_Array_2
object at 0x137d5b040>, tcodes = <tvm._ffi._ctypes.packed_func.c_int_Array_2
object at 0x137d5b2c0>
def __call__(self, *args):
"""Call the function with positional arguments
args : list
The positional arguments to the function call.
"""
temp_args = []
values, tcodes, num_args = _make_tvm_args(args, temp_args)
ret_val = TVMValue()
ret_tcode = ctypes.c_int()
if (
_LIB.TVMFuncCall(
self.handle,
values,
tcodes,
ctypes.c_int(num_args),
ctypes.byref(ret_val),
ctypes.byref(ret_tcode),
)
!= 0
):
> raise get_last_ffi_error()
E tvm.error.DiagnosticError: Traceback (most recent call last):
E [bt] (8) 9 libtvm.dylib
0x000000012d8a02ae TVMFuncCall + 62
E [bt] (7) 8 libtvm.dylib
0x000000012c378ff4
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void
tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass,
tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_6>(tvm::transform::$_6,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >)::'lambda'(tvm::runtime::TVMArgs const&,
tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*,
tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 948
E [bt] (6) 7 libtvm.dylib
0x000000012c36f66e tvm::transform::Pass::operator()(tvm::IRModule) const + 158
E [bt] (5) 6 libtvm.dylib
0x000000012c36f870 tvm::transform::Pass::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 256
E [bt] (4) 5 libtvm.dylib
0x000000012c36ff13 tvm::transform::ModulePassNode::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const + 819
E [bt] (3) 4 libtvm.dylib
0x000000012d5551e4
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void
tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule,
tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::$_2>(tvm::relay::transform::InferType()::$_2)::'lambda'(tvm::runtime::TVMArgs
const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj
const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 1844
E [bt] (2) 3 libtvm.dylib
0x000000012c2f73eb tvm::DiagnosticContext::Render() + 459
E [bt] (1) 2 libtvm.dylib
0x000000012c02b969 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
E [bt] (0) 1 libtvm.dylib
0x000000012d8bb4b8 tvm::runtime::Backtrace() + 24
E File "/Users/suhail/tvm/src/ir/diagnostic.cc", line 105
E DiagnosticError: one or more error diagnostics were emitted,
please check diagnostic render for output.
../tvm/python/tvm/_ffi/_ctypes/packed_func.py:237: DiagnosticError
=========================================================================================
short test summary info
==========================================================================================
FAILED tests/python/relay/test_op_qnn_dense.py::test_qnn_dense_without_bias
- tvm.error.DiagnosticError: Traceback (most recent call last):
FAILED tests/python/relay/test_op_qnn_dense.py::test_qnn_dense_with_bias -
tvm.error.DiagnosticError: Traceback (most recent call last):
FAILED
tests/python/relay/test_op_qnn_dense.py::test_qnn_dense_with_requantized_output
- tvm.error.DiagnosticError: Traceback (most recent call last):
FAILED
tests/python/relay/test_op_qnn_dense.py::test_per_channel_weight_scale -
tvm.error.DiagnosticError: Traceback (most recent call last):
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]