Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for set_shape (0.43 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

        }
      }
    
      ArrayRef<int64_t> shape = ranked_ty.getShape();
      SmallVector<int64_t, 4> out_shape;
      out_shape.reserve(rank - (keep_dims.getValue() ? 0 : num_reduce_dim));
      for (int64_t i = 0; i < rank; ++i) {
        if (!is_reduce_dim[i])
          out_shape.push_back(shape[i]);
        else if (keep_dims.getValue())
          out_shape.push_back(1);
      }
      return RankedTensorType::get(out_shape, element_ty);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.cc

        ArrayRef<int64_t> shape = ranked_type.getShape();
        assert(permutation.size() == shape.size());
    
        SmallVector<int64_t, 4> new_shape(permutation.size());
        for (size_t i = 0; i < permutation.size(); ++i)
          new_shape[i] = shape[permutation[i]];
    
        return RankedTensorType::get(new_shape, ranked_type.getElementType());
      }
    
      return type;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/tests/tf_to_hlo_pipeline/sccp-post-shape-inference.mlir

        %2 = "tf.PartitionedCall"(%1) {config = "", config_proto = "", executor_type = "", f = @get_shape} : (tensor<?x?xf32>) -> (tensor<?xi64>)
    
        // CHECK: return %[[RESULT]]
        func.return %2 : tensor<?xi64>
      }
    
      // CHECK-LABEL: func @get_shape
      func.func @get_shape(%arg0 : tensor<*xi64>) -> tensor<?xi64> {
        %0 = "tf.Shape"(%arg0) : (tensor<*xi64>) -> tensor<?xi64>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jul 25 02:54:34 UTC 2023
    - 1020 bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.cc

      if (auto tensor_type = dyn_cast<RankedTensorType>(input_type))
        return RankedTensorType::get(tensor_type.getShape(), elemental_type);
      if (auto tensor_type = dyn_cast<UnrankedTensorType>(input_type))
        return UnrankedTensorType::get(elemental_type);
      if (auto vector_type = dyn_cast<VectorType>(input_type))
        return VectorType::get(vector_type.getShape(), elemental_type);
    
      // If the expressed types match, just use the new elemental type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/ir/tfl_canonicalize.td

    def GetSqueezedPermutation: NativeCodeCall<"GetSqueezedPermutation($0, $1)">;
    
    // Check to see if the tensor dimensions can be Squeezed by eliminating 1s'
    def CanSqueezeTensor : Constraint<CPred<
      "GetShape($0).getNumElements() > GetSqueezedShape($0).getNumElements()">>;
    
    
    // Pattern to convert TFL_TransposeOp with rank>6 to rank<=6 if there are
    // redundant dimensions in the tensor. For example- [2x1x3] == [2x3] and 1 is
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 13 20:41:03 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/legacy_reshape.json

          "outputs": [1],
          "operators": [
            {
              "inputs": [ 0 ],
              "outputs": [ 1 ],
              "builtin_options_type": "ReshapeOptions",
              "builtin_options": {
                "new_shape": [ 2, 2 ]
              }
            }
          ]
        }
      ],
      "buffers": []
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 986 bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/batchmatmul_to_einsum.cc

        auto rhs_type = mlir::dyn_cast<RankedTensorType>(input_rhs.getType());
    
        if (!lhs_type || !rhs_type) return failure();
    
        auto lhs_shape = lhs_type.getShape();
        auto rhs_shape = rhs_type.getShape();
    
        // Ensure that input ranks are at least 2.
        const int dims_a = lhs_shape.size();
        const int dims_b = rhs_shape.size();
        if (dims_a < 2 || dims_b < 2) {
          return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/fold_broadcast.cc

        // Get the unbroadcasted shapes in the operand order.
        std::array<llvm::ArrayRef<int64_t>, 2> operand_shapes;
        operand_shapes[i] = broadcast_arg_type.getShape();
        operand_shapes[1 - i] = argument_type.getShape();
    
        // Check that the input of the broadcast and the other operand is broadcast
        // compatible.
        llvm::SmallVector<int64_t, 4> broadcasted_shape;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/utils.td

    def CreateNoneValue : NativeCodeCall<
      "$_builder.create<TFL::NoValueOp>($0.getLoc(), $_builder.getUnitAttr())">;
    
    // Returns shape of a ranked tensor.
    // if called without a ranked tensor it will fail.
    def GetShape: NativeCodeCall<"GetShape($0)">;
    
    // Constraint that values in list attribute are all ones.
    def IsAllOnesConstant : Constraint<CPred<"TFL::IsAllOnesConstant($0)">>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils_test.cc

      ShapedType packed_shape_type =
          mlir::dyn_cast<ShapedType>(packed_value.getType());
      llvm::SmallVector<int64_t> packed_shape(packed_shape_type.getShape().begin(),
                                              packed_shape_type.getShape().end());
      EXPECT_THAT(packed_shape, testing::ElementsAreArray(expected_packed_shape));
      llvm::SmallVector<int8_t> packed_value_vector(
          packed_value_attr.getValues<int8_t>());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top