Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for shape_of (0.17 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/quantization/stablehlo/tests/components/tf_to_stablehlo.mlir

    // CHECK-DAG: %[[SHAPE_OF:.*]] = shape.shape_of %[[CONV]] : tensor<?x3x2x2xf32> -> tensor<4xindex>
    // CHECK-DAG: %[[BROADCAST:.*]] = stablehlo.dynamic_broadcast_in_dim %[[CONST_0]], %[[SHAPE_OF]], dims = [3] : (tensor<2xf32>, tensor<4xindex>) -> tensor<?x3x2x2xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 08 20:05:12 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/aot/compile.cc

      absl::StatusOr<std::unique_ptr<xla::ProgramShape>> pshape_or =
          client->GetComputationShape(computation);
      if (!pshape_or.ok()) {
        return errors::Unknown("Couldn't get XLA program shape: ",
                               pshape_or.status().message());
      }
      compile_result->program_shape = pshape_or.value()->ToProto();
      xla::ProgramShapeProto* pshape = &compile_result->program_shape;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 08:28:57 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  10. 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)
Back to top