Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for set_shape (0.16 sec)

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

        if (!input_ty.hasRank() || input_ty.getRank() != 4) {
          return failure();
        }
    
        int64_t batch_cst = input_ty.getShape()[0];
        int64_t channels_cst = input_ty.getShape()[3];
    
        int64_t in_y_cst = input_ty.getShape()[1];
        int64_t in_x_cst = input_ty.getShape()[2];
        int64_t in_spatial_cst =
            in_y_cst < 0 || in_x_cst < 0 ? -1 : in_y_cst * in_x_cst;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

              "$0.getType().cast<ShapedType>().getShape() =="
              "$1.getType().cast<ShapedType>().getShape()">,
        "have the same static shape">;
    
    def IsPermutationNCHW : Constraint<CPred<"IsPermutationNCHW($0)">>;
    
    def IsBiasShape : Constraint<
        CPred<"$0.getType().cast<ShapedType>().getRank() == 4 && "
              "$0.getType().cast<ShapedType>().getShape()[2] == 1 && "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

        auto new_shape_const_attr =
            DenseElementsAttr::get(shape_spec_type, new_shape.getShape());
        rewriter.setInsertionPointAfter(weight_op);
        auto new_shape_const = rewriter.create<TF::ConstOp>(
            weight_op->getLoc(), shape_spec_type, new_shape_const_attr);
        auto reshape_op = rewriter.create<TF::ReshapeOp>(
            weight_op->getLoc(), new_shape, weight_op->getResult(0),
            new_shape_const);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

      Type dtype = getElementTypeOrSelf(type);
      if (RankedTensorType ty = type.dyn_cast<RankedTensorType>()) {
        llvm::SmallVector<int64_t, 4> shape = {dim};
        shape.append(ty.getShape().begin(), ty.getShape().end());
        return tensorflow::GetTypeFromTFTensorShape(shape, dtype);
      }
      return type;
    }
    
    Type GetTensorTypeForTensorList(Type element_type, TF::VariantType handle_dtype,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        if (!input_type) {
          return failure();
        }
        const ArrayRef<int64_t> input_shape = input_type.getShape();
    
        const int input_size = input_shape.size();
    
        RankedTensorType begin_type = mlir::cast<RankedTensorType>(begin.getType());
        const ArrayRef<int64_t> begin_shape = begin_type.getShape();
        const int begin_dim = begin_shape.size();
    
        if (begin_dim != 1) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

          // required by the new converter, from the reshape op's option.
          auto new_shape = op.builtin_options.AsReshapeOptions()->new_shape;
          auto shape_type = tensorflow::GetTypeFromTFTensorShape(
              {static_cast<int64_t>(new_shape.size())}, builder.getIntegerType(32));
    
          mlir::SmallVector<mlir::Attribute, 4> shape;
          for (auto s : new_shape) {
            shape.push_back(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

      }
      llvm::SmallVector<int64_t, 4> shape;
      shape.push_back(split_size);
      for (int i = 1; i < in_shape.size(); ++i) {
        shape.push_back(in_shape[i]);
      }
      shard_type = RankedTensorType::Builder(ranked_type).setShape(shape);
      return mlir::success();
    }
    
    // Output `sharding`, which is the sharding of `val`. `context_op` is used for
    // error reporting, in case of errors.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types/type.go

    func (t *Type) SetDeferwidth(b bool) { t.flags.set(typeDeferwidth, b) }
    func (t *Type) SetRecur(b bool)      { t.flags.set(typeRecur, b) }
    
    // Should always do SetHasShape(true) when doing SetIsShape(true).
    func (t *Type) SetIsShape(b bool)  { t.flags.set(typeIsShape, b) }
    func (t *Type) SetHasShape(b bool) { t.flags.set(typeHasShape, b) }
    
    // Kind returns the kind of type t.
    func (t *Type) Kind() Kind { return t.kind }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/python/tfr_gen.py

            print('TODO: use "node_type"')
          if node.attr == 'shape' and tensor_type == TFRTypes.TENSOR:
            ssa_value = self._ssa_name('shape')
            self._emit_with_loc(
                '\n{} = tfr.get_shape {} -> !shape.shape'.format(ssa_value, value),
                node)
            return (ssa_value, TFRTypes.SHAPE)
    
        if isinstance(node.value, ast.Attribute):
          if isinstance(node.value.value, ast.Name):
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 27 15:27:03 UTC 2022
    - 55.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

        auto output_uniform_quantized_tensor_type = RankedTensorType::getChecked(
            rewriter.getUnknownLoc(),
            /*shape=*/
            mlir::cast<TensorType>(conv_output_value.getType()).getShape(),
            output_uniform_quantized_type);
    
        SmallVector<Type> new_conv_output_types = {
            output_uniform_quantized_tensor_type};
        auto new_conv_op_with_output_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
Back to top