Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 156 for RankedTensorType (0.74 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

      Builder builder(main_func_op);
    
      // Add a new argument of type `tensor<!tf_type.string>` and update the
      // function type.
      auto file_prefix_arg_type =
          RankedTensorType::get(/*shape=*/{}, builder.getType<TF::StringType>());
      BlockArgument new_file_prefix_arg =
          main_func_op.getBody().front().addArgument(
              file_prefix_arg_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

    namespace mlir {
    namespace mhlo {
    
    namespace {
    
    // Returns true if the given type is a ranked tensor type with static or bounded
    // dimensions.
    bool IsBounded(Type ty) {
      auto ranked_ty = mlir::dyn_cast<RankedTensorType>(ty);
      if (!ranked_ty) return false;
    
      if (ranked_ty.hasStaticShape()) return true;
    
      auto encoding =
          mlir::dyn_cast_or_null<TypeExtensionsAttr>(ranked_ty.getEncoding());
      if (!encoding) return false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

              module_name.empty() ? "unknown_graph" : module_name.str(), func,
              &txt_module)))
        return nullptr;
    
      auto compilation_status_type =
          RankedTensorType::get({}, builder->getType<TF::StringType>());
      auto program_type =
          RankedTensorType::get({3}, builder->getType<TF::StringType>());
    
      // Add MLIR module's fingerprint to compile metadata.
      uint64_t mlir_fingerprint = tensorflow::Fingerprint64(txt_module);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

              rewriter.clone(*func.getOperation()));
          manager.insert(cloned_func);
          rewriter.setInsertionPointToStart(&cloned_func.getBody().front());
          auto result_type =
              RankedTensorType::get({3}, rewriter.getType<TF::StringType>());
          auto dynamic_key =
              rewriter.create<TF::_XlaCompileMlirPlaceholderProgramKeyOp>(
                  func.getLoc(), /*program=*/result_type, llvm::ArrayRef<Value>{});
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td

    // Creates an int32 constant op from an integer attribute $0.
    def CreateInt32ConstOpFromIntAttr
      : NativeCodeCall<"$_builder.create<TF::ConstOp>($_loc, DenseElementsAttr::get(RankedTensorType::get({}, $_builder.getI32Type()), {static_cast<int32_t>($0.cast<IntegerAttr>().getInt())}))">;
    
    //===----------------------------------------------------------------------===//
    // Nullary ops patterns.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

      SmallVector<int64_t> array;
      array.reserve(array_attr.size());
      for (auto elem : array_attr.getAsRange<IntegerAttr>()) {
        array.push_back(elem.getInt());
      }
      return DenseIntElementsAttr::get(
          RankedTensorType::get({static_cast<int64_t>(array_attr.size())},
                                rewriter.getIntegerType(64)),
          array);
    }
    
    template <typename UniformQuantizedConvolutionOp>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_dynamic_layout_pass.cc

                                      OpBuilder* builder) {
      return builder->create<TF::TPUGetLayoutOp>(
          compile_launch.getLoc(),
          llvm::ArrayRef<Type>{RankedTensorType::get({ShapedType::kDynamic},
                                                     builder->getIntegerType(64))},
          llvm::ArrayRef<Value>{compilation_key},
          llvm::ArrayRef<NamedAttribute>{
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_traits.h

      dims.resize(rank);
      for (int i = 0, e = rank; i != e; i++) {
        int64_t dim0 = a.getDimSize(i);
        int64_t dim1 = b.getDimSize(i);
        dims[i] = (dim0 == ShapedType::kDynamic) ? dim1 : dim0;
      }
      return RankedTensorType::get(dims, a.getElementType());
    }
    }  // namespace detail
    
    // Verifies that op has the same operand and result element types (or type
    // itself, if scalar) after resolving reference types (i.e., after converting
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/flatbuffer_operator.cc

      std::vector<llvm::APInt> extendVec;
      extendVec.resize(value.size());
      for (size_t i = 0; i < value.size(); ++i) {
        extendVec[i] = llvm::APInt(1, value[i]);
      }
      mlir::RankedTensorType ty =
          tensorflow::GetTypeFromTFTensorShape(shape, builder.getIntegerType(1));
      return mlir::DenseIntElementsAttr::get(ty, extendVec);
    }
    
    static mlir::Attribute BuildRankedTensorAttr(std::vector<int64_t> shape,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 38K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

      // If there was no control output to be removed, return early.
      if (!changed) return;
    
      int num_chains = resource_equivalence_classes.getNumClasses();
      RankedTensorType chaining_data_type =
          RankedTensorType::get({}, OpBuilder(while_body).getI32Type());
      // Create new while body
      int num_old_outputs = while_body.getNumResults();
      AppendFunctionArguments(while_body, num_chains, chaining_data_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
Back to top