Giter Club home page Giter Club logo

Comments (3)

utkusaglm avatar utkusaglm commented on July 22, 2024 2

Thanks a lot for your quick reply to this issue and for the recommended solutions. @SS-JIA, the issue was related to eval mode. After I set the model to evaluation mode, it worked.

from executorch.

SS-JIA avatar SS-JIA commented on July 22, 2024 1

I would recommend to try disabling IR validity checking via EdgeCompileConfig. This should cause the check that is producing that error to be skipped.

One example of how to disable validity checking is:

# Assume that eager_model and sample_inputs have been defined above

exported_program = export(eager_model, sample_inputs)

edge_program = to_edge(
    exported_program,
    compile_config=exir.EdgeCompileConfig(_check_ir_validity=False, _use_edge_ops = False),
).transform(propagate_dynamic_shape())

Please try it out and see if it works!

from executorch.

SS-JIA avatar SS-JIA commented on July 22, 2024 1

However, even if you skip the check it's likely that your model may not be able to execute because non ATen canonical operators are not currently implemented in ExecuTorch's kernel libraries. This means that to execute your model, you may need to provide an implementation for the torch._ops.aten.bernoulli operator.

I would recommend that you try to execute the model while skipping the check, and if you run into an error complaining that there is no kernel available for the aten.bernoulli operator:

  1. Please open an issue to request that a implementation of aten.bernoulli be added to the portable kernel library
  2. Alternatively, you can try to provide an implementation for the operator yourself. If you decide to go this route, let me know and I can provide some more details on how to do this.

from executorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.