Skip to content

Error when not all operations can be lowered to xnnpack delegate #1340

@mylifeasazucchini

Description

@mylifeasazucchini

Similar to the issue #1169

I have a custom pytorch model that I am trying to lower to xnnpack delegate and I do as follows:

edge = export_to_edge( model, sample_inputs, edge_compile_config=EdgeCompileConfig( _check_ir_validity=True, ), )

which works as expected however when I run:

edge = edge.to_backend(XnnpackPartitioner)

I get the error:

_RuntimeError: For aten__native_batch_norm_legit_no_training_default, call_function:aten.native_batch_norm_legit_no_training.default is not supported in XNNPACK Delegate

I understood from the argument comments here that I can overcome this unsupported delegation by passing a dict of "supported" method and it's corresponding "supported" Partitioner.

I was wondering if there was any example of doing this and what the dict would look like ? to be precise what exactly should I pass in the "method" key of the dict.

Also, for the non lowerable part of the program how or what deleagte should I pass in the dict (if any!)

Thanks (sorry if there were any naive questions here, I am just learning this as we go!)

Metadata

Metadata

Labels

module: xnnpackIssues related to xnnpack delegation and the code under backends/xnnpack/triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions