You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "jikechao (via GitHub)" <gi...@apache.org> on 2023/07/28 08:30:00 UTC
[GitHub] [tvm] jikechao opened a new issue, #15430: [Bug] [Relay][Frontend][Keras] Dot operator lead to a crash when crate executor
jikechao opened a new issue, #15430:
URL: https://github.com/apache/tvm/issues/15430
A model with `Dot` operator can be loaded to TVM but crashes when creating the graph executor.
### model structure and RelayIR infor:
![image](https://github.com/apache/tvm/assets/29506758/9b21b7ee-a5a3-4125-b988-e965b7f8400c)
### Actual behavior
```
Traceback (most recent call last):
File "26_crash_Dot.py", line 25, in <module>
model = relay.build_module.create_executor("graph", mod, tvm.cpu(0), 'llvm', params).evaluate()
File "/workplace/software/tvm/tvm_/python/tvm/relay/backend/interpreter.py", line 171, in evaluate
return self._make_executor()
File "/workplace/software/tvm/tvm_/python/tvm/relay/build_module.py", line 513, in _make_executor
self.mod = InferType()(self.mod)
File "/workplace/software/tvm/tvm_/python/tvm/ir/transform.py", line 160, in __call__
return _ffi_transform_api.RunPass(self, mod)
File "/workplace/software/tvm/tvm_/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
tvm.error.DiagnosticError: Traceback (most recent call last):
7: TVMFuncCall
6: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass, tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_6>(tvm::transform::$_6, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
5: tvm::transform::Pass::operator()(tvm::IRModule) const
4: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
3: tvm::transform::ModulePassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
2: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<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*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
1: tvm::DiagnosticContext::Render()
0: _ZN3tvm7runtime6detail
File "/workplace/software/tvm/tvm_/src/ir/diagnostic.cc", line 131
DiagnosticError: one or more error diagnostics were emitted, please check diagnostic render for output.
```
### Environment
Any environment details, such as: Operating System, TVM version, etc
### Steps to reproduce
```
import tvm
import tvm.relay as relay
import numpy as np
from tensorflow import keras
from tensorflow.keras import layers, models
input_shape1 = (2, 2, 2)
input_shape2 = (2, 2, 2)
x1 = layers.Input(shape=input_shape1[1:], dtype='float32')
x2 = layers.Input(shape=input_shape2[1:], dtype='float32')
layer = keras.layers.Dot(axes=1)
layer.set_weights(layer.get_weights())
y = layer([x1, x2])
model = models.Model([x1, x2], y)
model.summary()
shape_dict = {'input_1': input_shape1, 'input_2':input_shape2}
mod, params = relay.frontend.from_keras(model,layout='NWC')
print(mod)
with tvm.transform.PassContext(opt_level=3):
model = relay.build_module.create_executor("graph", mod, tvm.cpu(0), 'llvm', params).evaluate()
```
### Triage
* frontend:keras
* needs-triage
--
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: commits-unsubscribe@tvm.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] jikechao commented on issue #15430: [Bug] [Relay][Frontend][Keras] Dot operator lead to a crash when crate executor
Posted by "jikechao (via GitHub)" <gi...@apache.org>.
jikechao commented on issue #15430:
URL: https://github.com/apache/tvm/issues/15430#issuecomment-1655272375
@Hzfengsy @vvchernov
is this a TVM bug?
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org