Serialize IR and use VCL API to do offline compilation #30732
+1,258
−460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When compiler type is MLIR, will open npu_driver_compiler lib and do compilation.
Added
npu_driver_compiler.h
with detailed type definitions for VCL handles, enums, and structs, such asvcl_compiler_handle_t
,vcl_result_t
, andvcl_device_desc_t
, to support the VCL API.Added a new
vcl_api.hpp
file to define and wrap VCL API functions, enabling dynamic symbol resolution and providing a singleton-based interface for accessing the API.Introduced
VCLCompilerImpl
class to implement compiler-related operations using the VCL API, including methods for compilation, querying, and profiling.Moved serialization methods (
serializeIOInfo
,serializeIR
, andserializeConfig
) fromDriverCompilerAdapter
to the ir_serialize.cppTickets: