Skip to content

Commit 61a7b79

Browse files
committed
Update on "Backend data separation test"
Add backend data separation test with demo ExecutorBackend. Note: ExecutorBackend is a wrapper around a portable PTE file. It doesn't support delegated program-data separation in the sense of tagging tensors as external and placing them into the named data store as such. Rather, this test: 1. Creates a linear PTE file with data removed, using the portable flow. 2. Packages (1) into preprocessed blob as a delegate, using ExecutorBackend. Note: this discards the PTD portion. 3. Re-create the PTD portion via export_program (portable flow again). 4. Runs the delegated ExecutorBackend linear with portable linear.ptd file. Caveat: this means that LinearModule definition in export_program and export_delegated_program must stay in sync, as we get the PTE artifact from export_delegated_program (wrapped in ExecutorBackend), and the PTD artifact from export_program. Differential Revision: [D73679733](https://our.internmc.facebook.com/intern/diff/D73679733/) [ghstack-poisoned]
2 parents 12a5be6 + bd45567 commit 61a7b79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/models/export_delegated_program.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
from executorch.exir.backend.test.backend_with_compiler_demo import (
2525
BackendWithCompilerDemo,
2626
)
27-
from executorch.exir.backend.test.demos.rpc.executor_backend_preprocess import (
28-
ExecutorBackend, # noqa: F401
27+
from executorch.exir.backend.test.demos.rpc.executor_backend_preprocess import ( # noqa: F401
28+
ExecutorBackend,
2929
)
3030
from executorch.exir.passes.external_constants_pass import (
3131
delegate_external_constants_pass,

0 commit comments

Comments
 (0)