Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for broadcastable (0.37 sec)

  1. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

        }
    
        // Check if alpha is broadcastable
        for (int i = 0; i < alpha_type.getRank(); i++) {
          if (alpha_type.getDimSize(i) != input_type.getDimSize(i + 1) &&
              alpha_type.getDimSize(i) != 1) {
            return op.emitOpError(
                llvm::formatv("'alpha' is not broadcastable at dimension {0}.", i));
          }
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize.cc

    bool IsBroadcastableElementsAttrAndType(Type a, Type b) {
      return OpTrait::util::getBroadcastedType(a, b) != Type();
    }
    
    // Returns whether the resultant type of any broadcastable operation with
    // operands `a` and `b` matches `expected_output`. Returns false if `a` is not
    // broadcast-compatible with `b`.
    bool OperandsBroadcastToOutputType(Type a, Type b, Type expected_output) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/tests/canonicalize.mlir

      %5 = "tf.AddV2"(%4, %1): (tensor<4x4xf32>, tensor<1xf32>) -> tensor<4x4xf32>
      %6 = "tf.Log"(%5): (tensor<4x4xf32>) -> tensor<4x4xf32>
    
      // This is a legal canonicalization because constant shape 4xf32 is
      // broadcastable to 4x4xf32, however we currently do not support this case,
      // and canonicalize only if the constant is a scalar.
      // CHECK: %[[ADD2:.*]] = "tf.AddV2"
      // CHECK: %[[LOG2:.*]] = "tf.Log"(%[[ADD2]])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 132.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

      // Check compatibility of batch dimensions if both input shapes are known.
      // BatchMatMul should have exactly the same batch dimensions and
      // BatchMatMulV2 should have broadcastable batch dimensions.
      //
      // The last two dimensions are non-batch dimensions that don't need to
      // participate in batch dimension compatibility check.
      if (std::is_same<OpT, BatchMatMulOp>()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

      string tflRuntimeDescription = desc;
    }
    
    class TFL_OperandsHaveSameShapesOrBroadcastableShape<
        list<int> indices, int max_bcast_rank> :
      TFL_RuntimePredOpTrait<"operands do not have the same shape or "
          "broadcastable shapes within the rank " # max_bcast_rank,
        CPred<"TFL::VerifyOperandsHaveSameShapesOrBroadcastableShape("
                "$_op, llvm::ArrayRef<unsigned>({" # !interleave(indices, ", ") #
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

    LogicalResult NotEqualOp::verify() {
      NotEqualOp op = *this;
      // If we allow inputs to have incompatible type, then nothing to do.
      if (!op.getIncompatibleShapeError()) return success();
    
      // Otherwise, check inputs are broadcastable.
      return mlir::OpTrait::impl::verifyCompatibleOperandBroadcast(
          op.getOperation());
    }
    
    void NotEqualOp::build(OpBuilder &builder, OperationState &result, Value x,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tests/legalize-tf.mlir

    // CHECK-LABEL: greater_equal
    // CHECK:  tfl.greater_equal(%arg0, %arg1) : (tensor<8x16xf32>, tensor<8x16xf32>) -> tensor<8x16xi1>
    // CHECK:  return
    }
    
    //TODO(b/136498739): Add failure test for non-broadcastable types, since currently
    // we can't catch this error.
    func.func @less_equal(%arg0: tensor<8x16xf32>, %arg1: tensor<8x16xf32>) -> tensor<8x16xi1> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 05 01:54:33 UTC 2024
    - 153.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test.py

                  'has_bias': [True, False],
                  'batch_sizes': [([], []), ([10], [10]), ([2, 3], [2, 3])],
                  'target_opset': [quant_opts_pb2.XLA],
              },
              # Test broadcastable batch sizes.
              {
                  'activation_fn': [None],
                  'has_bias': [True],
                  'batch_sizes': [
                      ([2], []),
                      ([], [2]),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 03:36:50 UTC 2024
    - 235.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/tests/ops.mlir

      %1 = "tfl.broadcast_to"(%arg2, %arg3) : (tensor<?x3x2x1xf32>, tensor<8xi64>) -> tensor<8x7x6x5x?x3x2x1xf32>
      // expected-error @+1 {{'tfl.select_v2' op failed to verify that operands do not have the same shape or broadcastable shapes within the rank 5}}
      %2 = "tfl.select_v2"(%arg0, %0, %1) : (tensor<8x7x6x5x?x3x2x1xi1>, tensor<8x7x6x5x?x3x2x1xf32>, tensor<8x7x6x5x?x3x2x1xf32>) -> tensor<8x7x6x5x?x3x2x1xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 189.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/tf-ops.mlir

      func.return %0 : tensor<4x2x!tf_type.stringref>
    }
    
    // -----
    
    // TODO(hinsu): Move this to MLIR core once the test dialect have a custom type.
    
    // Check that broadcastable trait accepts TF specific element type
    // CHECK-LABEL: func @testAdd
    func.func @testAdd(%arg0: tensor<4x2x!tf_type.string>, %arg1: tensor<2x!tf_type.string>) -> tensor<4x2x!tf_type.string> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 23 14:40:35 UTC 2023
    - 236.4K bytes
    - Viewed (0)
Back to top