tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-tvm] zhiics opened a new pull request #5770: [BYOC][runtime] Separate code and metadata for CSourceModule
Date Wed, 10 Jun 2020 23:45:47 GMT

zhiics opened a new pull request #5770:

   This PR attempts to separate metadata initialization and source code compilation (when
necessary). The discussion can be found here:
   The goal is to have a standalone wrapper (`ModuleInitWrapper`) to take care of module initialization
for different runtimes. In the BYOC case, we save constants and code separately. The constant
would be loaded by the wrapper while the code is handled by csourcemodule. The end-to-end
flow of using a BYOC example would be like the following:
   # the pipeline for annotation and partitioning is the same.
   # Given an already partitioned IRModule, mod
   graph, lib, params =, target="llvm", params=params)
   # new_lib contains the host lib, source_metadata_mods contains a list of modules that wraps
   # csource or (json for execution engine when needed) and metadata
   new_lib, source_metadata_mods = lib.unwrap_modules()
   if source_metadata_mods:
       ext_mod =[0])
       init_mod = runtime.ModuleInitWrapper(metadata)

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message