For the AdaptiveMaxPool1d. if the attribute return_indices was set to True, (e.g., AdaptiveMaxPool1d(2,return_indices=True)), when loading it to RelayIR, TVM will crash and throw: AttributeError: 'NoneType' object has no attribute 'dtype'
Actual behavior
Traceback (most recent call last):
File "7_crash_none_type.py", line 11, in <module>
mod, params = relay.frontend.from_pytorch(trace, input_shapes)
File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/pytorch.py", line 4969, in from_pytorch
outputs = converter.convert_operators(operator_nodes, outputs, ret_name)
File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/pytorch.py", line 4256, in convert_operators
return [_wrap_const(outputs[ret_name]) for ret_name in ret_names]
File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/pytorch.py", line 4256, in <listcomp>
return [_wrap_const(outputs[ret_name]) for ret_name in ret_names]
File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/pytorch.py", line 4403, in _wrap_const
return _expr.const(c)
File "/workplace/software/tvm/tvm/python/tvm/relay/expr.py", line 677, in const
value.dtype, None
AttributeError: 'NoneType' object has no attribute 'dtype'
For the AdaptiveMaxPool1d. if the attribute
return_indices
was set toTrue
, (e.g.,AdaptiveMaxPool1d(2,return_indices=True)
), when loading it to RelayIR, TVM will crash and throw: AttributeError: 'NoneType' object has no attribute 'dtype'Actual behavior
Steps to reproduce
Triage
cc @shingjan