Skip to content

[onert] batchmatmul does not allow constant for lhs #16064

Description

@glistening

I got error during running decode.circle which is a part of tinyllama.

I got the error:

$ ./Product/x86_64-linux.debug/out/bin/onert_run tinyllama/decode/decode.circle 
Model Filename tinyllama/decode/decode.circle
Fail to load model: OperationValidator failed at line 122
void OperationValidator::visit(const operation::BatchMatMul &node)
{
  ...
  // RHS can be constant, but LHS is not constant
  // If one of inputs is constant, it must be RHS
  // If two inputs are constant, BatchMatMul is optimized into constant by compiler
  OP_REQUIRES(!isConstant(lhs_index));

says onert does not allow const in lhs.


 

I generated decode.circle using TICO.
In addition, the same error occurs in other LLAMA variations (e.g. gemma, llama, ...).

We need to do:

  • Allow constant lhs in onert

OR

  • Add a pass in TICO not to generated this pattern

cc @seockho-kim

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions