Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 156 for RankedTensorType (8.88 sec)

  1. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

    LogicalResult GetShardShapedType(Operation* context_op,
                                     int num_cores_per_replica, Type full_type,
                                     Type& shard_type) {
      RankedTensorType ranked_type = mlir::dyn_cast<RankedTensorType>(full_type);
      if (!ranked_type)
        return context_op->emitOpError()
               << "A map_outside_compilation op's input and output types must be "
                  "ranked tensors.";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/folders.cc

        if (signed_rhs_val.isZero()) {
          return failure();
        }
        res.push_back(signed_lhs_val / signed_rhs_val);
      }
    
      auto res_attr = DenseElementsAttr::get(
          const_oprs[0].getType().cast<RankedTensorType>(), res);
      rewriter.replaceOpWithNewOp<stablehlo::ConstantOp>(adaptor.value().Op(),
                                                         res_attr);
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 06:11:55 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

    // device.
    llvm::SmallVector<TF::VarHandleOp, 4> CreateStateVars(
        const llvm::SmallDenseMap<llvm::StringRef, llvm::SmallVector<StringRef, 4>>&
            devices,
        Location loc, RankedTensorType key_type, OpBuilder* builder) {
      llvm::SmallVector<TF::VarHandleOp, 4> state_vars;
    
      // TODO(b/148913020): Remove this constraint once model parallelism is
      // supported.
      const auto& device_list =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc

          std::string asset_filename = asset.getFilename().str();
          std::string filename =
              tensorflow::io::JoinPath(saved_model_dir, asset_filename);
          ShapedType shaped_type =
              RankedTensorType::get({1}, TF::StringType::get(builder.getContext()));
          auto const_op = builder.create<TF::ConstOp>(
              asset.getLoc(),
              DenseStringElementsAttr::get(shaped_type, {filename}));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 30 01:12:09 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

      StringRef config = recv_op ? recv_op.getConfig() : send_op.getConfig();
    
      // Create XlaRecvTPUEmbeddingDeduplicationData op.
      OpBuilder builder(region);
      auto output_ty =
          RankedTensorType::get({}, VariantType::get(region->getContext()));
      auto dedup_op = builder.create<XlaRecvTPUEmbeddingDeduplicationDataOp>(
          loc, output_ty, config);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

          rewriter.eraseOp(op);
          return success();
        }
    
        // The layer stats contain only the first min/max pairs.
        ElementsAttr layer_stats = DenseFPElementsAttr::get(
            RankedTensorType::get({2}, rewriter.getF32Type()),
            {static_cast<float>(min.getValueAsDouble()),
             static_cast<float>(max.getValueAsDouble())});
        ElementsAttr axis_stats;
        IntegerAttr axis;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

          if (v_int > 7 || v_int < -8) {
            return failure();
          }
        }
    
        Builder builder(op.getContext());
        auto shaped_type =
            mlir::RankedTensorType::get(const_type.getShape(), builder.getI4Type());
        auto newAttr = DenseElementsAttr::getFromRawBuffer(
            shaped_type, mlir::cast<DenseElementsAttr>(op.getValue()).getRawData());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc

        llvm::SmallVector<arith::ConstantOp, 4> constant_ops(
            func.getOps<arith::ConstantOp>());
        for (auto op : constant_ops) {
          ShapedType shaped_type =
              RankedTensorType::get({1}, StringType::get(context));
    
          DenseStringElementsAttr attr;
          if (!matchPattern(op.getOperation(), m_Constant(&attr))) {
            continue;
          }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 09:19:38 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.h

    // Tries to infer the element type with full shape based its write accesses.
    // `infer_from_user` should check if the provided op is an accessing op that
    // could be used to infer the type.
    std::optional<RankedTensorType> GetElementTypeFromAccess(
        Value collection, ModuleOp module,
        llvm::function_ref<std::optional<Type>(Operation*)> infer_from_op);
    
    // Creates a ReadVariableOp on a local variable.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

      }
      auto buffer = scatter.getInputHandle();
      OpBuilder builder(scatter);
      auto indices_type =
          mlir::cast<RankedTensorType>(scatter.getIndices().getType());
      if (!indices_type) return scatter.emitOpError("unranked indices shape");
      auto shape_type = RankedTensorType::get({2}, builder.getIntegerType(32));
      auto shape = builder.create<TF::ConstOp>(
          scatter.getLoc(),
          DenseElementsAttr::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
Back to top