Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 90 for func_20 (0.2 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

        SymbolTable symbol_table(call_op->getParentOfType<ModuleOp>());
        auto func_op =
            dyn_cast_or_null<func::FuncOp>(symbol_table.lookup(func_name));
        if (!func_op) return failure();
        // The quantized fusion should have requantize and return ops at the end.
        auto return_op = dyn_cast_or_null<func::ReturnOp>(
            func_op.getRegion().getBlocks().front().getTerminator());
        if (!return_op) return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

      llvm::SmallVector<Type> arg_types, result_types;
    
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        if (!ShouldIncludeInMainFunction(func_op)) continue;
    
        arg_types.append(func_op.getArgumentTypes().begin(),
                         func_op.getArgumentTypes().end());
        auto& return_op = func_op.getBody().getBlocks().front().back();
        result_types.append(return_op.getOperandTypes().begin(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

    };
    
    // Returns true iff func_op has either no Region or the body has no Blocks.
    bool IsFuncOpEmpty(func::FuncOp func_op) {
      return func_op->getNumRegions() == 0 || func_op.getBody().empty();
    }
    
    // Gets the GraphOp from the function op. Returns an empty op iff it doesn't
    // exist.
    GraphOp GetGraphOpFromFuncOp(func::FuncOp func_op) {
      if (IsFuncOpEmpty(func_op)) return {};
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_program_key.cc

    // tf_device.replicate.
    Operation* FindCompilePredecessor(Operation* func_op,
                                      Operation* preprocess_op) {
      llvm::DenseSet<Block*> blocks = GetAllBlocksBetween(preprocess_op, func_op);
    
      llvm::DenseMap<Block*, Operation*> scope;
      Operation* o = preprocess_op;
      while (o && o != func_op) {
        scope[o->getBlock()] = o;
        o = o->getParentOp();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

      Value input = func_op.getArgument(0);
      Value output_init_state = func_op.getArgument(1);
      Value hidden_init_state = func_op.getArgument(2);
      Value weight_kernel = func_op.getArgument(3);
      Value recurrent_kernel = func_op.getArgument(4);
      Value bias = func_op.getArgument(5);
    
      // The func op should have 5 outputs.
      if (func_op.getNumResults() != 5) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

      if (call_op_has_platform_index_arg) {
        arg_mapper.map(func_op.getArgument(0),
                       builder.create<mhlo::ConstantOp>(
                           func_op.getLoc(), builder.getI16IntegerAttr(0)));
      }
      for (auto [func_arg, operand] : llvm::zip_equal(
               func_op.getArguments().take_back(call_op.getNumOperands()),
               call_op.getOperands())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/remove_sharding_custom_call.cc

    };
    
    void RemoveShardingCustomCallPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
      MLIRContext& ctx = getContext();
    
      RewritePatternSet patterns(&ctx);
      populateWithGenerated(patterns);
    
      FrozenRewritePatternSet frozen_patterns(std::move(patterns));
      if (failed(applyPatternsAndFoldGreedily(func_op, frozen_patterns))) {
        func_op.emitWarning() << "Failed to converge "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 13 07:04:47 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

    };
    
    // Folds tf.IdentityOp and tf.IdentityNOp if op device and the argument devices
    // from the defining ops match.
    void TensorDeviceCopyConversionPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
    
      auto should_fold_op_func = [&func_op](const Value &arg,
                                            const StringAttr &op_device) {
        // In TFRT TPU, tensor transfer is handled specifically by D2H and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/nms_utils.cc

    void ConvertNMSPaddedFunc::RewriteFunc() {
      func_->setAttr(kTFImplements,
                     StringAttr::get(func_.getContext(), kTfNMSPadded));
      Value boxes = func_.getArgument(0);
      Value scores = func_.getArgument(1);
      Value max_output_size = func_.getArgument(2);
      Value iou_threshold = func_.getArgument(3);
      Value score_threshold = func_.getArgument(4);
      auto output_type0 = func_.getFunctionType().getResult(0);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

        // Builder builder(func_op.getContext());
        func_op->setAttr(
            kTfInputShapesAttr,
            ArrayAttr::get(func_op.getContext(), updated_input_shapes_attr));
      }
    }
    
    // Validates func ops. Returns `failure` if the function is invalid.
    LogicalResult ValidateFuncOp(func::FuncOp func_op) {
      auto input_shapes_attr =
          func_op->getAttrOfType<ArrayAttr>(kTfInputShapesAttr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
Back to top