Skip to content

Commit 12a5be6

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 b07c2d5 + 1c0b63b commit 12a5be6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/models/export_delegated_program.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
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
29+
)
2730
from executorch.exir.passes.external_constants_pass import (
2831
delegate_external_constants_pass,
2932
)

0 commit comments

Comments
 (0)