tvm
Namespaces | Functions
transform.h File Reference
#include <tvm/relay/transform.h>
#include <tvm/runtime/c_runtime_api.h>
Include dependency graph for transform.h:

Go to the source code of this file.

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 
 tvm::relay
 Relay: a high level functional IR for TVM.
 
 tvm::relay::qnn
 
 tvm::relay::qnn::transform
 

Functions

Pass tvm::relay::qnn::transform::Legalize ()
 Legalizes a QNN expr. Contains specifically two types of Legalizations. First, converts/Lowers an expression containing QNN ops to an expression containing only core Relay ops. Each QNN op is lowered to a sequence of exisiting Relay ops. This is a target-independent pass. One can register the lowering/transformation function for this op using FTVMQnnCanonicalize attr_name for FTVMLegalize op attribute. Second, as opposed to Relay Legalize, this one legalizes only QNN ops. One can register a transformation/legalization function for an op by using the FTVMQnnLegalize attr_name for FTVMLegalize op attribute. The isolation of QNN and Relay Legalize gives us separation of concerns, leading to a better software practice. The legalization can be configured to happen per target. More...
 

Detailed Description

This file implements a pass manager for QNN ops using Relay Pass manager.