
Contents
More
Converts a function into an executable functionbased on a backend. The new function is convertedto onnx on the first call.
f – function to convert
tensor_class – wrapper around a class defining the backend,if None, it defaults toonnx.reference.ReferenceEvaluator
target_opsets – dictionary{opset: version}
output_types – shape and type inference cannot be run beforethe onnx graph is created and type is needed to do such,if not specified, the class assumes there is only one outputof the same type as the input
bypass_eager – this parameter must be true if the functionhas not annotation and is not decorated byxapi_inline orxapi_function
ir_version – defines the IR version to use
Converts a function into an executable functionbased on a backend. The new function is convertedto onnx on the first call.
f – function to convert
tensor_class – wrapper around a class defining the backend,if None, it defaults toonnx.reference.ReferenceEvaluator
target_opsets – dictionary{opset: version}
output_types – shape and type inference cannot be run beforethe onnx graph is created and type is needed to do such,if not specified, the class assumes there is only one outputof the same type as the input
ir_version – defines the IR version to use
Returns the key used to distinguish between every jitted version.
Wraps input fromself.tensor_class to python types.
results – python inputs (including numpy)
wrapped inputs
Wraps input intoself.tensor_class.
inputs – python inputs (including numpy)
wrapped inputs
Returns the jitted function associated to one key.If key is None, the assumes there is only one available jitted functionand it returns it.
Logs a status.
The method builds a key which identifies the signature(input types + parameters value).It then checks if the function was already converted into ONNXfrom a previous. If not, it converts it and caches the resultsindexed by the previous key. Finally, it executes the onnx graphand returns the result or the results in a tuple if there are several.
Builds a key based on the input types and parameters.Every set of inputs or parameters producing the samekey (or signature) must use the same compiled ONNX.
values – values given to the function
kwargs – parameters
tuple of mutable keys
Mandatory parameters not usually not named. Some inputs mustbe moved to the parameter list before calling ONNX.
values – list of inputs
kwargs – dictionary of arguments
new values, new arguments
Returns the number of jitted functions.There is one per type and number of dimensions.
Converts a function into an executable functionbased on a backend. The new function is convertedto onnx on the first call.
f – function to convert
tensor_class – wrapper around a class defining the backend,if None, it defaults toonnx.reference.ReferenceEvaluator
target_opsets – dictionary{opset: version}
output_types – shape and type inference cannot be run beforethe onnx graph is created and type is needed to do such,if not specified, the class assumes there is only one outputof the same type as the input
ir_version – defines the IR version to use