Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for setInsertionPointAfter (0.4 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/extract_tpu_copy_with_dynamic_shape_op.cc

    tf_device::LaunchOp CreateNewHostLaunchOpWithNewResult(
        tf_device::LaunchOp* old_launch_op,
        llvm::SmallVector<Value, 4>& new_launch_op_results) {
      OpBuilder builder(*old_launch_op);
    
      builder.setInsertionPointAfter(*old_launch_op);
    
      llvm::SmallVector<Type, 4> new_launch_op_results_types;
      for (Value result : new_launch_op_results)
        new_launch_op_results_types.push_back(result.getType());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.cc

      }
    
      SmallVector<Attribute> result_values;
      if (failed(TF::EvaluateOperation(op, inputs, result_values))) {
        return failure();
      }
    
      results.clear();
      builder.setInsertionPointAfter(op);
      for (const auto& result_value : result_values) {
        results.push_back(builder.create<TF::ConstOp>(op->getLoc(), result_value));
      }
      return success();
    }
    
    bool IsOperationFoldable(Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

        auto f_name = f_attr.getValue();
        func::FuncOp float_func =
            dyn_cast<func::FuncOp>(symbol_table.lookup(f_name));
        if (!float_func) {
          return failure();
        }
        rewriter.setInsertionPointAfter(call_op);
    
        // The TPUPartitionedCall has a TPUOrdinalSelectorOp for its last argument
        // which should be removed. So the replaced PartitionedCall op should keep
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

      if (!func_op->hasAttr(TF::kFromXlaCallModuleAttrName)) {
        return;
      }
    
      MLIRContext* context = call_op.getContext();
      OpBuilder builder(context);
      builder.setInsertionPointAfter(call_op);
    
      IRMapping arg_mapper;
      bool call_op_has_platform_index_arg = call_op.getPlatforms().size() > 1;
      // Add an argument for platform_index. This allows for multiple platforms.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_xla_call_module_op_to_bfloat16.cc

            op_operand.set(builder.create<TF::CastOp>(
                op->getLoc(), ToBfloat16Type(op_operand.get().getType()),
                op_operand.get()));
          }
        }
        builder.setInsertionPointAfter(op);
        for (auto op_result : op->getOpResults()) {
          if (IsLargeFloatType(op_result.getType())) {
            const Type original_type = op_result.getType();
            op_result.setType(ToBfloat16Type(original_type));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

          quant_dim = input_type.getRank() - 1;
        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h

        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

                                 Type new_user_op_type) const {
        auto op_before_dequantize = original_dequantize_op.getOperand(0);
    
        // Create a new dequantize op that is propagated.
        rewriter.setInsertionPointAfter(user_op);
        TF::PartitionedCallOp new_dequantize_op =
            cast<TF::PartitionedCallOp>(rewriter.clone(*original_dequantize_op));
    
        // Skip the original dequant op and connect the op before dequantize to the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc

          auto read_variable_op = dyn_cast_or_null<ReadVariableOp>(var_handle_user);
          if (!read_variable_op) continue;
          // Add dequantize.
          builder.setInsertionPointAfter(read_variable_op);
          auto new_read_variable_op =
              builder.create<ReadVariableOp>(read_variable_op.getLoc(), ref_qtype,
                                             read_variable_op.getResourceId());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top