Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 178 for getDefiningOp (0.36 sec)

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

            func_op.getRegion().getBlocks().front().getTerminator());
        if (!return_op) return failure();
        auto req_op = llvm::dyn_cast_or_null<mlir::stablehlo::UniformQuantizeOp>(
            return_op.getOperands()[0].getDefiningOp());
        if (!req_op) return failure();
    
        // Create a new func.call op with f32 output.
        auto new_call_op = call_op.clone();
        new_call_op->getResult(0).setType(
    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/common/ir/QuantOps.cc

          >();
    }
    
    OpFoldResult StorageCastOp::fold(FoldAdaptor) {
      // Matches x -> [scast -> scast] -> y, replacing the second scast with the
      // value of x if the casts invert each other.
      auto srcScastOp = getArg().getDefiningOp<StorageCastOp>();
      if (!srcScastOp || srcScastOp.getArg().getType() != getType())
        return OpFoldResult();
      return srcScastOp.getArg();
    }
    
    /// The quantization specification should match the expressed type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc

          >();
    }
    
    OpFoldResult StorageCastOp::fold(FoldAdaptor) {
      // Matches x -> [scast -> scast] -> y, replacing the second scast with the
      // value of x if the casts invert each other.
      auto srcScastOp = getArg().getDefiningOp<StorageCastOp>();
      if (!srcScastOp || srcScastOp.getArg().getType() != getType())
        return OpFoldResult();
      return srcScastOp.getArg();
    }
    
    /// The quantization specification should match the expressed type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

              return write.getValue().getType();
            } else if (auto split =
                           llvm::dyn_cast<TF::TensorArraySplitV3Op>(user)) {
              if (!split.getLengths().getDefiningOp() ||
                  !llvm::isa<TF::ConstOp>(split.getLengths().getDefiningOp())) {
                return std::nullopt;
              }
              RankedTensorType t;
              int64_t count;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

          if (matchPattern(quantize_operand, m_Constant(&attr))) {
            // Const-> QuantizeOp pattern will be handled separately.
            return failure();
          }
          if (Operation* quantizing_op = quantize_operand.getDefiningOp()) {
            quantizing_ops.push_back(quantizing_op);
          }
        }
    
        tensorflow::DataType inference_type =
            quant_params_.quant_spec.inference_type;
        bool weight_only_quantization =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

                                        Value max_size, Operation* op,
                                        Type element_dtype, OpBuilder builder,
                                        Value* buffer) {
      auto max_count_op = max_size.getDefiningOp();
      if (!max_count_op) return op->emitOpError("unknown max element count");
      auto max_count_const_op = llvm::dyn_cast<TF::ConstOp>(max_count_op);
      if (!max_count_const_op) return op->emitOpError("unknown max element count");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

            all_reduce.getGroupSize()
                .getDefiningOp<TF::CollectiveAssignGroupV2Op>();
    
        if (assign_group) {
          // Found a group assignment. Use replica_groups to represent group
          // assignment.
    
          if (assign_group != all_reduce.getGroupKey()
                                  .getDefiningOp<TF::CollectiveAssignGroupV2Op>()) {
            return all_reduce->emitOpError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import.cc

            op.getValueIndex() != kTextFileIndex_LineNumber) {
          return failure();
        }
    
        // Try to find filename from constant op.
        DenseStringElementsAttr filename_attr;
        if (!matchPattern(op.getFilename().getDefiningOp(),
                          m_Constant(&filename_attr))) {
          return failure();
        }
    
        if (filename_attr.getRawStringData().size() != 1) {
          return failure();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/utils.td

    // of our files will have access to `OpHasSameStaticShapes` when including files
    // generated from table-gen.
    def OpHasSameStaticShapesPred : CPred<"OpHasSameStaticShapes($0.getDefiningOp())">;
    def OpHasSameStaticShapes : Constraint<OpHasSameStaticShapesPred, "op must have static same input shapes">;
    def OpHasNotSameStaticShapes : Constraint<Neg<OpHasSameStaticShapesPred>, "op must have not static same input shapes">;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

        Operation* arg_op = arg.getDefiningOp();
        return arg_op && arg_op->getName() == first_arg_op->getName();
      });
      if (!args_same_op) return failure();
    
      // Collect unary operations operands.
      auto unary_operands = llvm::map_range(op.getValues(), [](Value arg) -> Value {
        return arg.getDefiningOp()->getOperand(0);
      });
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
Back to top