Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for AssetOp (0.11 sec)

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

      builder.create<tf_saved_model::SessionInitializerOp>(
          module->getLoc(), builder.getArrayAttr(func_names));
      // Create AssetOp; this holds the checkpoint_path.
      // TODO(b/318761632): Cleanup usage of string literals, instead use constants.
      auto asset_op = builder.create<tf_saved_model::AssetOp>(
          module->getLoc(),
          /*sym_name=*/
          builder.getStringAttr("__tf_saved_model_variables"),  // Val unimportant.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.h

    // `tf_saved_model::AssetOp`s into regular tensor args. Returns `AsestFileDef`s
    // that associates the arg with the asset.
    //
    // In detail, this function performs the following:
    // * Replaces "tf_saved_model.bound_input" attributes to
    //   "tf_saved_model.index_path", if the bound input is attached to the
    //   `tf_saved_model::AssetOp`.
    // * Strips the "assets/" prefix of the filename when setting it to
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 01:45:41 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc

    #include "tensorflow/compiler/mlir/tensorflow/translate/import_model.h"
    #include "tensorflow/core/protobuf/meta_graph.pb.h"
    
    namespace mlir::quant {
    namespace {
    
    using ::mlir::tf_saved_model::AssetOp;
    using ::mlir::tf_saved_model::kTfSavedModelIndexPathAttr;
    using ::mlir::tf_saved_model::LookupBoundInputOfType;
    using ::tensorflow::AssetFileDef;
    
    // Given argument attributes `arg_attrs`, returns a new set of argument
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc

        for (int i = 0, e = func.getNumArguments(); i < e; ++i) {
          SmallVector<TF::InitializeTableFromTextFileV2Op, 4>
              init_table_from_text_file_ops_to_erase;
          auto asset = LookupBoundInputOfType<AssetOp>(func, i, symbol_table);
    
          if (!asset) continue;
    
          auto arg = func.getArgument(i);
          bool arg_is_deletable = true;
          for (auto user : arg.getUsers()) {
            if (auto read_op =
    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/quantization/tensorflow/cc/convert_asset_args_test.cc

      EXPECT_THAT(index_path, NotNull());
      EXPECT_THAT(index_path, Eq("arg_0:0"));
    }
    
    TEST_F(ConvertAssetArgsTest, ArgsBoundedToGlobalTensorNotModified) {
      // If the argument is not bound to AssetOp, it is not modified.
      OwningOpRef<ModuleOp> module_op = ParseModuleOpString(R"mlir(
        module {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfrt/tests/saved_model/saved_model_test.cc

      ASSERT_EQ(bound_inputs.size(), 2);
    
      auto global_tensor =
          llvm::cast<mlir::tf_saved_model::GlobalTensorOp>(bound_inputs[0]);
      auto asset = llvm::cast<mlir::tf_saved_model::AssetOp>(bound_inputs[1]);
    
      EXPECT_EQ(global_tensor.getSymName(), "y");
      EXPECT_EQ(asset.getSymName(), "z");
    }
    
    TEST(SavedModelTest, CompileToBEF) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 13 01:17:29 UTC 2023
    - 9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc

        auto type = mlir::cast<TensorType>(global_tensor.getType());
        return RankedTensorType::get(
            {}, TF::ResourceType::get({type}, type.getContext()));
      }
    
      if (auto asset = llvm::dyn_cast<AssetOp>(op)) {
        return RankedTensorType::get({}, TF::StringType::get(asset.getContext()));
      }
    
      op->emitError() << "unknown symbol operation";
      return {};
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

                          return a.getName() < b.getName();
                        });
    
      struct NamedAsset {
        llvm::StringRef name;
        AssetOp asset;
      };
      llvm::SmallVector<NamedAsset, 4> assets;
      for (auto asset : module.getOps<AssetOp>()) {
        assets.push_back({asset.getName(), asset});
      }
      llvm::stable_sort(assets, [](const NamedAsset& a, const NamedAsset& b) {
        return a.name < b.name;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
Back to top