Skip to content

Commit

Permalink
fix codegen tests after migration to target hooks
Browse files Browse the repository at this point in the history
Change-Id: Idcab5f71f3c5a971831b96fe8f9a5c8c73b267da
  • Loading branch information
lhutton1 committed Dec 1, 2021
1 parent 53f12dd commit 18ee95b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/python/contrib/test_ethosu/test_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,15 +593,12 @@ def create_mod_from_relay():
)

# Assumes only two runtime.Modules are created -- i.e. single offload module
imported_modules = compiled_models[0].executor_factory.lib.imported_modules
assert len(imported_modules) == 2
ethosu_module = imported_modules[0]
ethosu_module = compiled_models[0].executor_factory.lib.imported_modules[0].imported_modules[0]

# Verify generated C source
get_cs = tvm._ffi.get_global_func("runtime.module.ethos-u.getcs")
cmms = get_cs(ethosu_module)
cmms = bytes.fromhex(cmms)

get_artifacts = tvm._ffi.get_global_func("runtime.module.ethos-u.get_artifacts")
compilation_artifacts = get_artifacts(ethosu_module)
cmms = bytes.fromhex(compilation_artifacts[0].command_stream)
infra.print_payload(cmms)
infra.verify_source(compiled_models, accel_type)

Expand Down

0 comments on commit 18ee95b

Please sign in to comment.