Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 15 of 15 for ReplaceOpWithNewOp (0.22 sec)

  1. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

        auto newAttr = DenseElementsAttr::getFromRawBuffer(
            shaped_type, mlir::cast<DenseElementsAttr>(op.getValue()).getRawData());
        rewriter.replaceOpWithNewOp<arith::ConstantOp>(op, newAttr);
    
        return success();
      }
    };
    
    class SanitizeGatherOpOutputToI4 : public OpRewritePattern<TFL::GatherOp> {
     public:
      using OpRewritePattern<TFL::GatherOp>::OpRewritePattern;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

        // which should be removed. So the replaced PartitionedCall op should keep
        // its original arguments except for the last element.
        SmallVector<Value> args = call_op.getOperands().drop_back();
    
        rewriter.replaceOpWithNewOp<TF::PartitionedCallOp>(
            call_op, float_func.getResultTypes(), args, f_attr);
        return success();
      }
    };
    
    void ConvertTpuModelToCpuPass::runOnOperation() {
      MLIRContext* ctx = &getContext();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/ir/ConvertSimQuant.cc

        // this is a forced/hard-coded constraint.
        auto qbarrier = rewriter.create<QuantizeCastOp>(op.getLoc(), quantizedType,
                                                        op.getInputs());
        rewriter.replaceOpWithNewOp<DequantizeCastOp>(op, converter.input_type,
                                                      qbarrier.getResult());
    
        return false;
      }
    };
    
    class ConstFakeQuantRewrite
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

            mlir::cast<DenseIntOrFPElementsAttr>(input_values)
                .mapValues(FloatType::getF32(rewriter.getContext()),
                           llvm::function_ref<DequantizeFuncType>(dequantize_func));
        rewriter.replaceOpWithNewOp<TFL::ConstOp>(dequant_op, dequant_op.getType(),
                                                  dequant_values);
    
        return success();
      }
    };
    
    // If the quant op has no consumer, we will remove them.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc

                                       op.getInput(), new_reshape_shape);
        TF::ConstOp new_broadcast_shape =
            GetI64ConstantTensor(rewriter, reshape_shape, op.getLoc());
        rewriter.replaceOpWithNewOp<BroadcastToOp>(
            reshape_op, reshape_op.getOutput().getType(), new_reshape,
            new_broadcast_shape);
        return success();
      }
    };
    
    #define GEN_PASS_DEF_TENSORFLOWOPTIMIZEPASS
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top