Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 101 for constop (0.3 sec)

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

    // Returns a TF Constant tensor with the passed in values.
    TF::ConstOp GetI64ConstantTensor(PatternRewriter &rewriter,
                                     ArrayRef<int64_t> values, Location location) {
      auto cst_attr = rewriter.getI64TensorAttr(values);
      return rewriter.create<TF::ConstOp>(location, cst_attr.getType(), cst_attr);
    }
    
    // Rewrites broadcast->reshape to a reshape->broadcast that reduces
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          auto conv_result = rewriter.create<mhlo::ConvolutionOp>(
              conv_op.getLoc(), new_output_type, sliced_input, sliced_kernel,
              conv_op.getWindowStridesAttr(), conv_op.getPaddingAttr(),
              conv_op.getLhsDilationAttr(), conv_op.getRhsDilationAttr(),
              conv_op.getWindowReversalAttr(), conv_op.getDimensionNumbers(), 1, 1,
              conv_op.getPrecisionConfigAttr());
    
          conv_results.push_back(conv_result);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

      if (!type) return -1;
      auto indices_op = indices.getDefiningOp();
      if (!indices_op) return -1;
      auto const_op = llvm::dyn_cast<TF::ConstOp>(indices_op);
      if (!const_op) return -1;
      int64_t last_index = -1;
      int64_t first_index = -1;
      for (const auto& ind : const_op.getValue().getValues<APInt>()) {
        if (last_index == -1) {
          last_index = ind.getSExtValue();
          first_index = last_index;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

        TFL::Conv2DOp conv_op, PatternRewriter& rewriter) const {
      return EnsureBias(conv_op, 2, rewriter);
    }
    
    // ================== slice ============================
    
    // If a slice op has < 4d dimension, will pad it to 4d.
    LogicalResult PadSlice::matchAndRewrite(TFL::SliceOp slice_op,
                                            PatternRewriter& rewriter) const {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_asset_sinking_pass.cc

            RankedTensorType type = RankedTensorType::get(
                {}, TF::StringType::get(builder.getContext()));
            auto const_op = builder.create<TF::ConstOp>(
                builder.getUnknownLoc(),
                DenseStringElementsAttr::get(type, {filename}));
    
            it = const_ops.insert({asset.getSymName(), const_op}).first;
          }
    
          argument.replaceAllUsesWith(it->second.getOutput());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfrt/ir/mlrt/tf_mlrt_ops.td

      }];
    
      let arguments = (ins
        StrAttr:$node_def,
        I32Attr:$op_key
      );
    
      let assemblyFormat = "attr-dict";
    }
    
    def ConstOp: TensorflowMlrt_Op<"constop", []> {
      let summary = "The tf_mlrt ConstOp";
    
      let description = [{
        The ConstOp creates a constant tensorflow::Tensor from serialized proto.
      }];
    
      let arguments = (ins
        StrAttr:$tensor_proto
      );
    
      let results = (outs
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 20:44:15 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

    // PadOp and CastOp.
    std::optional<BlockArgumentInfo> GetInputBlockArgNum(Value input) {
      auto block_arg_num = GetBlockArgNum(input);
      if (block_arg_num.has_value()) return block_arg_num;
    
      Value next_input = input;
      auto pad_op = dyn_cast_or_null<TF::PadOp>(next_input.getDefiningOp());
      auto cast_op = dyn_cast_or_null<TF::CastOp>(next_input.getDefiningOp());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/execution_metadata_exporter.cc

    namespace tflite {
    namespace {
    
    bool IsConst(mlir::Operation* op) {
      return llvm::isa<mlir::arith::ConstantOp, mlir::TF::ConstOp,
                       mlir::TFL::ConstOp, mlir::TFL::QConstOp>(op);
    }
    
    bool IsOpSupported(mlir::Operation* op, const std::string& hardware) {
      auto* devce_hardware = mlir::TFL::tac::GetTargetHardware(hardware);
      if (devce_hardware == nullptr) return {};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 06:11:34 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/common/utils.h

    namespace TFL {
    namespace tac {
    
    // Returns true if 'op' is non const op. Returns false otherwise or if
    // 'op' is null.
    inline bool IsNonConstOp(Operation* op) {
      if (!op) return false;
      if (llvm::isa<arith::ConstantOp, mlir::func::ConstantOp>(op)) return false;
      if (op->hasTrait<OpTrait::ConstantLike>()) return false;
      if (llvm::isa<TFL::ConstOp, TFL::QConstOp>(op)) return false;
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc

      } else {
        // Convert I64 const array to I32.
        llvm::SmallVector<int32_t> const_i32_vec;
        for (auto element : const_value) {
          const_i32_vec.push_back(static_cast<int32_t>(element));
        }
        const_value_raw = rewriter.getI32TensorAttr(const_i32_vec);
      }
      Value result_const = builder.create<TF::ConstOp>(const_value_raw);
      return result_const;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
Back to top