Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 136 for var_handle_op (0.16 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

    // Creates the per-device variables that represent the formatting state of each
    // 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.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/build_xla_ops_pass_test.cc

                                   result);
    }
    
    Node* MakeWrite(const Scope& scope, Output value_to_write, const string& id) {
      Output var_handle = ops::VarHandleOp(scope.WithOpName("Var_" + id), DT_FLOAT,
                                           TensorShape({}));
      ops::AssignVariableOp assign_op(scope.WithOpName("Assignee_" + id),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/integration/node_expansion_pass.cc

      static const char* kOpsToSkip[] = {
          "IdentityOp",
          "NoOp",              // b/174596063
          "OptionalHasValue",  // b/173136483
          "OptionalGetValue",  // b/173136483
          "VarHandleOp",       // b/176819198
      };
      for (const char* skip : kOpsToSkip) {
        if (absl::StartsWith(orig_op->op_name(), skip)) return absl::OkStatus();
      }
    
      tf_core_op_expansion_node_counter->GetCell()->IncrementBy(1);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Feb 25 16:22:36 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfrt/tests/tf_to_corert/optimize_tf_control_flow_side_effect.mlir

    }
    
    // CHECK-LABEL: func @no_set_stateless
    func.func @no_set_stateless(%arg: tensor<i32>, %cond: tensor<i1>) -> (tensor<i32>, tensor<i32>) {
      %handle = "tf.VarHandleOp"() { container = "", shared_name = "var" } : () -> tensor<!tf_type.resource<tensor<i32>>>
      "tf.AssignVariableOp"(%handle, %arg) : (tensor<!tf_type.resource<tensor<i32>>>, tensor<i32>) -> ()
      // CHECK: tf.While
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 01:15:55 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tfrt/tests/mlrt/tf_to_mlrt.mlir

    // Test lowering of IfrtLoadVariableOp
    
    // CHECK-LABEL: func @ifrt_load_variable_test
    func.func @ifrt_load_variable_test() -> () {
      // CHECK: [[HANDLE:%.*]] = tf_mlrt.executeop()
      // CHECK-SAME:  VarHandleOp
      %0 = "tf.VarHandleOp"() {__op_key = 1: i32, device = "/device:CPU:0", container = "", shared_name = "variable"} : () -> tensor<!tf_type.resource<tensor<1x3xf32>>>
      // CHECK-NEXT: "tf_mlrt.ifrt_load_variable"([[HANDLE]])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 20:44:15 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  10. 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)
Back to top