tvm
|
Functions | |
Pass | 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... | |
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.