Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for shape_of (0.31 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/lift_quantizable_spots_as_functions.mlir

    // CHECK: %[[CONV:.*]] = stablehlo.convolution(%arg0, %arg1)
    // CHECK: %[[SHAPE_OF_0:.*]] = shape.shape_of %[[CONV]]
    // CHECK: %[[DYNAMIC_BROADCAST_IN_DIM_0:.*]] = stablehlo.dynamic_broadcast_in_dim %arg2, %[[SHAPE_OF_0]]
    // CHECK: %[[ADD:.*]] = stablehlo.add %[[CONV]], %[[DYNAMIC_BROADCAST_IN_DIM_0]]
    // CHECK: %[[SHAPE_OF_1:.*]] = shape.shape_of %[[ADD]]
    // CHECK-DAG: %[[CONST:.*]] = stablehlo.constant dense<0.000000e+00>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/tests/legalize-tf.mlir

      // CHECK-DAG: %[[SHAPEOF:.+]] = shape.shape_of %arg0
      // CHECK-DAG: %[[CST0:.+]] = arith.constant 0
      // CHECK-DAG: %[[CST1:.+]] = arith.constant 1
      // CHECK-DAG: %[[GETEXTENT0:.+]] = tensor.extract %[[SHAPEOF]][%[[CST0]]]
      // CHECK-DAG: %[[CST1_0:.+]] = arith.constant 1
      // CHECK-DAG: %[[GETEXTENT1:.+]] = tensor.extract %[[SHAPEOF]][%[[CST1_0]]]
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 06 18:46:23 UTC 2024
    - 335.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc

          shape_before.take_back(shape_c.size()) != shape_c) {
        return failure();
      }
      ArrayRef<int64_t> shape_y2 =
          shape_before.drop_front(shape_b.size()).drop_back(shape_c.size());
    
      // No need to check %dot; dot_general verifier ensures correct shapes.
      // Extract Z from %dot.
      ArrayRef<int64_t> shape_z =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

        }
    
        rewriter.replaceOp(op, results);
        return success();
      }
    };
    
    // Canonicalize ShapeNOp to ShapeOp if there is only one operand.
    class ShapeNToShape : public OpRewritePattern<ShapeNOp> {
      using OpRewritePattern<ShapeNOp>::OpRewritePattern;
      LogicalResult matchAndRewrite(ShapeNOp op,
                                    PatternRewriter &rewriter) const override {
        if (op.getNumOperands() != 1) {
    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/tensorflow/transforms/replicate_invariant_op_hoisting.cc

        OpBuilder builder(shape_op);
        auto new_shape_op = builder.create<TF::VariableShapeOp>(
            shape_op.getLoc(), shape_op.getType(),
            replicate_op.GetReplicaOperandForBlockArgument(block_arg,
                                                           /*replica=*/0));
        shape_op.replaceAllUsesWith(new_shape_op.getOperation());
        shape_op.erase();
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc

              TF::IdentityOp,
              TF::MaxPoolOp,
              TF::PadV2Op,
              TF::RankOp,
              TF::ReshapeOp,
              TF::SelectOp,
              TF::SelectV2Op,
              TF::ShapeNOp,
              TF::ShapeOp,
              TF::SizeOp,
              TF::SqueezeOp,
              TF::TransposeOp
              // go/keep-sorted end
              // clang-format on
              >(op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

        mlir::DenseIntElementsAttr shape_attr;
        if (matchPattern(op_state.operands[1], m_Constant(&shape_attr))) {
          auto shape_ty =
              op_state.operands[1].getType().dyn_cast<RankedTensorType>();
          if (shape_ty != nullptr && shape_ty.hasRank() && shape_ty.getRank() > 1) {
            llvm::SmallVector<mlir::Attribute, 4> shape;
            int32_t dim_size = 0;
            for (const auto& dim :
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

                 << operand.getType();
        }
    
        auto shape_or = expr.GetShape();
        if (!shape_or.ok()) {
          return op_->emitRemark()
                 << "failed to get shape for expression. " << expr.HumanString();
        }
    
        tensors.emplace_back(
            device_->GetAllocator(tensorflow::AllocatorAttributes()), expr.dtype(),
            shape_or.value());
    
        tensorflow::Tensor& tensor = tensors.back();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top