Converter Versioning and Capability Declaration #1130
narendasan
started this conversation in
RFCs
Replies: 3 comments 2 replies
-
Can you please give examples of ops which doesn't conform to default |
Beta Was this translation helpful? Give feedback.
2 replies
-
Sister topic, support doing a dry run conversion to see if a layer can be converted without error |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TL;DR
There are many reasons to have multiple versions of a converter, as well as many reasons why a converter would not work for a specific use case. This feature adds the ability to inform the compiler of this information so that it may select the right converter or inform earlier phases that no valid converter exists.
Goal
With ongoing work such as #1128, #1009 etc. dealing with potentially supporting multiple versions of TensorRT, certain converters that have specific limitations and more it might be worth looking into including metadata about converters so that instead of running and failing converters can report incompatibilities prior to compilation.
Usecases
Proposed API:
Inspired by how evaluators have extra information associated with the definition such as valid schemas, unsupported output types, etc. (
TensorRT/core/conversion/evaluators/evaluators.h
Line 38 in 484fc90
ConverterCapabilities
struct which would include the following information:There may be a common set of settings most converters would support, i.e. all TensorRT versions, no failure cases, all data types, so converters should default to these settings unless the developer explicitly sets more restrictions.
Implications on the rest of the Codebase
Conversion Phase
There should now be an additional step in the conversion phase to cross reference the user provided and environment settings before the actual converter is called
Converter Library
Guard Registration
The converter library could prevent (with warning/debug info) that a converter is not registered because it is incompatible with the environment
Converter Overloading
One of the goals here is to avoid having a bunch of
#if
s around the codebase guarding features. As such it would be nice to be able to associate multiple converter variants to the same function schema as long as their capabilities do not collide.(as mentioned in #306) This might mean that we might want to as well supporting more than one schema with a single converter implementation instead of doing a pure 1:1 association.
Implementation Phases
Prototype - L
MVP
1.4.0
- MConverter overloading Y23Q1+ - M-L
Beta Was this translation helpful? Give feedback.
All reactions