Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 29 for shape_of (0.43 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

            metadata.args(operand_and_idx.index()).shape());
        if (shape.IsFullyDefined()) continue;
    
        auto shape_op = builder->create<TF::ShapeOp>(
            cluster_func.getLoc(),
            tensorflow::GetTypeFromTFTensorShape({-1}, builder->getIntegerType(64)),
            operand_and_idx.value());
        compile_op_operands.emplace_back(shape_op.getResult());
      }
    
      FlatSymbolRefAttr func_attr = cluster_func.getFuncAttr();
      func::FuncOp func =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

      auto element_type = x.getElementType();
      auto shape_x = x.getShape();
      auto shape_y = y.getShape();
    
      if (shape_x.size() == shape_y.size()) {
        llvm::SmallVector<int64_t, 4> out_shape(shape_x.size());
        for (int i = 0; i < shape_x.size(); i++) {
          auto x_val = shape_x[i];
          auto y_val = shape_y[i];
          out_shape[i] = std::max(x_val, y_val);
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

      auto element_ty = input_ty.getElementType();
      output_ty = UnrankedTensorType::get(element_ty);
    
      auto shape_ty = shape.getType().dyn_cast<RankedTensorType>();
      if (!shape_ty) return success();
      if (shape_ty.getRank() != 1)
        return error_handler(llvm::formatv(
            "requires 'shape' to be rank 1, but got {0}", shape_ty.getRank()));
    
      DenseIntElementsAttr shape_attr;
      if (!matchPattern(shape, m_Constant(&shape_attr))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

        llvm::ArrayRef<int64_t> shape_ref =
            mlir::cast<TensorType>(tensor_attr.getType()).getShape();
        if (mlir::failed(check_shape(shape_ref))) return std::nullopt;
    
        shape = std::vector<int32_t>(shape_ref.begin(), shape_ref.end());
      } else if (type.hasRank()) {
        llvm::ArrayRef<int64_t> shape_ref = type.getShape();
        if (mlir::failed(check_shape(shape_ref))) return std::nullopt;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc

          OperationName(mlir::TF::RankOp::getOperationName(), context),
          OperationName(mlir::TF::RangeOp::getOperationName(), context),
          OperationName(mlir::TF::ShapeOp::getOperationName(), context),
          OperationName(mlir::TF::ShapeNOp::getOperationName(), context),
          OperationName(mlir::TF::SizeOp::getOperationName(), context),
      };
    
      supported_ops->insert(allowlist_ops.begin(), allowlist_ops.end());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

    // returns an error.
    LogicalResult GetConstShapeValue(Value shape_value,
                                     llvm::SmallVector<int64_t, 8>* shape) {
      auto shape_op = shape_value.getDefiningOp();
      if (!shape_op) return failure();
      auto shape_const_op = llvm::dyn_cast<TF::ConstOp>(shape_op);
      if (!shape_const_op) return failure();
      for (const auto& v : shape_const_op.getValue().getValues<APInt>()) {
        int64_t dim_size = v.getSExtValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/saved_model/internal/saved_model_api_test.cc

          TF_SignatureDefParamTensorSpec(param_out);
      const TF_Shape* shape_out = TF_TensorSpecShape(tensor_spec_out);
    
      // Output "output_0" is a scalar, float32 tensor
      EXPECT_EQ("output_0", std::string(TF_SignatureDefParamName(param_out)));
      EXPECT_EQ(TF_FLOAT, TF_TensorSpecDataType(tensor_spec_out));
      EXPECT_EQ(0, TF_ShapeDims(shape_out));
    
      std::vector<TFE_TensorHandle*> compute_fn_inputs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 08:08:45 UTC 2024
    - 21.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc

          return;
        }
      }
    
      // These ops are cheap regardless of their input sizes.
      //
      // TODO(chky): Find a more scalable way to figure out cheap ops.
      if (llvm::isa<mlir::TF::ShapeOp, mlir::TF::StridedSliceOp,
                    mlir::TF::ReshapeOp, mlir::TF::ExpandDimsOp>(op)) {
        cost_map_[op] = kDefaultCheapCost;
        return;
      }
    
      // For other ops, use the sum of input sizes as its cost.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/tests/legalize-tf.mlir

      // CHECK-LABEL:select_v2_with_high_dims_dynamic_shape_both_sides
      // CHECK: %[[SHAPE_0:.*]] = "tfl.shape"(%arg0) : (tensor<8x7x6x5x?x3x2x1xf32>) -> tensor<8xi64>
      // CHECK: %[[SHAPE_1:.*]] = "tfl.shape"(%arg1) : (tensor<?x3x2x1xf32>) -> tensor<4xi64>
      // CHECK: %[[BROADCAST_ARGS_0:.*]] = "tfl.broadcast_args"(%[[SHAPE_0]], %[[SHAPE_1]]) : (tensor<8xi64>, tensor<4xi64>) -> tensor<8xi64>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 05 01:54:33 UTC 2024
    - 153.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          mhlo::GetDimensionSizeOp op, OpAdaptor adaptor,
          ConversionPatternRewriter& rewriter) const final {
        ImplicitLocOpBuilder builder(op.getLoc(), rewriter);
        Value shape_op = rewriter.create<TF::ShapeOp>(op.getLoc(), op.getOperand(),
                                                      rewriter.getBoolAttr(true));
        Value size =
            BuildIntArrayConstOp(builder, rewriter, llvm::SmallVector<int64_t>({1}),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
Back to top