Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 178 for getDefiningOp (1.59 sec)

  1. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc

      op->replaceAllUsesWith(flex_op);
      op->erase();
      return true;
    }
    
    // Sets the "no_fallback" attribute.
    Value SetNoFallbackAttr(PatternRewriter &rewriter, Value val) {
      val.getDefiningOp()->setAttr(kNoFallbackAttr, rewriter.getUnitAttr());
      return val;
    }
    
    // Returns true if the attr is a float attribute and be equal to value.
    static bool FloatValueEquals(const Attribute &attr, double value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

    }
    
    Attribute GetQuantizationAxis(PatternRewriter& rewriter, Operation* op,
                                  const int operand_index) {
      auto* defining_op = op->getOperand(operand_index).getDefiningOp();
      for (auto attr : kQuantizationAxisAttrs) {
        if (defining_op->hasAttr(attr)) {
          return defining_op->getAttr(attr);
        }
      }
      // Not found.
      return rewriter.getI64IntegerAttr(-1);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc

              func_metadata.inputs.push_back(value);
              func_metadata.input_devices.push_back(value_device);
            }
            continue;
          }
    
          Operation *defining_op = value.getDefiningOp();
          std::string defining_op_host = GetHost(defining_op);
          FunctionMetadata &defining_func_metadata = metadatas[defining_op_host];
    
          if (StringAttr attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

      auto slice_op =
          dyn_cast_or_null<StridedSliceOp>(getValues()[0].getDefiningOp());
      if (!slice_op) return {};
    
      // Input to the slice op is defined by shape operation.
      auto shape_op =
          dyn_cast_or_null<ShapeOp>(slice_op.getInput().getDefiningOp());
      if (!shape_op) return {};
    
      // Input tensor, which shape is reconstructed by the pack operation.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/duplicate_shape_determining_constants.cc

        OpOperand* curr_operand = duplication_targets[target_idx];
        target_idx++;
    
        Operation* owning_op = curr_operand->getOwner();
        Operation* defining_op = curr_operand->get().getDefiningOp();
    
        if (llvm::isa_and_nonnull<TF::ConstOp>(defining_op)) {
          // No need to clone if this is the only use.
          if (defining_op->hasOneUse()) {
            LLVM_DEBUG(llvm::dbgs()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

      auto* defining_op = operand.getDefiningOp();
      if (!llvm::dyn_cast_or_null<TF::BroadcastToOp>(defining_op) &&
          !llvm::dyn_cast_or_null<TFL::BroadcastToOp>(defining_op)) {
        return nullptr;
      }
    
      Value broadcast_shape = defining_op->getOperand(
          1);  // Broadcasted shape operand of BroadcastTo op.
      Operation* parent_of_defining_op = broadcast_shape.getDefiningOp();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

      "TFL::IsLastDimEqualToNumElements($0.getType(), $1.getType())">>;
    
    def IsDefinedByFullyConnectedOp : Constraint<CPred<
      "$0.getDefiningOp<TFL::FullyConnectedOp>() != nullptr">>;
    
    def IsDefinedByConv2DOp : Constraint<CPred<
      "$0.getDefiningOp<TFL::Conv2DOp>() != nullptr">>;
    
    // Returns true if the supplied value-
    // 1) Has only one use or
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

            return true;
          }
    
          for (int qi : quantizable_indices) {
            auto const_op = llvm::dyn_cast_or_null<arith::ConstantOp>(
                op->getOperand(qi).getDefiningOp());
            if (!const_op) {
              continue;
            }
    
            DenseFPElementsAttr attr;
            if (!matchPattern(const_op->getResult(0), m_Constant(&attr))) {
              continue;
            }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

      // None type is allowed to represent unspecified operands.
      if (mlir::isa<NoneType>(value.getType())) return true;
    
      auto type = mlir::dyn_cast<TensorType>(value.getType());
      if (!type) {
        if (auto op = value.getDefiningOp()) {
          error_handler.emitError()
              << '\'' << op << "' should produce value of tensor type instead of "
              << value.getType();
          return false;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (2)
  10. tensorflow/compiler/mlir/lite/experimental/tac/transforms/pick_subgraphs.cc

    };
    
    // If the output is produced by a callop, will return the callop, otherwise,
    // will return nullptr.
    inline func::CallOp GetProducerCallOpOrNull(Value output) {
      Operation* output_op = output.getDefiningOp();
      if (output_op != nullptr && llvm::isa<func::CallOp>(output_op)) {
        return llvm::cast<func::CallOp>(output_op);
      }
      return nullptr;
    }
    
    class PickSubgraphsPass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 24 15:10:02 UTC 2022
    - 19.7K bytes
    - Viewed (0)
Back to top