Antares IR translate functions affect building graph with generic_operators even though current compilation does not enable kernel tuning.
For example, condition check in translate_v2 of the GatherV2 op will block building graph when compiling the control-flow benchmark model.
[INFO] 2021-07-20T06:28:29z src/nnfusion/frontend/onnx_import/util/graph_convert.cpp 413 convert node: Gather:inputs_0-@tmp_54=>inp_2
[ERROR] 2021-07-20T06:28:29z src/nnfusion/util/errors.hpp 169 Check failed: 'ng_op->is_constant()' at src/nnfusion/core/operators/generic_op/generic_op_define/GatherV2.cpp:89:
The GatherV2 scalar mode only support "indices" as Constant
terminate called after throwing an instance of 'nnfusion::errors::CheckError'
what(): Check failed: 'ng_op->is_constant()' at src/nnfusion/core/operators/generic_op/generic_op_define/GatherV2.cpp:89:
The GatherV2 scalar mode only support "indices" as Constant
Aborted (core dumped)
The GNN model meets the same problem: the translate_v2 function of the Convolution op does not support Conv1D, leading to check failure in building graph.
This problem is due to constructing m_expression in the GenericOp::validate_and_infer_types function.
🐛 Bug
Antares IR translate functions affect building graph with generic_operators even though current compilation does not enable kernel tuning.
For example, condition check in translate_v2 of the GatherV2 op will block building graph when compiling the control-flow benchmark model.
The GNN model meets the same problem: the translate_v2 function of the Convolution op does not support Conv1D, leading to check failure in building graph.
This problem is due to constructing m_expression in the GenericOp::validate_and_infer_types function.
Expected behavior
Execute Antares IR translate functions only when enabling kernel tuning.
Additional context
I think #190 could be a solution.