ONE runtime has many ways to use specific backend during inference
- Multiple backends can be set and they must be separated by a semicolon (ex: "acl_cl;cpu").
- For each backend string,
libbackend_{backend}.so
will be dynamically loaded during nnfw_prepare. - Among the multiple backends, the 1st element is used as the default backend.
- Same as
nnfw_set_available_backends
- Example
BACKENDS=cpu ./Product/out/bin/onert_run ...
- Set backend for specific operator type
- Example
- Execute
Conv2D
operator on ruy backend and others on cpu backend
- Execute
OP_BACKEND_Conv2D=ruy BACKENDS="cpu;ruy" ./Product/out/bin/onert_run ...
- Set backend for specific operator by its index
- Format :
<op_id>=<backend>;<op_id>=<backend>...
- Example
- Execute
operator 10
onacl_cl
backend and others onacl_neon
backend
- Execute
OP_BACKEND_MAP="10=acl_cl" BACKENDS="acl_neon;acl_cl" ./Product/out/bin/onert_run ...