Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 58 of 58 for varhandle_op (0.24 sec)

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

      auto& island_block = island_op.getBody().front();
      if (++island_block.begin() != --island_block.end()) return nullptr;
    
      Operation* resource_op = &island_block.front();
      if (llvm::isa<TF::VarHandleOp, TF::HashTableOp, TF::HashTableV2Op,
                    TF::MutableHashTableV2Op>(resource_op)) {
        return resource_op;
      }
      return nullptr;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  2. tensorflow/cc/experimental/libtf/tests/variable_test.cc

      {
        AbstractTensorHandle* var_ptr = nullptr;
        PartialTensorShape scalar_shape;
        TF_EXPECT_OK(
            PartialTensorShape::MakePartialShape<int32_t>({}, 0, &scalar_shape));
        TF_EXPECT_OK(tensorflow::ops::VarHandleOp(ctx_.get(), &var_ptr, DT_FLOAT,
                                                  scalar_shape));
        var.reset(var_ptr);
      }
      // Assign a value.
      auto x = CreateScalarTensor<float, TF_FLOAT>(2.0f);
      TF_EXPECT_OK(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 21:44:52 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/analysis/resource_dataflow.cc

                                              symbol_table);
          ResourceConstructingOps result(global_tensor);
          return result;
        }
      } else if (auto vh = dyn_cast<TF::VarHandleOp>(value.getDefiningOp())) {
        return ResourceConstructingOps(vh);
      } else if (auto it = dyn_cast<TF::IteratorOp>(value.getDefiningOp())) {
        return ResourceConstructingOps(it);
      }
      return ResourceConstructingOps();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/cc/saved_model_import.h

    // SavedModelBundle complements the imported ModuleOp by providing access to
    // `tensorflow::Session` which may be useful when reading values from resources
    // (e.g. `TF::VarHandleOp`s).
    using ImportedMlirModuleOp =
        std::pair<OwningOpRef<ModuleOp>,
                  std::unique_ptr<::tensorflow::SavedModelBundle>>;
    
    // Loads a SavedModel at `saved_model_path` and converts it to `mlir::ModuleOp`.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 12:49:45 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/analyze_variables.cc

    // Returns true if 'op' is TF op that accepts resource type, but is
    // supported by TFLite.
    bool IsSupportedTFLiteResourceOp(Operation* op) {
      return llvm::isa<TF::ReadVariableOp, TF::AssignVariableOp, TF::VarHandleOp,
                       TF::LookupTableFindV2Op, TF::LookupTableImportV2Op,
                       TF::LookupTableSizeV2Op>(op);
    }
    
    // Returns true if 'op' is TF/TFLite control flow op that can accept resource
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/tests/device_canonicalize.mlir

    func.func @cluster_result_for_resource_update(%arg0 : tensor<!tf_type.string>, %arg1 : tensor<!tf_type.string>) -> (tensor<!tf_type.string>, tensor<!tf_type.string>) {
      %resource = "tf.VarHandleOp"() {container = "c", shared_name = "v"} : () -> tensor<*x!tf_type.resource<tensor<*x!tf_type.string>>>
    
      // CHECK: %[[RESULT:.*]] = "tf_device.cluster"
      %0:2 = "tf_device.cluster"() ({
        // CHECK: "tf.Equal"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Nov 04 14:07:37 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tf_savedmodel_passes.td

        for those which come from a "bound input" parameter. For the latter,
        said parameter will not be removed, unlike LowerGlobalsToMlProgramPass.
    
        So this will lower e.g.
    
          %0 = "tf.VarHandleOp" {name = "foo"}
          %1 = "tf.ReadVariableOp"(%0)
    
        to
    
          %0 = ml_program.global_load @vars.foo
      }];
    
      let constructor = "::mlir::tf_saved_model::CreateLowerVariableOpsToMlProgramPass()";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 09 19:11:34 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/lower_globals_to_ml_program.cc

          if (auto global = tf_saved_model::LookupBoundInputOfType<
                  tf_saved_model::GlobalTensorOp>(func, i, syms)) {
            OpBuilder builder(func.getBody());
            auto dummy = builder.create<TF::VarHandleOp>(
                global.getLoc(), func.getArgument(i).getType(), "dummy", "dummy");
            func.getArgument(i).replaceAllUsesWith(dummy.getResult());
            argsToErase.set(i);
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
Back to top