[onert] Remove frontend layout feature
What
Let's remove frontend layout feature.
Why
onert supports only NHWC model(circle, tflite) and probably will supports only NHWC model in the future. If so, the feature is meaningless.
How
- Change default layout to
ir::Layout::UNKNOWN - Remove frontend_layout from
ir::Graph. - Remove layout from
compiler::PermuteFactor. - Remove layout from
compiler::OperationLowerInfo. - Add layout to
compiler::OperandLowerInfo. - Add layout to
ir::Operandto support ops likeConv2Dthat has layout. - Delegate dealing with layouts to backends.
- Remove layout feature for each backend.
- Enable each backend to update their partial graph
Draft #12224
onert supports only NHWC model(circle, tflite) and probably will supports only NHWC model in the future
Then, will we remove data_format field in circle schema?
onert is not the only user of circle schema. Other tools (like ONE front end and/or NPU Compiler) may make use of data_format.
onert supports only NHWC model(circle, tflite)
I am not sure it is valid. We've supported some model in NHWC at least for some operators a long time ago.
@hseok-oh
Then, will we remove data_format field in circle schema?
Thanks for your information. I didn't know circle schema has data_format. I will stop this task.
@glistening
onert is not the only user of circle schema. Other tools (like ONE front end and/or NPU Compiler) may make use of data_format.
What is ONE front and NPU Compiler? onert get models from them? I didn't catch the reason why you are talking about other tools.
I am not sure it is valid. We've supported some model in NHWC at least for some operators a long time ago.
OK, I will stop this task.
@ragmani
What is ONE front and NPU Compiler? onert get models from them? I didn't catch the reason why you are talking about other tools.
It was my comment about @hseok-oh's
Then, will we remove
data_formatfield incircleschema?
What is ONE front and NPU Compiler?
CFE in this repo, and NPU_Compiler in our internal repo.
But if we don't use data_format field on compiler frontend and runtime (in other word, use NHWC only as default value), I think we can consider removing this feature from schema.
But if we don't use data_format field on compiler frontend and runtime (in other word, use NHWC only as default value),
I also felt that compiler frontend converts models(i.g. ONNX model) to circle models in NHWC when I was working on compiler frontend.
I talked with @seanshpark about this yesterday, and he also said that data_format is not used on compiler frontend and assume NHWC only.
Let's deprecate this feature.
several modules in compiler has access to data_format but doesn't seem to do valid things.
I'll check with a draft change.
Now layout is removes in frontend and backend all, and layout is used for input/output setting only.